carts

Resource: cart

This link relationship returns a collection of carts. You can paginate through this collection using the hypermedia links provided and the link relationships of first, prev, next, and last.

Required Scopes

Full store_full_access
Read carts_read
Write carts_write

Collection Resource

cart

Actions

GET View a list of carts
POST Create a new cart
HEAD Get just the header response
OPTIONS Get a response explaining which HTTP methods are supported

Properties (5)

_embedded Object · Read-only

Contains fx:carts[] — array of cart resources

total_items String · Read-only

Total number of resources in this collection.

returned_items Number · Read-only

Number of resources returned in this page.

limit Number · Read-only

Maximum number of resources per page.

offset Number · Read-only

Number of resources skipped.

Link Relations (5)

self This Collection
first First Page of this Collection
prev Previous Page of this Collection
next Next Page of this Collection
last Last Page of this Collection
https://api.foxycart.com/stores/{store_id}/carts
Available via fx:carts on store

Example Representation

{
  "_links": {
    "curies": [
      {
        "name": "fx",
        "href": "https://api.foxycart.com/rels/{rel}",
        "templated": true
      }
    ],
    "self": {
      "href": "https://api.foxycart.com/stores/123/carts",
      "title": "This Collection"
    },
    "first": {
      "href": "https://api.foxycart.com/stores/123/carts?offset=0",
      "title": "First Page of this Collection"
    },
    "prev": {
      "href": "https://api.foxycart.com/stores/123/carts?offset=0",
      "title": "Previous Page of this Collection"
    },
    "next": {
      "href": "https://api.foxycart.com/stores/123/carts?offset=20",
      "title": "Next Page of this Collection"
    },
    "last": {
      "href": "https://api.foxycart.com/stores/123/carts?offset=20",
      "title": "Last Page of this Collection"
    }
  },
  "_embedded": {
    "fx:carts": [
      {
        "_links": {
          "curies": [
            {
              "name": "fx",
              "href": "https://api.foxycart.com/rels/{rel}",
              "templated": true
            }
          ],
          "self": {
            "href": "https://api.foxycart.com/carts/456",
            "title": "This Cart"
          },
          "fx:attributes": {
            "href": "https://api.foxycart.com/carts/123/attributes",
            "title": "Attributes for This Cart"
          },
          "fx:store": {
            "href": "https://api.foxycart.com/stores/456",
            "title": "This Store"
          },
          "fx:template_set": {
            "href": "https://api.foxycart.com/template_sets/456",
            "title": "This Template Set"
          },
          "fx:customer": {
            "href": "https://api.foxycart.com/customers/456",
            "title": "This Customer"
          },
          "fx:items": {
            "href": "https://api.foxycart.com/carts/123/items",
            "title": "The Items for This Cart"
          },
          "fx:discounts": {
            "href": "https://api.foxycart.com/carts/123/discounts",
            "title": "Discounts for this Cart"
          },
          "fx:applied_coupon_codes": {
            "href": "https://api.foxycart.com/carts/123/applied_coupon_codes",
            "title": "Coupon Codes applied to this Cart"
          },
          "fx:applied_gift_card_codes": {
            "href": "https://api.foxycart.com/carts/123/gift_card_code_logs",
            "title": "The Applied Gift Card Codes for this Cart"
          },
          "fx:custom_fields": {
            "href": "https://api.foxycart.com/carts/123/cart_custom_fields",
            "title": "The Custom Fields for this Cart"
          },
          "fx:create_session": {
            "href": "https://api.foxycart.com/carts/123/session",
            "title": "POST here to create a browser session link"
          }
        },
        "customer_uri": "https://api.foxycart.com/customers/8",
        "template_set_uri": "https://api.foxycart.com/template_sets/1446",
        "language": "english",
        "use_customer_shipping_address": true,
        "billing_first_name": "Grace",
        "billing_last_name": "Hopper",
        "billing_company": "",
        "billing_address1": "1234 Mulberry Dr.",
        "billing_address2": "#567",
        "billing_city": "MANHATTAN",
        "billing_state": "NY",
        "billing_postal_code": "10001",
        "billing_country": "US",
        "billing_phone": "",
        "shipping_first_name": "test1",
        "shipping_last_name": "test2",
        "shipping_company": "test3",
        "shipping_address1": "test4",
        "shipping_address2": "test5",
        "shipping_city": "Austin",
        "shipping_state": "TX",
        "shipping_postal_code": "78767",
        "shipping_country": "US",
        "shipping_phone": "",
        "total_item_price": 0,
        "total_tax": 0,
        "total_shipping": 0,
        "total_future_shipping": 0,
        "total_order": 0,
        "date_created": "2012-02-29T13:55:09-0800",
        "date_modified": null
      }
    ]
  },
  "total_items": 1,
  "returned_items": 1,
  "limit": 20,
  "offset": 0
}