Skip to content
GET

List orders

Retrieve a paginated list of orders with filtering, sorting, and search capabilities.

GET/v1/orders

Authentication

This endpoint requires a valid API key with canViewOrders permission. The API key must be passed in the X-API-Key header.
Required header
X-API-Key: ucos_live_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Query parameters

ParameterDescription
pageinteger · Optional, default 1Page number for pagination
limitinteger · Optional, default 25Results per page (max: 250)
statusstring · OptionalFilter by custom status ID
searchstring · OptionalSearch in order name, customer name, company, or email
order_idsstring · OptionalComma-separated list of order IDs; repeating order_ids (order_ids=a&order_ids=b) also works, at every version since the 1.6 release. By default, expects internal UUIDs. When use_shopify_order_id is true, provide the numeric portion of Shopify's order GID (e.g., for 'gid://shopify/Order/450789469', use '450789469')
use_shopify_order_idboolean · Optional, default falseSet to 'true' to use Shopify order IDs instead of internal UUIDs. Extract the number from Shopify's GID format (gid://shopify/Order/450789469 → 450789469) and pass it in order_ids
sort_bystring · Optional, default created_atField to sort by: 'created_at' or 'name'
sort_orderstring · Optional, default descSort direction: 'asc' or 'desc'

Response

Returns a JSON object with the following structure:
200 OK, success response
{
  "success": true,
  "data": {
    "orders": [
      {
        "id": "string",
        "shopify_order_id": "string",
        "name": "string",
        "created_at": "string",
        "custom_status": {
          "id": "string",
          "name": "string",
          "color": "string"
        },
        "custom_sub_status": {
          "id": "string",
          "name": "string"
        },
        "customer": {
          "first_name": "string",
          "last_name": "string",
          "email": "string",
          "phone": "string"
        },
        "shipping_address": {
          "company": "string",
          "address1": "string",
          "address2": "string",
          "city": "string",
          "province": "string",
          "zip": "string",
          "country": "string",
          "latitude": "string",
          "longitude": "string"
        },
        "total_price": "string",
        "currency": "string",
        "line_items": [
          {
            "id": "string",
            "shopify_line_item_id": "string",
            "name": "string",
            "quantity": 0,
            "title": "string",
            "variant_title": "string",
            "sku": "string",
            "shopify_product_id": null,
            "shopify_variant_id": null,
            "custom_status": null,
            "custom_sub_status": null
          }
        ],
        "note": "string",
        "cancelled": true,
        "cancelled_at": null
      }
    ],
    "pagination": {
      "page": 0,
      "limit": 0,
      "total_count": 0,
      "total_pages": 0,
      "has_next_page": true,
      "has_previous_page": true
    }
  }
}

Response fields

Root response object

FieldDescription
successbooleanAlways true on a successful response.
dataobjectThe endpoint's payload. Its fields are listed in the tables below.
ordersarrayArray of order objects
paginationobjectPagination information

Order object

FieldDescription
idstringUnique identifier for the order (UUID)
shopify_order_idstringShopify's global ID for the order
namestringOrder number (e.g., #1001)
created_atstring | nullISO 8601 timestamp when order was created in Shopify
custom_statusobjectCustom status information
custom_sub_statusobjectCustom sub-status information
customerobjectCustomer information
shipping_addressobjectShipping address information
total_pricestring | nullTotal order price
currencystring | nullCurrency code (e.g., USD, CAD)
line_itemsarrayArray of line item objects
notestring | nullOrder note/comments
cancelledbooleanWhether the order is cancelled
cancelled_atstring | nullISO 8601 timestamp when order was cancelled

Status object fields

FieldDescription
idstringUnique identifier for the custom status
namestringDisplay name of the status (uses public name if configured)
colorstringHex color code for the status

Sub-status object

FieldDescription
idstringUnique identifier for the sub-status
namestringName of the sub-status

Customer object fields

FieldDescription
first_namestring | nullCustomer's first name
last_namestring | nullCustomer's last name
emailstring | nullCustomer's email address
phonestring | nullCustomer's phone number

Shipping address object fields

FieldDescription
companystring | nullCompany name
address1string | nullPrimary address line
address2string | nullSecondary address line
citystring | nullCity name
provincestring | nullState/Province code
zipstring | nullPostal/ZIP code
countrystring | nullCountry name
latitudestring | nullLatitude coordinate
longitudestring | nullLongitude coordinate

Line item object fields

FieldDescription
idstringUnique identifier for the line item
shopify_line_item_idstringShopify's global ID for the line item
namestringProduct name
quantitynumberQuantity ordered
titlestring | nullProduct title
variant_titlestring | nullVariant title, or null
skustring | nullSKU, or null
shopify_product_idstring | nullShopify product GID, or null
shopify_variant_idstring | nullShopify variant GID, or null
custom_statusnullCurrent status object, or null.
custom_sub_statusnullCurrent sub-status object, or null.

Pagination object fields

FieldDescription
pagenumberCurrent page number
limitnumberResults per page
total_countnumberTotal number of orders matching the query
total_pagesnumberTotal number of pages
has_next_pagebooleanWhether there is a next page
has_previous_pagebooleanWhether there is a previous page

Examples

Basic request

Request with cURL
curl -X GET "https://api.ultimate-custom-order-status.apps.msmtech.ca/api/v1/orders?page=1&limit=25&use_shopify_order_id=false&sort_by=created_at&sort_order=desc" \
  -H "X-API-Key: ucos_live_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
  -H "X-API-Version: 1.0"

Filter by status

Request with cURL
curl -X GET "https://api.ultimate-custom-order-status.apps.msmtech.ca/api/v1/orders?status=abc123&sort_by=created_at&sort_order=desc" \
  -H "X-API-Key: ucos_live_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
  -H "X-API-Version: 1.0"

Get specific orders by UUID

Request with cURL
curl -X GET "https://api.ultimate-custom-order-status.apps.msmtech.ca/api/v1/orders?order_ids=uuid1,uuid2,uuid3" \
  -H "X-API-Key: ucos_live_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
  -H "X-API-Version: 1.0"

Get specific orders by Shopify order ID

Request with cURL
curl -X GET "https://api.ultimate-custom-order-status.apps.msmtech.ca/api/v1/orders?order_ids=5460132438316,5460132438317&use_shopify_order_id=true" \
  -H "X-API-Key: ucos_live_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
  -H "X-API-Version: 1.0"

Search orders

Request with cURL
curl -X GET "https://api.ultimate-custom-order-status.apps.msmtech.ca/api/v1/orders?search=john@example.com&page=1&limit=50" \
  -H "X-API-Key: ucos_live_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
  -H "X-API-Version: 1.0"

Rate limiting

This endpoint is subject to per-minute and per-day rate limits based on your API key. Rate limit information is returned in the response headers:
  • X-RateLimit-Limit-Minute: Maximum requests per minute
  • X-RateLimit-Remaining-Minute: Remaining requests in current minute
  • X-RateLimit-Reset-Minute: Unix timestamp when minute window resets
  • X-RateLimit-Limit-Day: Maximum requests per day
  • X-RateLimit-Remaining-Day: Remaining requests in current day
  • X-RateLimit-Reset-Day: Unix timestamp when day window resets
  • Retry-After: Seconds to wait before retrying (when rate limited)

Error responses

400 Bad Request

Invalid query parameters

400 Bad Request
{
  "success": false,
  "error": "Validation failed",
  "details": {
    "errors": [
      {
        "code": "invalid_type",
        "expected": "string",
        "received": "undefined",
        "path": [
          "status_id"
        ],
        "message": "Required"
      }
    ]
  }
}

401 Unauthorized

Missing or invalid API key

401 Unauthorized
{
  "success": false,
  "error": "Missing API key. Include it in the X-API-Key header"
}

403 Forbidden

API key lacks required permissions

403 Forbidden
{
  "success": false,
  "error": "Insufficient permissions. Required: canViewOrders"
}

500 Internal Server Error

Server error occurred

500 Internal Server Error
{
  "success": false,
  "error": "Internal server error",
  "details": {
    "message": "An unexpected error occurred"
  }
}