Condition Sets
Condition sets store large lists of values (e.g., 70,000 zip codes, SKU lists) for use in dispatcher conditions and split rule evaluation. Instead of inlining thousands of values into a condition, reference a condition set by ID.
List Condition Sets
/api/v1/condition-setsList all condition sets for the organization.
Returns a paginated list of condition sets ordered by name.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
page | number | Page number (default: 1) |
limit | number | Items per page (default: 20, max: 100) |
curl -X GET "https://api.orderly-hub.com/api/v1/condition-sets" \
-H "Authorization: Bearer oh_..."Response
{
"data": [
{
"id": "uuid",
"organizationId": "uuid",
"name": "Northeast Zip Codes",
"description": "All zip codes in the northeast region",
"valueType": "string",
"valueCount": 12450,
"createdAt": "2026-01-01T00:00:00Z",
"updatedAt": "2026-03-10T08:00:00Z"
}
],
"pagination": { "page": 1, "limit": 20, "total": 4, "totalPages": 1, "hasMore": false }
}Get Condition Set
/api/v1/condition-sets/:idGet a single condition set by ID.
Returns the metadata for a specific condition set. Use the Get Values endpoint to retrieve the actual values.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | Condition set UUID |
curl -X GET "https://api.orderly-hub.com/api/v1/condition-sets/550e8400-e29b-41d4-a716-446655440000" \
-H "Authorization: Bearer oh_..."Response
{
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"organizationId": "uuid",
"name": "Northeast Zip Codes",
"description": "All zip codes in the northeast region",
"valueType": "string",
"valueCount": 12450,
"createdAt": "2026-01-01T00:00:00Z",
"updatedAt": "2026-03-10T08:00:00Z"
}
}Create Condition Set
/api/v1/condition-setsCreate a new condition set.
Creates a new condition set. After creation, use the Add Values endpoint to populate it.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Display name (must be unique within the organization) |
description | string | No | Description of the set |
valueType | string | Yes | Type of stored values: string, number, boolean |
curl -X POST "https://api.orderly-hub.com/api/v1/condition-sets" \
-H "Authorization: Bearer oh_..." \
-H "Content-Type: application/json" \
-d '{
"name": "Northeast Zip Codes",
"description": "All zip codes in the northeast region",
"valueType": "string"
}'Response (201)
{
"data": {
"id": "uuid",
"organizationId": "uuid",
"name": "Northeast Zip Codes",
"description": "All zip codes in the northeast region",
"valueType": "string",
"valueCount": 0,
"createdAt": "2026-01-01T00:00:00Z",
"updatedAt": "2026-01-01T00:00:00Z"
}
}Update Condition Set
/api/v1/condition-sets/:idUpdate a condition set's name or description.
Updates the metadata of a condition set. To modify the values, use the values endpoints below.
curl -X PATCH "https://api.orderly-hub.com/api/v1/condition-sets/550e8400-e29b-41d4-a716-446655440000" \
-H "Authorization: Bearer oh_..." \
-H "Content-Type: application/json" \
-d '{
"name": "Northeast Zip Codes (Updated)",
"description": "All zip codes in the northeast and mid-atlantic regions"
}'Delete Condition Set
/api/v1/condition-sets/:idDelete a condition set.
Permanently deletes a condition set and all its values. This will fail with 409 if any dispatchers are currently referencing this set. Remove or reassign dispatchers first.
curl -X DELETE "https://api.orderly-hub.com/api/v1/condition-sets/550e8400-e29b-41d4-a716-446655440000" \
-H "Authorization: Bearer oh_..."Response
{
"success": true
}Get Values
/api/v1/condition-sets/:id/valuesGet the values in a condition set (paginated).
Returns a paginated list of values stored in a condition set, ordered alphabetically. Supports up to 1,000 items per page for bulk retrieval.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | Condition set UUID |
Query Parameters
| Parameter | Type | Description |
|---|---|---|
page | number | Page number (default: 1) |
limit | number | Items per page (default: 100, max: 1000) |
curl -X GET "https://api.orderly-hub.com/api/v1/condition-sets/550e8400-e29b-41d4-a716-446655440000/values?limit=500" \
-H "Authorization: Bearer oh_..."Response
{
"data": [
{ "id": "uuid", "condition_set_id": "uuid", "value": "06001", "label": "Hartford, CT" },
{ "id": "uuid", "condition_set_id": "uuid", "value": "06002", "label": "Bloomfield, CT" },
{ "id": "uuid", "condition_set_id": "uuid", "value": "06010", "label": "Bristol, CT" }
],
"pagination": { "page": 1, "limit": 500, "total": 12450, "totalPages": 25, "hasMore": true }
}Add Values
/api/v1/condition-sets/:id/valuesAdd values to a condition set in bulk.
Adds one or more values to a condition set. Duplicate values (same value string within the same set) are silently ignored.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | Condition set UUID |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
values | object[] | Yes | Array of value objects |
values[].value | string | Yes | The value to store |
values[].label | string | No | Optional human-readable label |
curl -X POST "https://api.orderly-hub.com/api/v1/condition-sets/550e8400-e29b-41d4-a716-446655440000/values" \
-H "Authorization: Bearer oh_..." \
-H "Content-Type: application/json" \
-d '{
"values": [
{ "value": "06001", "label": "Hartford, CT" },
{ "value": "06002", "label": "Bloomfield, CT" },
{ "value": "06010", "label": "Bristol, CT" }
]
}'Response
{
"success": true,
"added": 3
}Remove Values
/api/v1/condition-sets/:id/valuesRemove specific values from a condition set.
Removes one or more values from a condition set by their value strings.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | Condition set UUID |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
values | string[] | Yes | Array of value strings to remove |
curl -X DELETE "https://api.orderly-hub.com/api/v1/condition-sets/550e8400-e29b-41d4-a716-446655440000/values" \
-H "Authorization: Bearer oh_..." \
-H "Content-Type: application/json" \
-d '{
"values": ["06001", "06002"]
}'Response
{
"success": true,
"removed": 2
}Clear All Values
/api/v1/condition-sets/:id/values/allRemove all values from a condition set.
Removes every value from a condition set, resetting it to empty. The condition set itself is preserved.
curl -X DELETE "https://api.orderly-hub.com/api/v1/condition-sets/550e8400-e29b-41d4-a716-446655440000/values/all" \
-H "Authorization: Bearer oh_..."Response
{
"success": true
}