/orders/search

Search for orders by specified parameters.

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

Request body parameters

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

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
shipping_descriptionstringShipping method description
shipping_pricedecimalPrice of shipping
taxdecimalTax paid
cart_pricedecimalSum of all items' prices
totaldecimalTotal amount of the order
ipstringIP used to make the order
customer_ididID of the customer
payment_methodstringe.g. Visa, MasterCard, PayPal
last4stringLast 4 digits of the card used, if applicable
ip_failboolWhether the IP fraud check failed
address_failboolWhether the address fraud check failed
zip_failboolWhether the zip fraud check failed
cvc_failboolWhether the CVC fraud check failed
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

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
    },