discount

Collection: discounts

Discounts are historical records of coupons used in a transaction.

Required Scopes

Full store_full_access
Read transactions_read
Write transactions_write

Actions

GET View a discount
HEAD Get just the header response
OPTIONS Get a response explaining which HTTP methods are supported

Properties (8)

code String · Read-only

The original coupon code used for this discount.

amount Number · Read-only

The amount of the discount.

name String · Read-only

The original coupon name used for this discount.

display String · Read-only

The discount displayed in the format of the currency the transaction took place in.

is_taxable Boolean · Read-only

Whether or not this discount was taxable.

is_future_discount Boolean · Read-only

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.

date_created String (nullable) · Read-only

The date this resource was created.

date_modified String (nullable) · Read-only

The date this resource was last modified.

Link Relations (8)

self This Discount
fx:store GET PATCH PUT DELETE This Store
fx:customer GET PATCH PUT DELETE This Customer
fx:coupon GET PATCH PUT DELETE This Coupon
fx:coupon_code GET PATCH PUT DELETE This Coupon Code

Only present when the discount has an associated coupon code.

fx:transaction GET PATCH PUT POST The transaction this discount belongs to.

Only present when this discount belongs to a completed transaction.

fx:cart GET PATCH PUT POST DELETE The cart this discount belongs to.

Only present when this discount belongs to an incomplete transaction (cart).

https://api.foxycart.com/discounts/{id}

Example Representation

{
  "_links": {
    "curies": [
      {
        "name": "fx",
        "href": "https://api.foxycart.com/rels/{rel}",
        "templated": true
      }
    ],
    "self": {
      "href": "https://api.foxycart.com/discounts/123",
      "title": "This Discount"
    },
    "fx:store": {
      "href": "https://api.foxycart.com/stores/456",
      "title": "This Store"
    },
    "fx:customer": {
      "href": "https://api.foxycart.com/customers/789",
      "title": "This Customer"
    },
    "fx:coupon": {
      "href": "https://api.foxycart.com/coupons/999",
      "title": "This Coupon"
    },
    "fx:coupon_code": {
      "href": "https://api.foxycart.com/coupon_codes/456",
      "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
}