/orders/search

Search for orders by specified parameters.

URL parameters

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

Title

Type

Description

Required?

id

int

ID of a single orders to load. Can be used after the slash.
Example:
orders/27
load order with ID 27

No

page

int

Number of the page to load. Defaults to 1

No

sort

string

One 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

size

int

Number of items per page. Defaults to 20

No

Request body parameters

Parameters that you can send in the request body in JSON format, for example:
{"email": "[email protected]","first_name": "James"}

Title

Type

Description

id

int

ID of the order, same as the order number. Example: 4041

display_number

string

Order number together with the display prefix/suffix. Example: CH-4041

email

string

Email of the customer

status

int

Fulfilment 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

paid

int

Payment status. Can be:
0 - Not paid
1 - Paid
-1 - Partially refunded
-2 - Fully refunded

shipping_description

string

Shipping method description

shipping_price

decimal

Price of shipping

tax

decimal

Tax paid

cart_price

decimal

Sum of all items' prices

total

decimal

Total amount of the order

ip

string

IP used to make the order

customer_id

id

ID of the customer

payment_method

string

e.g. Visa, MasterCard, PayPal

last4

string

Last 4 digits of the card used, if applicable

ip_fail

bool

Whether the IP fraud check failed

address_fail

bool

Whether the address fraud check failed

zip_fail

bool

Whether the zip fraud check failed

cvc_fail

bool

Whether the CVC fraud check failed

refunded

decimal

Amount refunded

refund_possible

bool

If refunding this order is still possible

order_date

timestamp

Timestamp of when the order was made

updated_at

timestamp

When the order was updated, if at all

notes

string

Field to put optional info in

Response

Returns an array of Order objects. Refer to Load orders

Find all orders where the name includes Andrew or Mike
POST https://mystore.commercehq.com/api/v1/orders/1400/search

{
    "full_name": ["Andrew", "Mike"]
}
{
      "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
    },