Skip to Content
API ReferenceCondition Sets

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

GET/api/v1/condition-sets

List all condition sets for the organization.

Requireddispatchers:read

Returns a paginated list of condition sets ordered by name.

Query Parameters

ParameterTypeDescription
pagenumberPage number (default: 1)
limitnumberItems 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

GET/api/v1/condition-sets/:id

Get a single condition set by ID.

Requireddispatchers:read

Returns the metadata for a specific condition set. Use the Get Values endpoint to retrieve the actual values.

Path Parameters

ParameterTypeDescription
idstringCondition 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

POST/api/v1/condition-sets

Create a new condition set.

Requireddispatchers:write

Creates a new condition set. After creation, use the Add Values endpoint to populate it.

Request Body

FieldTypeRequiredDescription
namestringYesDisplay name (must be unique within the organization)
descriptionstringNoDescription of the set
valueTypestringYesType 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

PATCH/api/v1/condition-sets/:id

Update a condition set's name or description.

Requireddispatchers:write

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

DELETE/api/v1/condition-sets/:id

Delete a condition set.

Requireddispatchers:write

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

GET/api/v1/condition-sets/:id/values

Get the values in a condition set (paginated).

Requireddispatchers:read

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

ParameterTypeDescription
idstringCondition set UUID

Query Parameters

ParameterTypeDescription
pagenumberPage number (default: 1)
limitnumberItems 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

POST/api/v1/condition-sets/:id/values

Add values to a condition set in bulk.

Requireddispatchers:write

Adds one or more values to a condition set. Duplicate values (same value string within the same set) are silently ignored.

Path Parameters

ParameterTypeDescription
idstringCondition set UUID

Request Body

FieldTypeRequiredDescription
valuesobject[]YesArray of value objects
values[].valuestringYesThe value to store
values[].labelstringNoOptional 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

DELETE/api/v1/condition-sets/:id/values

Remove specific values from a condition set.

Requireddispatchers:write

Removes one or more values from a condition set by their value strings.

Path Parameters

ParameterTypeDescription
idstringCondition set UUID

Request Body

FieldTypeRequiredDescription
valuesstring[]YesArray 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

DELETE/api/v1/condition-sets/:id/values/all

Remove all values from a condition set.

Requireddispatchers:write

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 }