discount
Description
Discounts are historical records of coupons used in a transaction.
Actions
- GET
- View a discount
- HEAD
- Get just the header response
- OPTIONS
- Get a response explaining which HTTP methods are supported
Properties
Property | Description | Type | Constraints |
---|---|---|---|
code | The original coupon code used for this discount. | String | Read only |
amount | The amount of the discount. | Decimal | Read Only |
name | The original coupon name used for this discount. | String | Read only |
display | The discount displayed in the format of the currency the transaction took place in. | String | Read only |
is_taxable | Whether or not this discount was taxable. | Boolean | Read only |
is_future_discount | Whether or not this discount is part of a subscription that is to be charged in the future based on when this transaction was processed. | Boolean | Read only |
date_created | The date this resource was created. | Date | Read only |
date_modified | The date this resource was last modified. | Date | Read only |
Example Representation
{ "_links": { "curies": [ { "name": "fx", "href": "https://api.foxycart.com/rels/{rel}", "templated": true } ], "self": { "href": "https://api-sandbox.foxycart.com/discounts/54180", "title": "This Discount" }, "fx:store": { "href": "https://api-sandbox.foxycart.com/stores/66", "title": "This Store" }, "fx:transaction": { "href": "https://api-sandbox.foxycart.com/transactions/3844628", "title": "This Transaction" }, "fx:customer": { "href": "https://api-sandbox.foxycart.com/customers/204", "title": "This Customer" }, "fx:coupon": { "href": "https://api-sandbox.foxycart.com/coupons/292", "title": "This Coupon" }, "fx:coupon_code": { "href": "https://api-sandbox.foxycart.com/coupon_codes/4704940", "title": "This Coupon Code" } }, "code": "tester", "amount": -1, "name": "tester", "display": "-1.00", "is_taxable": false, "is_future_discount": false, "date_created": null, "date_modified": null }
<?xml version="1.0" encoding="UTF-8"?> <resource href="https://api-sandbox.foxycart.com/discounts/54180" rel="https://api.foxycart.com/rels/discount"> <link rel="self" href="https://api-sandbox.foxycart.com/discounts/54180" title="This Discount"/> <link rel="https://api.foxycart.com/rels/store" href="https://api-sandbox.foxycart.com/stores/66" title="This Store"/> <link rel="https://api.foxycart.com/rels/transaction" href="https://api-sandbox.foxycart.com/transactions/3844628" title="This Transaction"/> <link rel="https://api.foxycart.com/rels/customer" href="https://api-sandbox.foxycart.com/customers/204" title="This Customer"/> <link rel="https://api.foxycart.com/rels/coupon" href="https://api-sandbox.foxycart.com/coupons/292" title="This Coupon"/> <link rel="https://api.foxycart.com/rels/coupon_code" href="https://api-sandbox.foxycart.com/coupon_codes/4704940" title="This Coupon Code"/> <code>tester</code> <amount>-1</amount> <name>tester</name> <display>-1.00</display> <is_taxable>false</is_taxable> <is_future_discount>false</is_future_discount> <date_created></date_created> <date_modified></date_modified> </resource>
{ "class": [ "discount" ], "properties": { "code": "tester", "amount": -1, "name": "tester", "display": "-1.00", "is_taxable": false, "is_future_discount": false, "date_created": null, "date_modified": null }, "links": [ { "rel": [ "self" ], "href": "https://api-sandbox.foxycart.com/discounts/54180" }, { "rel": [ "https://api.foxycart.com/rels/store" ], "href": "https://api-sandbox.foxycart.com/stores/66" }, { "rel": [ "https://api.foxycart.com/rels/transaction" ], "href": "https://api-sandbox.foxycart.com/transactions/3844628" }, { "rel": [ "https://api.foxycart.com/rels/customer" ], "href": "https://api-sandbox.foxycart.com/customers/204" }, { "rel": [ "https://api.foxycart.com/rels/coupon" ], "href": "https://api-sandbox.foxycart.com/coupons/292" }, { "rel": [ "https://api.foxycart.com/rels/coupon_code" ], "href": "https://api-sandbox.foxycart.com/coupon_codes/4704940" } ] }
Zoomable Resources
This resource has no linked resources which can be "zoomed" in on, filtered and embedded within this resource.