Orders

List orders

Retrieves information about all orders. Orders can be filtered by Customer ID and date ranges. The response contains order information in an Order, up to 50 Orders ordered by their modification date (modifiedOn), and supports dynamic cursors for pagination.

get/1.0/commerce/orders

Request

Query parameters

customerIdstring

Used to filter Orders by Customer ID.

modifiedAfterstring

Time-boxes the request to Orders that were modified after a given ISO 8601 UTC date and time string (YYYY-MM-DDThh:mm:ss.sZ). Required when modifiedBefore is passed; cannot be used with cursor.

modifiedBeforestring

Time-boxes the request to Orders that were modified before a given ISO 8601 UTC date and time string (YYYY-MM-DDThh:mm:ss.sZ). Required when modifiedAfter is passed; cannot be used with cursor.

cursorstring

Identifies where the next page of results should begin. Should be the value of pagination.nextPageCursor from a previous response. Cannot be used with other parameters.

fulfillmentStatusstring

Used to filter Orders by fulfillment status. Values may be PENDING, FULFILLED, or CANCELED.

paymentStatesstring

Used to filter Orders by payment state. Accepts a comma-separated list of values. Possible values are: NOT_CHARGED, AUTHORIZED, PAID, REFUNDED, PENDING, FAILED, REFUND_PENDING, REFUND_FAILED, PARTIALLY_PAID. If not specified, defaults to NOT_CHARGED, AUTHORIZED, PAID, and REFUNDED.

Headers

Authorizationstring required

API key or OAuth access token

User-Agentstring required

User Agent

Response

A paginated list of orders.

Example response

{
  "pagination": {
    "hasNextPage": true,
    "nextPageCursor": "ewogICJhIiA6ICI2OWNhOWExZjgxNGMwYTY0MmIwMTIzYzkiLAogICJiIiA6ICJJRCIKfQ",
    "nextPageUrl": "/1.0/commerce/orders?cursor=ewogICJhIiA6ICI2OWNhOWExZjgxNGMwYTY0MmIwMTIzYzkiLAogICJiIiA6ICJJRCIKfQ"
  },
  "result": [
    {
      "billingAddress": {
        "address1": "459 Broadway",
        "city": "New York",
        "countryCode": "US",
        "firstName": "Bob",
        "lastName": "Loblaw",
        "phone": "5553334444",
        "postalCode": "10003",
        "state": "NY"
      },
      "channel": "web",
      "channelName": "Faire Wholesale",
      "createdOn": "2016-12-23T15:58:07.187Z",
      "customerEmail": "foo@example.com",
      "customerId": "585d498fdee9f31a60284a38",
      "discountLines": [
        {
          "amount": {
            "value": 49.99
          },
          "description": "20% off all orders over $50",
          "name": "Summer Sale - 20% Off",
          "promoCode": "SUMMER20"
        }
      ],
      "discountTotal": {
        "value": 49.99
      },
      "externalOrderReference": "EXT-98765",
      "formSubmission": [
        {
          "label": "How did you hear about us?",
          "value": "Facebook"
        }
      ],
      "fulfillments": [
        {
          "carrierName": "FedEx",
          "service": "Same-Day Delivery",
          "shipDate": "2017-01-29T22:19:26.98Z",
          "trackingNumber": "103932814692659",
          "trackingUrl": "https://www.fedex.com/apps/fedextrack/?tracknumbers=103932814692659"
        }
      ],
      "grandTotal": {
        "value": 49.99
      },
      "id": "585d498fdee9f31a60284a37",
      "internalNotes": [
        {
          "content": "First note"
        }
      ],
      "lineItems": [
        {
          "customizations": [
            {
              "label": "How did you hear about us?",
              "value": "Facebook"
            }
          ],
          "height": 4,
          "id": "585d4975dee9f31a60284a16",
          "imageUrl": "https://static.squarespace.com/universal/commerce/images/brine-32oz-spring-mix-v2.jpg?format=300w",
          "length": 3,
          "lineItemType": "PHYSICAL_PRODUCT",
          "productId": "565c8f3da7c8a3cf71d5fd0a",
          "productName": "Product",
          "quantity": 1,
          "sku": "SQ3381024",
          "unitPricePaid": {
            "value": 49.99
          },
          "variantId": "88c16ee4-547b-445e-a392-bded9991ae30",
          "variantOptions": [
            {
              "optionName": "Size",
              "value": "Large"
            }
          ],
          "weight": 1,
          "width": 2
        }
      ],
      "modifiedOn": "2016-12-23T15:58:07.187Z",
      "orderNumber": "3",
      "priceTaxInterpretation": "EXCLUSIVE",
      "refundedTotal": {
        "value": 49.99
      },
      "shippingAddress": {
        "address1": "459 Broadway",
        "city": "New York",
        "countryCode": "US",
        "firstName": "Bob",
        "lastName": "Loblaw",
        "phone": "5553334444",
        "postalCode": "10003",
        "state": "NY"
      },
      "shippingLines": [
        {
          "amount": {
            "value": 49.99
          },
          "method": "UPS Ground"
        }
      ],
      "shippingTotal": {
        "value": 49.99
      },
      "subtotal": {
        "value": 49.99
      },
      "taxTotal": {
        "value": 49.99
      }
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.