GET

Get Order

Retrieve detailed information about a specific order by its ID.

Endpoint

HTTP Request
GET /v1/orders/:order_id

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

URL Parameters

ParameterTypeRequiredDescription
order_idstringYesOrder identifier (UUID by default, or Shopify order ID numeric portion if use_shopify_order_id query parameter is true). For Shopify order IDs, extract the number from the GID format (e.g., for 'gid://shopify/Order/450789469', use '450789469').

Query Parameters

ParameterTypeRequiredDefaultDescription
use_shopify_order_idbooleanNofalseSet to 'true' to look up order using Shopify order ID instead of UUID. Extract the number from Shopify's GID format (gid://shopify/Order/450789469 → 450789469) and use it in the order_id path parameter.

Response

Returns a JSON object with the order details:
200 OK - Success Response
{
  "success": true,
  "data": {
    "order": {
      "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": {
            "id": "string",
            "name": "string",
            "color": "string"
          },
          "custom_sub_status": {
            "id": "string",
            "name": "string"
          }
        }
      ],
      "note": "string",
      "cancelled": true,
      "cancelled_at": null,
      "addon_statuses": [
        {
          "id": "string",
          "name": "string",
          "display_name": "string",
          "color": "string",
          "sub_status": {
            "id": "string",
            "name": "string"
          },
          "assigned_at": "string"
        }
      ],
      "workflow_id": null,
      "workflow_name": null
    }
  }
}

Response Fields

Root Response Object

FieldTypeDescription
successbooleanAlways true on a successful response.
dataobjectThe endpoint's payload. Its fields are listed in the tables below.
orderobjectThe order object containing all order details

Order Object

FieldTypeDescription
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
addon_statusesarrayArray of addon status objects (v1.1+ only)
notestring | nullOrder note/comments
cancelledbooleanWhether the order is cancelled
cancelled_atstring | nullISO 8601 timestamp when order was cancelled
workflow_idstring | nullUUID of the workflow this order belongs to (v1.3+ only)
workflow_namestring | nullName of the workflow this order belongs to (v1.3+ only)

Status Object Fields

FieldTypeDescription
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

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

Customer Object Fields

FieldTypeDescription
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

FieldTypeDescription
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

FieldTypeDescription
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

Addon Status Object Fields

FieldTypeDescription
idstringUnique identifier for the addon status
namestringDisplay name of the addon status
display_namestringPublic display name of the addon status
assigned_atstringTimestamp when the addon status was assigned to the order
colorstringHex color code for the addon status
sub_statusobjectOptional sub-status for the addon

Addon Sub-Status Object

FieldTypeDescription
idstringUnique identifier for the addon sub-status
namestringName of the addon sub-status

Examples

Basic Request (UUID)

cURL Request
curl -X GET "https://api.ultimate-custom-order-status.apps.msmtech.ca/api/v1/orders/8c1d4e2f-0a53-49b7-b6e4-7f2d9c3a5e10" \
  -H "X-API-Key: ucos_live_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
  -H "X-API-Version: 1.5"

Using Shopify Order ID

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

Get Draft Order (v1.2+)

cURL Request
curl -X GET "https://api.ultimate-custom-order-status.apps.msmtech.ca/api/v1/orders/1234567890?use_shopify_order_id=true" \
  -H "X-API-Key: ucos_live_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
  -H "X-API-Version: 1.5"

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 order ID format

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

404 Not Found

Order not found or doesn't belong to this shop

404 Not Found
{
  "success": false,
  "error": "Order not found"
}

500 Internal Server Error

Server error occurred

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