/orders

Loads a list of orders or information on a single order.

URL parameters

Parameters that you can append to the URL, for example: ?parameter=value

TitleTypeDescriptionRequired?
idintID of a single orders to load. Can be used after the slash.
Example:
orders/27
load order with ID 27
No
pageintNumber of the page to load. Defaults to 1No
sortstringOne or more attributes to sort the items by. Defaults to id descending.
For descending, add ! before the attribute name. For multiple attributes, separate them by commas.
Example:
orders?sort=!id,title
sort by descending id first, then by ascending email
No
sizeintNumber of items per page. Defaults to 20No

Response attributes

Attributes that you will receive in response from the endpoint in JSON format, for example:
{"id": 1,"title": "Order"}

TitleTypeDescription
idintID of the order, same as the order number. Example: 4041
display_numberstringOrder number together with the display prefix/suffix. Example: CH-4041
emailstringEmail of the customer
statusintFulfilment status. Can be:
0 - Not sent to fulfilment
1 - Partially sent to fulfilment
2 - Partially sent to fulfilment and shipped
3 - Sent to fulfilment
4 - Partially shipped
5 - Shipped
paidintPayment status. Can be:
0 - Not paid
1 - Paid
-1 - Partially refunded
-2 - Fully refunded
discountsobjectDiscounts related to the order
shippingarrayShipping details of the order
shipping.descriptionstringShipping method description
shipping.pricedecimalPrice of shipping
taxdecimalTax paid
totaldecimalTotal amount of the order
ipstringIP used to make the order
itemsobjectItems ordered
items.dataarrayInstance of LineItems
items.statusarrayFulfilment status of the item
Includes counter fields:
quantity
not_fulfilled
fulfilled
shipped
restocked
fulfilmentsobjectArray of Fulfilments for the order
shipmentsobjectArray of Shipments for the order
restocksobjectArray of Restocks for the order
customerarrayData about the customer that made the order
Includes fields:
id
email
first_name
last_name
addressarrayInstance of Addresses
paymentarrayPayment info
Includes fields:
type (e.g. Visa, MasterCard, PayPal)
last4 (last 4 digits of the card, if applicable)
conversionarrayConversion info
Includes fields:
landing_page
referrer
risk_levelarrayInfo on fraud risk level
Includes boolean fields:
ip_fail
address_fail
zip_fail
cvc_fail
True values indicate greater risk.
refundeddecimalAmount refunded
refund_possibleboolIf refunding this order is still possible
order_datetimestampTimestamp of when the order was made
updated_attimestampWhen the order was updated, if at all
notesstringField to put optional info in

Loading page number

If you need to load the page number that the order is on using the order ID, you can use this request:

GET https://mystore.commercehq.com/api/v1/orders/1400/page
GET https://mystore.commercehq.com/api/v1/orders/1400
{
      "id": 4041,
      "display_number": "RH4041",
      "email": "[email protected]",
      "status": 0,
      "paid": 1,
      "discounts": [],
      "shipping": {
        "description": "Super fast shipping",
        "price": "7.95"
      },
      "tax": 0,
      "total": 21.89,
      "ip": "::1",
      "items": [
        {
          "data": {
            "id": 9550,
            "product_id": 47,
            "title": "Amazing necklace",
            "is_multi": true,
            "type": "Necklace",
            "is_giftcard": false,
            "shipping_weight": 2,
            "vendor": null,
            "auto_fulfilment": false,
            "track_inventory": false,
            "sku": "0170301",
            "price": 13.94,
            "compare_price": 46.5,
            "image": null,
            "image_max_size": 8,
            "variant": {
              "id": 36,
              "variant": [
                "Purple"
              ]
            }
          },
          "status": {
            "quantity": 1,
            "not_fulfilled": 1,
            "fulfilled": 0,
            "shipped": 0,
            "restocked": 0
          }
        }
      ],
      "fulfilments": [],
      "shipments": [],
      "restocks": [],
      "customer": {
        "id": 2819,
        "email": "[email protected]",
        "first_name": "Jack",
        "last_name": "Black"
      },
      "address": {
        "shipping": {
          "first_name": "Jack",
          "last_name": "Black",
          "company": null,
          "street": "Grove str.",
          "suite": null,
          "city": "Los Santos",
          "country": "US",
          "state": "San Andreas",
          "zip": "90250"
        },
        "billing": {
          "first_name": "Jack",
          "last_name": "Black",
          "company": null,
          "street": "Long str.",
          "suite": null,
          "city": "Los Santos",
          "country": "US",
          "state": "San Andreas",
          "zip": "90250"
        },
        "phone": null
      },
      "payment": {
        "type": "Visa",
        "last4": "4242"
      },
      "conversion": {
        "landing_page": "http://dummy-client.com/product/amazing-necklace",
        "referrer": "dummy-client.com"
      },
      "risk_level": {
        "ip_fail": false,
        "address_fail": false,
        "zip_fail": false,
        "cvc_fail": false
      },
      "refunded": 0,
      "refund_possible": true,
      "order_date": 1494594582,
      "updated_at": null,
      "notes": null
    },