coupon_details

Description

This link relationship returns a collection of resources. You can easily paginate through this collection using the hypermedia links provided and the link relationships of first, prev, next, and last. Scroll down to view a representation of a single resource embedded within this collection.

Actions

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

Example Representation

{
  "_links": {
    "curies": [
      {
        "name": "fx",
        "href": "https://api.foxycart.com/rels/{rel}",
        "templated": true
      }
    ],
    "self": {
      "href": "...",
      "title": "This Collection"
    },
    "first": {
      "href": "...?offset=0",
      "title": "First Page of this Collection"
    },
    "prev": {
      "href": "...?offset=0",
      "title": "Previous Page of this Collection"
    },
    "next": {
      "href": "...?offset=0",
      "title": "Next Page of this Collection"
    },
    "last": {
      "href": "...?offset=0",
      "title": "Last Page of this Collection"
    }
  },
  "_embedded": {
    "fx:coupon_details": [...]
  },
  "total_items": "5",
  "returned_items": 5,
  "limit": 20,
  "offset": 0
}
<?xml version="1.0" encoding="UTF-8"?>
<resource href="...">
  <link rel="self" href="..." title="This Collection"/>
  <link rel="first" href="...?offset=0" title="First Page of this Collection"/>
  <link rel="prev" href="...?offset=0" title="Previous Page of this Collection"/>
  <link rel="next" href="...?offset=0" title="Next Page of this Collection"/>
  <link rel="last" href="...?offset=0" title="Last Page of this Collection"/>
  <resource href="..." rel="https://api.foxycart.com/rels/coupon_detail">
  ...
  </resource>
  <total_items>5</total_items>
  <returned_items>5</returned_items>
  <limit>20</limit>
  <offset>0</offset>
</resource>
{
    "properties": {
        "total_items": "5",
        "returned_items": 5,
        "limit": 20,
        "offset": 0
    },
    "entities": [...],
    "links": [
        {
            "rel": [
                "self"
            ],
            "href": "..."
        },
        {
            "rel": [
                "first"
            ],
            "href": "...?offset=0"
        },
        {
            "rel": [
                "prev"
            ],
            "href": "...?offset=0"
        },
        {
            "rel": [
                "next"
            ],
            "href": "...?offset=0"
        },
        {
            "rel": [
                "last"
            ],
            "href": "...?offset=0"
        }
    ],
    "actions": [
    ]
}

Embedded Resource: coupon_detail

Description

Coupon details provide a summary of what portion of coupons apply to a given item in the cart.

Actions

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

Properties

Property Description Type Constraints
id The ID of this coupon detail. String Read only
name The original coupon name used for this discount. String Read Only
code The original coupon code used for this discount. String Read Only
amount_per The amount of discount applied to this item. Decimal 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/coupon_details/30",
            "title": "This Coupon"
        },
        "fx:store": {
            "href": "https://api-sandbox.foxycart.com/stores/75",
            "title": "This Store"
        },
        "fx:item": {
            "href": "https://api-sandbox.foxycart.com/items/5627292",
            "title": "This Coupon Item"
        },
        "fx:coupon": {
            "href": "https://api-sandbox.foxycart.com/coupons/48",
            "title": "This Coupon"
        },
        "fx:coupon_code": {
            "href": "https://api-sandbox.foxycart.com/coupon_codes/3776",
            "title": "This Coupon Code"
        },
        "fx:transaction": {
            "href": "https://api-sandbox.foxycart.com/transactions/3852608",
            "title": "This Transaction"
        }
    },
    "id": 30,
    "name": "Test",
    "code": "test",
    "amount_per": -14.9710075546,
    "date_created": null,
    "date_modified": null
}
<?xml version="1.0" encoding="UTF-8"?>
<resource href="https://api-sandbox.foxycart.com/coupon_details/30" rel="https://api.foxycart.com/rels/coupon_detail">
    <link rel="self" href="https://api-sandbox.foxycart.com/coupon_details/30" title="This Coupon"/>
    <link rel="https://api.foxycart.com/rels/store" href="https://api-sandbox.foxycart.com/stores/75" title="This Store"/>
    <link rel="https://api.foxycart.com/rels/item" href="https://api-sandbox.foxycart.com/items/5627292" title="This Coupon Item"/>
    <link rel="https://api.foxycart.com/rels/coupon" href="https://api-sandbox.foxycart.com/coupons/48" title="This Coupon"/>
    <link rel="https://api.foxycart.com/rels/coupon_code" href="https://api-sandbox.foxycart.com/coupon_codes/3776" title="This Coupon Code"/>
    <link rel="https://api.foxycart.com/rels/transaction" href="https://api-sandbox.foxycart.com/transactions/3852608" title="This Transaction"/>
    <id>30</id>
    <name>Test</name>
    <code>test</code>
    <amount_per>-14.9710075546</amount_per>
    <date_created></date_created>
    <date_modified></date_modified>
</resource>
{
    "class": [
        "coupon_detail"
    ],
    "rel": [
        "https://api.foxycart.com/rels/coupon_detail"
    ],
    "properties": {
        "id": 30,
        "name": "Test",
        "code": "test",
        "amount_per": -14.9710075546,
        "date_created": null,
        "date_modified": null
    },
    "links": [
        {
            "rel": [
                "self"
            ],
            "href": "https://api-sandbox.foxycart.com/coupon_details/30"
        },
        {
            "rel": [
                "https://api.foxycart.com/rels/store"
            ],
            "href": "https://api-sandbox.foxycart.com/stores/75"
        },
        {
            "rel": [
                "https://api.foxycart.com/rels/item"
            ],
            "href": "https://api-sandbox.foxycart.com/items/5627292"
        },
        {
            "rel": [
                "https://api.foxycart.com/rels/coupon"
            ],
            "href": "https://api-sandbox.foxycart.com/coupons/48"
        },
        {
            "rel": [
                "https://api.foxycart.com/rels/coupon_code"
            ],
            "href": "https://api-sandbox.foxycart.com/coupon_codes/3776"
        },
        {
            "rel": [
                "https://api.foxycart.com/rels/transaction"
            ],
            "href": "https://api-sandbox.foxycart.com/transactions/3852608"
        }
    ]
}

Zoomable Resources

This resource has no linked resources which can be "zoomed" in on, filtered and embedded within this resource.