item

Collection: items

An item is a product added to a cart or contained in a transaction. Items that are part of a transaction can not be modified unless transaction editing is enabled for the store. Cart items, however, can be modified.

Required Scopes

Full store_full_access

When part of a completed transaction:

Read transactions_read
Write transactions_write

When part of a cart:

Read carts_read
Write carts_write

Actions

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

Properties (26)

item_category_uri String

The full API URI of the item category associated with this item.

Obtained from the self link relation of an item_category.

name String · Required · max 255

The name of this item.

price Number · Required

The price of this item. This represents the base price of the item before any item option modifiers.

quantity Number · Optional

The number of items in the cart or transaction. When adding products to the cart, if all properties are identical, the quantity will be incremented accordingly.

Default: 1

quantity_min Number

Minimum quantity that should be allowed per product, per cart. If the quantity is less than this, the quantity will be updated automatically to this number.

quantity_max Number

Maximum quantity that should be allowed per product, per cart. If the quantity is more than this, the quantity will be updated automatically to this amount.

weight Number

This item's per-item weight, used for shipping rate requests.

code String · Optional · max 200

Item code. Can be used however you would like (internal use, product SKU, etc.).

parent_code String · Optional · max 200

Parent item code. Used if this should be a child product in a bundle.

discount_name String · Optional · max 50

The name of the line item discount if it is included on this item.

discount_type String · Required

The type of the line item discount if this item has a discount.

Required if discount_name is set.

""quantity_amountquantity_percentageprice_amountprice_percentage
discount_details String · Required · max 200

The details of the line item discount if this item has a discount. See the cart documentation for details on how this value should be formatted.

Required if discount_name is set.

subscription_frequency String · Optional

This determines how often this subscription will be processed. The format is a number followed by a date type such as d (day), w (week), m (month), or y (year). You can also use .5m for twice a month. To modify this value for an existing subscription, you must modify the subscription directly.

Read only if connected to an existing subscription.

subscription_start_date String · Optional

The original date this subscription began or will begin if set in the future. To modify this value for an existing subscription, you must modify the subscription directly.

Read only if connected to an existing subscription.

Format: YYYY-MM-DD

subscription_next_transaction_date String

The date for when this subscription will run again. To modify this value for an existing subscription, you must modify the subscription directly.

Must be in the future. Read only if connected to an existing subscription.

Format: YYYY-MM-DD

subscription_end_date String

If set, the date this subscription will end. The subscription will not run on this day.

Must be in the future. Read only if connected to an existing subscription.

Format: YYYY-MM-DD

is_future_line_item Boolean · Read-only

If this item is part of a future subscription (or a subscription originally set up to start in the future), this will be set to true.

shipto String · Optional · max 100

Used for multiship to assign this item to a specific shipment. This value will be the address name of the shipment.

url String · Optional · max 200

The full item url for the customer to view this item online.

image String · Optional · max 200

The full image url for the customer to view an image of this item online.

length Number

The length of this item. This is currently a place holder for future use.

width Number

The width of this item. This is currently a place holder for future use.

height Number

The height of this item. This is currently a place holder for future use.

expires Number · Optional

As a unix timestamp, this is the point in the future when this item will no longer be valid and will be removed from the cart.

If supplied, must be in the future.

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 (21)

self This Item
fx:store GET PATCH PUT DELETE This Store
fx:item_category GET PATCH PUT DELETE This Item Category
fx:subscription GET PATCH PUT This Subscription

Only present when this item is connected to an existing subscription.

fx:sub_token_url GET This Sub Token

Only present when this item is connected to a subscription and a sub_token_url is available.

fx:item_options GET POST Item Options for This Item
fx:shipment GET Shipment for this Item

Only present when this item belongs to a completed transaction.

fx:downloadable_purchase GET POST This Downloadable Purchase

Only present when the item has an associated downloadable purchase.

fx:provisioned_gift_card_code GET The Gift Card Code for this Item

Only present when the item has provisioned a gift card code.

fx:attributes GET POST PATCH PUT Attributes for This Item
fx:discount_details GET The Discounts for this Item
fx:coupon_details GET The Coupons for this Item
fx:item_taxes GET The applied taxes for this Item

Only present when this item belongs to a completed transaction.

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

Only present when this item belongs to a completed transaction.

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

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

Zoomable Resources

Embed related resources using ?zoom=<resource>. Filter with ?resource:property=value.

https://api.foxycart.com/items/{id}
Available via fx:item on coupon_detail·fx:item on discount_detail·fx:item on downloadable_purchase·fx:item on item_option·fx:item on item_taxes

Example Representation

Zoom
{
  "_links": {
    "curies": [
      {
        "name": "fx",
        "href": "https://api.foxycart.com/rels/{rel}",
        "templated": true
      }
    ],
    "self": {
      "href": "https://api.foxycart.com/items/123",
      "title": "This Item"
    },
    "fx:store": {
      "href": "https://api.foxycart.com/stores/456",
      "title": "This Store"
    },
    "fx:item_category": {
      "href": "https://api.foxycart.com/item_categories/999",
      "title": "This Item Category"
    },
    "fx:subscription": {
      "href": "https://api.foxycart.com/subscriptions/321",
      "title": "This Subscription"
    },
    "fx:sub_token_url": {
      "href": "https://mystore.foxycart.com/cart?sub_token=e38b9886405ff668f6d11c129e7fde1f8281f3e00dd34c819e0c9370ccb2bd56",
      "title": "This Sub Token"
    },
    "fx:item_options": {
      "href": "https://api.foxycart.com/items/123/item_options",
      "title": "Item Options for This Item"
    },
    "fx:shipment": {
      "href": "https://api.foxycart.com/shipments/456",
      "title": "Shipment for this Item"
    },
    "fx:downloadable_purchase": {
      "href": "https://api.foxycart.com/downloadable_purchases/456",
      "title": "This Downloadable Purchase"
    },
    "fx:provisioned_gift_card_code": {
      "href": "https://api.foxycart.com/provisioned_gift_card_code",
      "title": "The Gift Card Code for this Item"
    },
    "fx:attributes": {
      "href": "https://api.foxycart.com/items/123/attributes",
      "title": "Attributes for This Item"
    },
    "fx:discount_details": {
      "href": "https://api.foxycart.com/items/123/discount_details",
      "title": "The Discounts for this Item"
    },
    "fx:coupon_details": {
      "href": "https://api.foxycart.com/items/123/coupon_details",
      "title": "The Coupons for this Item"
    },
    "fx:item_taxes": {
      "href": "https://api.foxycart.com/item_taxes",
      "title": "The applied taxes for this Item"
    }
  },
  "item_category_uri": "https://api-sandbox.foxycart.com/item_categories/60",
  "name": "basic",
  "price": 10,
  "quantity": 1,
  "quantity_min": 0,
  "quantity_max": 0,
  "weight": 5,
  "code": "",
  "parent_code": "",
  "discount_name": "",
  "discount_type": "",
  "discount_details": "",
  "subscription_frequency": "",
  "subscription_start_date": null,
  "subscription_next_transaction_date": null,
  "subscription_end_date": null,
  "is_future_line_item": false,
  "shipto": "Me",
  "url": "",
  "image": "",
  "length": 0,
  "width": 0,
  "height": 0,
  "expires": 0,
  "date_created": null,
  "date_modified": "2015-04-15T08:45:49-0700"
}