API Documentation

Define how products move through your process

Standalone workflow entities with lifecycle states and transitions. Gate transitions on completeness scores and role permissions. Attach a workflow to any schema to control how products progress from draft to published.

Draft Review Published

Lifecycle States

Each state defines which attributes are hidden, required, or readOnly. States have a color for visual identification in the UI.

Transitions

Transitions define valid movements between states. Each transition can gate on allowedRoleIds and requiresCompleteness (0–100).

Schema Binding

Attach a workflow to a schema via schema.workflowId. All records of that schema will follow the workflow's state machine.

Delete Protection

Workflows referenced by schemas cannot be deleted. Remove the schema binding first, then delete the workflow.

Endpoints

MethodPathDescription
GET/workflowsList all workflows
POST/workflowsCreate a workflow
GET/workflows/:idGet workflow by ID
PUT/workflows/:idUpdate a workflow
DELETE/workflows/:idDelete a workflow
GET /workflows

Returns all workflows with their states and transitions.

curl https://api.sigma-pim.com/api/v1/workflows \ -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..."
// Response [ { "id": "wf-product-lifecycle", "alias": "product-lifecycle", "name": "Product Lifecycle", "description": "Standard product review and publishing flow", "defaultStateId": "state-draft", "states": [ /* ... */ ], "transitions": [ /* ... */ ] } ]
POST /workflows

Create a new workflow with lifecycle states and transitions. Each state can control attribute visibility and editability. Each transition can gate on roles and completeness.

Request Body
FieldTypeDescription
idstringUnique identifier for the workflow
aliasstringURL-friendly alias
namestringDisplay name
descriptionstring?Optional description
defaultStateIdstringID of the initial state for new records
statesState[]Array of lifecycle state objects
states[].idstringUnique state identifier
states[].aliasstringState alias
states[].namestringState display name
states[].colorstringHex color for UI display
states[].hiddenAttributeIdsstring[]Attributes hidden in this state
states[].requiredAttributeIdsstring[]Attributes required in this state
states[].readOnlyAttributeIdsstring[]Attributes locked in this state
transitionsTransition[]Array of transition objects
transitions[].idstringUnique transition identifier
transitions[].fromStateIdstringSource state ID
transitions[].toStateIdstringTarget state ID
transitions[].namestringTransition display name
transitions[].allowedRoleIdsstring[]Roles allowed to perform this transition
transitions[].requiresCompletenessnumberMinimum completeness score (0–100) to transition
curl -X POST https://api.sigma-pim.com/api/v1/workflows \ -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..." \ -H "Content-Type: application/json" \ -d '{ "id": "wf-product-lifecycle", "alias": "product-lifecycle", "name": "Product Lifecycle", "description": "Standard product review and publishing flow", "defaultStateId": "state-draft", "states": [ { "id": "state-draft", "alias": "draft", "name": "Draft", "color": "#9ca3af", "hiddenAttributeIds": [], "requiredAttributeIds": [], "readOnlyAttributeIds": [] }, { "id": "state-review", "alias": "review", "name": "Review", "color": "#3b82f6", "hiddenAttributeIds": [], "requiredAttributeIds": ["attr-sku", "attr-product-name"], "readOnlyAttributeIds": ["attr-sku"] }, { "id": "state-published", "alias": "published", "name": "Published", "color": "#22c55e", "hiddenAttributeIds": [], "requiredAttributeIds": ["attr-sku", "attr-product-name", "attr-price"], "readOnlyAttributeIds": ["attr-sku", "attr-product-name", "attr-price"] } ], "transitions": [ { "id": "tr-submit", "fromStateId": "state-draft", "toStateId": "state-review", "name": "Submit for Review", "allowedRoleIds": ["role-editor", "role-admin"], "requiresCompleteness": 0 }, { "id": "tr-approve", "fromStateId": "state-review", "toStateId": "state-published", "name": "Approve", "allowedRoleIds": ["role-admin"], "requiresCompleteness": 80 }, { "id": "tr-reject", "fromStateId": "state-review", "toStateId": "state-draft", "name": "Reject", "allowedRoleIds": ["role-admin"], "requiresCompleteness": 0 } ] }'
// Response — 201 Created { "id": "wf-product-lifecycle", "alias": "product-lifecycle", "name": "Product Lifecycle", "description": "Standard product review and publishing flow", "defaultStateId": "state-draft", "states": [ { "id": "state-draft", "alias": "draft", "name": "Draft", "color": "#9ca3af", "hiddenAttributeIds": [], "requiredAttributeIds": [], "readOnlyAttributeIds": [] }, { "id": "state-review", "alias": "review", "name": "Review", "color": "#3b82f6", "hiddenAttributeIds": [], "requiredAttributeIds": ["attr-sku", "attr-product-name"], "readOnlyAttributeIds": ["attr-sku"] }, { "id": "state-published", "alias": "published", "name": "Published", "color": "#22c55e", "hiddenAttributeIds": [], "requiredAttributeIds": ["attr-sku", "attr-product-name", "attr-price"], "readOnlyAttributeIds": ["attr-sku", "attr-product-name", "attr-price"] } ], "transitions": [ { "id": "tr-submit", "fromStateId": "state-draft", "toStateId": "state-review", "name": "Submit for Review", "allowedRoleIds": ["role-editor", "role-admin"], "requiresCompleteness": 0 }, { "id": "tr-approve", "fromStateId": "state-review", "toStateId": "state-published", "name": "Approve", "allowedRoleIds": ["role-admin"], "requiresCompleteness": 80 }, { "id": "tr-reject", "fromStateId": "state-review", "toStateId": "state-draft", "name": "Reject", "allowedRoleIds": ["role-admin"], "requiresCompleteness": 0 } ] }
GET /workflows/:id

Retrieve a single workflow by its ID, including all states and transitions.

Path Parameters
ParameterTypeDescription
idstringThe workflow ID (e.g. wf-product-lifecycle)
curl https://api.sigma-pim.com/api/v1/workflows/wf-product-lifecycle \ -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..."
// Response — full workflow object (same shape as POST response above) { "id": "wf-product-lifecycle", "alias": "product-lifecycle", "name": "Product Lifecycle", "description": "Standard product review and publishing flow", "defaultStateId": "state-draft", "states": [ { "id": "state-draft", "alias": "draft", "name": "Draft", "color": "#9ca3af", /* ... */ }, { "id": "state-review", "alias": "review", "name": "Review", "color": "#3b82f6", /* ... */ }, { "id": "state-published", "alias": "published", "name": "Published", "color": "#22c55e", /* ... */ } ], "transitions": [ { "id": "tr-submit", "name": "Submit for Review", /* ... */ }, { "id": "tr-approve", "name": "Approve", "requiresCompleteness": 80, /* ... */ }, { "id": "tr-reject", "name": "Reject", /* ... */ } ] }
PUT /workflows/:id

Update a workflow. Provide the full workflow object with updated states and transitions. Changes take effect for all schemas bound to this workflow.

curl -X PUT https://api.sigma-pim.com/api/v1/workflows/wf-product-lifecycle \ -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..." \ -H "Content-Type: application/json" \ -d '{ "id": "wf-product-lifecycle", "alias": "product-lifecycle", "name": "Product Lifecycle", "description": "Updated flow with archival step", "defaultStateId": "state-draft", "states": [ { "id": "state-draft", "alias": "draft", "name": "Draft", "color": "#9ca3af", "hiddenAttributeIds": [], "requiredAttributeIds": [], "readOnlyAttributeIds": [] }, { "id": "state-review", "alias": "review", "name": "Review", "color": "#3b82f6", "hiddenAttributeIds": [], "requiredAttributeIds": ["attr-sku"], "readOnlyAttributeIds": ["attr-sku"] }, { "id": "state-published", "alias": "published", "name": "Published", "color": "#22c55e", "hiddenAttributeIds": [], "requiredAttributeIds": ["attr-sku", "attr-price"], "readOnlyAttributeIds": ["attr-sku", "attr-price"] }, { "id": "state-archived", "alias": "archived", "name": "Archived", "color": "#6b7280", "hiddenAttributeIds": [], "requiredAttributeIds": [], "readOnlyAttributeIds": [] } ], "transitions": [ { "id": "tr-submit", "fromStateId": "state-draft", "toStateId": "state-review", "name": "Submit for Review", "allowedRoleIds": ["role-editor", "role-admin"], "requiresCompleteness": 0 }, { "id": "tr-approve", "fromStateId": "state-review", "toStateId": "state-published", "name": "Approve", "allowedRoleIds": ["role-admin"], "requiresCompleteness": 80 }, { "id": "tr-reject", "fromStateId": "state-review", "toStateId": "state-draft", "name": "Reject", "allowedRoleIds": ["role-admin"], "requiresCompleteness": 0 }, { "id": "tr-archive", "fromStateId": "state-published", "toStateId": "state-archived", "name": "Archive", "allowedRoleIds": ["role-admin"], "requiresCompleteness": 0 } ] }'
DELETE /workflows/:id

Delete a workflow. Returns { "deleted": true } on success. Protected: will return an error if the workflow is referenced by any schema.

curl -X DELETE https://api.sigma-pim.com/api/v1/workflows/wf-product-lifecycle \ -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..."
// Response — 200 OK { "deleted": true }
// Error — workflow is referenced by a schema { "error": "WORKFLOW_IN_USE", "message": "Cannot delete workflow 'wf-product-lifecycle' — it is referenced by schema 'schema-apparel'" }