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: your_api_key_here

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
{
  "order": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "shopify_order_id": "gid://shopify/Order/123456789",
    "name": "#1001",
    "created_at": "2024-10-30T12:00:00Z",
    "custom_status": {
      "id": "status-uuid",
      "name": "Processing",
      "color": "#2948ff"
    },
    "custom_sub_status": {
      "id": "sub-status-uuid",
      "name": "Awaiting Parts"
    },
    "customer": {
      "first_name": "John",
      "last_name": "Doe",
      "email": "john@example.com",
      "phone": "+1234567890"
    },
    "shipping_address": {
      "company": "Acme Corp",
      "address1": "123 Main St",
      "address2": "Suite 100",
      "city": "New York",
      "province": "NY",
      "zip": "10001",
      "country": "United States",
      "latitude": "40.7128",
      "longitude": "-74.0060"
    },
    "total_price": "150.00",
    "currency": "USD",
    "line_items": [
      {
        "id": "line-item-uuid",
        "shopify_line_item_id": "gid://shopify/LineItem/123456789",
        "name": "Product Name",
        "quantity": 2
      }
    ],
    "note": "Please ship carefully",
    "cancelled": false,
    "cancelled_at": null
  }
}

Response Fields

Root Response Object

FieldTypeDescription
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_atstringISO 8601 timestamp when order was created in Shopify
custom_statusobjectCustom status information
custom_sub_statusobject | nullCustom sub-status information
customerobjectCustomer information
shipping_addressobjectShipping address information
total_pricestringTotal order price
currencystringCurrency 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

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_namestringCustomer's first name
last_namestringCustomer's last name
emailstringCustomer's email address
phonestring | nullCustomer's phone number

Shipping Address Object Fields

FieldTypeDescription
companystring | nullCompany name
address1stringPrimary address line
address2string | nullSecondary address line
citystringCity name
provincestringState/Province code
zipstringPostal/ZIP code
countrystringCountry 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

Examples

Basic Request (UUID)

cURL Request
curl -X GET "https://api.ultimate-custom-order-status.apps.msmtech.ca/api/v1/orders/550e8400-e29b-41d4-a716-446655440000" \
  -H "X-API-Key: your_api_key_here"

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: your_api_key_here"

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
{
  "error": "Invalid order ID format",
  "details": {
    "errors": [...]
  }
}

401 Unauthorized

Missing or invalid API key

401 Unauthorized
{
  "error": "Unauthorized"
}

403 Forbidden

API key lacks required permissions

403 Forbidden
{
  "error": "Insufficient permissions"
}

404 Not Found

Order not found or doesn't belong to this shop

404 Not Found
{
  "error": "Order not found",
  "details": {
    "orderId": "550e8400-e29b-41d4-a716-446655440000"
  }
}

500 Internal Server Error

Server error occurred

500 Internal Server Error
{
  "error": "Internal server error",
  "details": {
    "message": "Error description"
  }
}