GET

List Workflows

Retrieve all configured workflows with their associated statuses and settings.

Endpoint

HTTP Request
GET /v1/workflows

Authentication

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

Response

Returns a JSON object with the list of workflows:
200 OK - Success Response
{
  "success": true,
  "data": {
    "workflows": [
      {
        "id": "string",
        "name": "string",
        "description": null,
        "color": "string",
        "order": 0,
        "statuses": [
          {
            "id": "string",
            "name": "string",
            "public_name": null,
            "use_public_name": true,
            "display_name": "string",
            "color": "string",
            "order": 0,
            "is_independent": true,
            "is_addon": true
          }
        ],
        "status_count": 0
      }
    ],
    "workflows_enabled": true,
    "enforce_workflow_order": true,
    "summary": {
      "total": 0,
      "total_statuses": 0
    }
  }
}

Response Fields

Root Response Object

FieldTypeDescription
successbooleanAlways true on a successful response.
dataobjectThe endpoint's payload. Its fields are listed in the tables below.
workflowsarrayArray of workflow objects
workflows_enabledbooleanWhether multi-workflow mode is active
enforce_workflow_orderbooleanWhether workflow order enforcement is active. When true, orders must progress through workflows in sequence and cannot move backwards.
summaryobjectSummary information including totals

Workflow Object Fields

FieldTypeDescription
idstringUnique identifier for the workflow
namestringDisplay name of the workflow
descriptionstring | nullOptional description of the workflow's purpose
colorstringHex color code for UI display
ordernumberDisplay order position (ascending)
statusesarrayArray of status objects assigned to this workflow (ordered by order ascending)
status_countnumberNumber of statuses in this workflow

Status Object Fields (within workflow)

FieldTypeDescription
idstringUUID of the status
namestringInternal name of the status
public_namestring | nullCustomer-facing name
use_public_namebooleanWhether to use public name for customers
display_namestringComputed display name (public_name if use_public_name is true, otherwise name)
colorstringHex color code for the status
ordernumberDisplay order in workflow
is_independentbooleanWhether status can be used independently of workflow
is_addonbooleanWhether this status is an addon status

Summary Object Fields

FieldTypeDescription
totalnumberTotal number of workflows
total_statusesnumberTotal number of statuses across all workflows

Examples

Basic Request

cURL Request
curl -X GET "https://api.ultimate-custom-order-status.apps.msmtech.ca/api/v1/workflows" \
  -H "X-API-Key: ucos_live_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
  -H "X-API-Version: 1.3"

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

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

500 Internal Server Error

Server error occurred

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