item_options

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.

Interact with this resource

To interact with this resource and see it in the context of the API, you can utilise Postman or your Terminal/Console to perform requests. If you have a Foxy store, you can also use the API browser in the admin to interact with resources connected to your store.

Actions

GET
View a list of item_options
POST
Create a new item_option
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:item_options": [...]
  },
  "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/item_option">
  ...
  </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: item_option

Description

An item option is a property added to the cart for an item which isn't part of the standard item properties such as name, weight, etc. Examples include size, color, or anything else added during the add to cart process.

Interact with this resource

To interact with this resource and see it in the context of the API, you can utilise Postman or your Terminal/Console to perform requests. If you have a Foxy store, you can also use the API browser in the admin to interact with resources connected to your store.

Actions

GET
View a item_option
PATCH
Update a item_option (send only the properties you want to modify)
PUT
Replace a item_option (send the entire representation)
DELETE
Delete a item_option
HEAD
Get just the header response
OPTIONS
Get a response explaining which HTTP methods are supported

Properties

Property Description Type Constraints
name The name of this item option. String Required. 100 characters or less.
value The value of this item option. String Required. 1024 characters or less.
price_mod The price modifier for this item option. The price of the item in the cart will be adjusted by this amount because of this item option. Decimal Optional.
weight_mod The weight modifier for this item option. The weight of the item in the cart will be adjusted by this amount because of this item option. Decimal Optional. Up to three decimal places.
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/item_options/2",
            "title": "This Item Option"
        },
        "fx:store": {
            "href": "https://api-sandbox.foxycart.com/stores/8",
            "title": "This Store"
        },
        "fx:transaction": {
            "href": "https://api-sandbox.foxycart.com/transactions/2",
            "title": "This Transaction"
        },
        "fx:item": {
            "href": "https://api-sandbox.foxycart.com/items/2",
            "title": "This Item"
        }
    },
    "name": "color",
    "value": "blue",
    "price_mod": 0,
    "weight_mod": 0,
    "date_created": "2012-02-29T13:55:09-0800",
    "date_modified": "2012-02-29T13:55:09-0800"
}
<?xml version="1.0" encoding="UTF-8"?>
<resource href="https://api-sandbox.foxycart.com/item_options/2" rel="https://api.foxycart.com/rels/item_option">
  <link rel="self" href="https://api-sandbox.foxycart.com/item_options/2" title="This Item Option"/>
  <link rel="https://api.foxycart.com/rels/store" href="https://api-sandbox.foxycart.com/stores/8" title="This Store"/>
  <link rel="https://api.foxycart.com/rels/transaction" href="https://api-sandbox.foxycart.com/transactions/2" title="This Transaction"/>
  <link rel="https://api.foxycart.com/rels/item" href="https://api-sandbox.foxycart.com/items/2" title="This Item"/>
  <name>color</name>
  <value>blue</value>
  <price_mod>0</price_mod>
  <weight_mod>0</weight_mod>
  <date_created>2012-02-29T13:55:09-0800</date_created>
  <date_modified>2012-02-29T13:55:09-0800</date_modified>
</resource>
{
    "class": [
        "item_option"
    ],
    "properties": {
        "name": "color",
        "value": "blue",
        "price_mod": 0,
        "weight_mod": 0,
        "date_created": "2012-02-29T13:55:09-0800",
        "date_modified": "2012-02-29T13:55:09-0800"
    },
    "links": [
        {
            "rel": [
                "self"
            ],
            "href": "https://api-sandbox.foxycart.com/item_options/2"
        },
        {
            "rel": [
                "https://api.foxycart.com/rels/store"
            ],
            "href": "https://api-sandbox.foxycart.com/stores/8"
        },
        {
            "rel": [
                "https://api.foxycart.com/rels/transaction"
            ],
            "href": "https://api-sandbox.foxycart.com/transactions/2"
        },
        {
            "rel": [
                "https://api.foxycart.com/rels/item"
            ],
            "href": "https://api-sandbox.foxycart.com/items/2"
        }
    ]
}

Zoomable Resources

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