Composable Frontend 2.0 Learn more 

  • Orders/
    Orders API/
    Orders API Overview

    Orders API Overview

    An Order is created through the checkout endpoint within the Carts API.

    The Order Object

    The Order object is a representation of an order in Composable Commerce.

    Parameters

    AttributeTypeDescription
    idstringSpecifies the unique identifier for this order.
    typestringSpecifies the type of object being returned. You must use order.
    statusstringSpecifies the status of the order, such as incomplete, complete, processing, or cancelled.
    paymentstringSpecifies the status of the payment, such as unpaid, authorized, paid, or refunded.
    shippingstringSpecifies the status of the shipment, such as fulfilled, unfulfilled.
    customerobjectSpecifies the customer object associated with this order.
    customer.namestringSpecifies the name of the customer.
    customer.emailstringSpecifies the email address of the customer.
    shipping_addressobjectSpecifies the shipping address object.
    shipping_address.first_namestringSpecifies the first name of the address holder.
    shipping_address.last_namestringSpecifies the last name of the address holder.
    shipping_address.phone_numberstringSpecifies the phone number of the address holder.
    shipping_address.company_namestringSpecifies the company name.
    shipping_address.line_1stringSpecifies the first line of the address.
    shipping_address.line_2stringSpecifies the second line of the address.
    shipping_address.citystringSpecifies the name of the city in the shipping address.
    shipping_address.countystringSpecifies the county of the shipping address.
    shipping_address.regionstringSpecifies the state, province, or region of the shipping address.
    shipping_address.postcodestringSpecifies the postcode or ZIP code of the address.
    shipping_address.countrystringSpecifies the country in the shipping address.
    shipping_address.instructionsstringSpecifies any instructions provided with the shipping address.
    billing_addressobjectSpecifies the billing address object.
    billing_address.first_namestringSpecifies the first name of the billing address holder.
    billing_address.last_namestringSpecifies the last name of the billing address holder.
    billing_address.company_namestringSpecifies the billing company name.
    billing_address.line_1stringSpecifies the first line of the billing address.
    billing_address.line_2stringSpecifies the second line of the billing address.
    billing_address.citystringSpecifies the city.
    billing_address.countystringSpecifies the county of the billing address.
    billing_address.regionstringSpecifies the state, province, or region of the billing address.
    billing_address.postcodestringSpecifies the postcode or ZIP code of the billing address.
    billing_address.countrystringSpecifies the country in the billing address.
    custom_inputsobjectThe custom text to be added to a product.
    linksobjectDisplays the URLs related to this resource.
    metaobjectDisplays the additional information calculated for this order.
    meta.display_priceobjectDisplays the fields related to the totals and currency of this order.
    meta.display_price.with_taxobjectDisplays the total amount including tax.
    meta.display_price.with_tax.amountintegerSpecifies the raw total of this order, including tax.
    meta.display_price.with_tax.currencystringSpecifies the currency set for this order.
    meta.display_price.with_tax.formattedstringSpecifies the tax inclusive formatted total based on the currency.
    meta.display_price.without_taxobjectSpecifies the tax exclusive totals.
    meta.display_price.without_tax.amountintegerSpecifies the raw total of this cart, excluding tax.
    meta.display_price.without_tax.currencystringSpecifies the currency set for this order.
    meta.display_price.without_tax.formattedstringSpecifies the tax exclusive formatted total based on the currency.
    meta.timestampsobjectDisplays the timestamps for this order.
    meta.timestamps.created_atstringSpecifies the creation date of this order.
    meta.timestamps.updated_atstringSpecifies the last updated date of this order.
    meta.timestamps.updated_atstringSpecifies the last updated date of this order.
    relationshipsobjectDisplays the relationships related to this resource.
    relationships.itemsobjectSpecifies the order items object.
    relationships.items.dataarrayDisplays an array of order items.
    relationships.items.data.typestringRepresents the type of object being returned. For example, item.
    relationships.items.data.idstringSpecifies the unique identifier for this order item.
    relationships.customerobjectSpecifies the customer object.
    relationships.customer.dataobjectSpecifies the customer object associated with this order.
    relationships.customer.data.typestringRepresents the type of object being returned. For example, customer
    relationships.customer.data.idstringSpecifies the unique identifier for this customer.
    relationships.accountobjectSpecifies the account object.
    relationships.account.dataobjectSpecifies the account object associated with the order.
    relationships.account.data.typestringSpecifies the type of object returned. Use account for this setting.
    relationships.account.data.idstringSpecifies the unique identifier for the account.
    relationships.account_memberobjectSpecifies the account_member object.
    relationships.account_member.dataobjectSpecifies the account_member object associated with the order.
    relationships.account_member.data.typestringRepresents the type of object returned. Use account-member for this setting.
    relationships.account_member.data.idstringSpecifies the unique identifier for the account member.
    includedobjectSpecifies the included resources.
    included.accountsarrayDisplays an array of accounts that exists in the relationships of this order.
    included.accounts[].idstringSpecifies the unique identifier for the account.
    included.accounts[].typestringSpecifies the type of object returned. Use account for this setting.
    included.accounts[].namestringSpecifies the name of the account.
    included.accounts[].legal_namestringSpecifies the legal name of the account.
    included.account_membersarrayDisplays an array of account members that exists in the relationships of this order.
    included.account_members[].idstringSpecifies the unique identifier for the account member.
    included.account_members[].typestringSpecifies the type of object returned. Use account-member for this setting.
    included.account_members[].namestringSpecifies the name of the account member.
    included.account_members[].emailstringSpecifies the email address of the account member.

    Sample object

    {
      "data": {
          "type": "order",
          "id": "6d809942-da51-4f07-9350-47fe759b2369",
          "status": "incomplete",
          "payment": "unpaid",
          "shipping": "unfulfilled",
          "customer": {
            "name": "Brad",
            "email": "brad@bobley.com"
          },
          "shipping_address": {
            "first_name": "Otis",
            "last_name": "Sedmak",
            "phone_number": "(555) 555-1234",
            "company_name": "Sedmak & Co.",
            "line_1": "1234 Disney Drive",
            "line_2": "Disney Resort",
            "city": "Anaheim",
            "county": "Orange",
            "region": "CA",
            "postcode": "92802",
            "country": "US",
            "instructions": "Leave in porch"
          },
          "billing_address": {
            "first_name": "Jack",
            "last_name": "Macdowall",
            "company_name": "Macdowalls",
            "line_1": "1234 Disney Drive",
            "line_2": "Disney Resort",
            "city": "Anaheim",
            "county": "Orange",
            "region": "CA",
            "postcode": "92802",
            "country": "US"
          },
          "links": {},
          "meta": {
            "display_price": {
              "with_tax": {
                "amount": 45598,
                "currency": "USD",
                "formatted": "$455.98"
              },
              "without_tax": {
                "amount": 45598,
                "currency": "USD",
                "formatted": "$455.98"
              }
            },
            "timestamps": {
              "created_at": "2017-09-25T14:13:18.738Z",
              "updated_at": "2017-09-25T14:13:18.738Z"
            }
          },
          "relationships": {
            "items": {
              "data": [
                {
                  "type": "item",
                  "id": "52a88bad-16c4-49ff-8684-089cec3e3f35"
                }
              ]
            },
            "customer": {
              "data": {
                "type": "customer",
                "id": "c8c1c511-beef-4812-9b7a-9f92c587217c"
              }
            },
            "account": {
              "data": {
                "type": "account",
                "id": "b6e47478-7e7f-4127-b7e9-4a255564ae68"
              }
            },
            "account_member": {
              "data": {
                "type": "account-member",
                "id": "c8c1c511-beef-4812-9b7a-9f92c587217c"
              }
            }
          },
          "included": {
            "accounts": [{
              "id": "b6e47478-7e7f-4127-b7e9-4a255564ae68",
              "type": "account",
              "name": "acc-name",
              "legal_name": "acc-legal-name",
              "registration_id": "00000000-0000-1000-8000-000f00000300"
            }],
            "account_members": [{
              "id": "c8c1c511-beef-4812-9b7a-9f92c587217c",
              "type": "account_member",
              "name": "John Smith",
              "email": "john@smith.com"
            }]
          }
        }
    }
    

    • with_tax and without_tax should be integers without currency decimals, so a value of 10000 would be equivalent to $100.00.
    • product_id and product_sku match orders where matching product has been ordered (but they cannot have been the only ordered items).
    • eq shouldn’t be used with dates; instead, use a range (gt and lt) if you want orders for a specific day. Filtering on exact timestamps is not supported.
    • A request containing filters must not exceed 8KB.

    Payments

    After an order is created, it is marked unpaid. See Paying for an order for how you can mark this order as paid.

    Previous
    Overview