curl --request POST \
--url 'https://api.workstream.stateset.com/v1/workflows/wholesale-order/start' \
--header "x-api-key: $STATESET_TEMPORAL_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"brand_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"partner_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"po_number": "ORD-10042",
"po_total_cents": 4900,
"currency": "USD",
"lines": [
{
"line_number": "string",
"sku": "SKU-TENT-2P-GRN",
"quantity": 2,
"unit_price_cents": 4900
}
],
"ship_to": {},
"requested_ship_date": "2026-08-31T14:22:05Z",
"review_cap_cents": 1,
"fulfillment_tool": "string",
"fulfillment_params": {}
}'
{
"workflow_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"run_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
Start wholesale order
Wholesale-order workflow started; id is wholesale-order-- so a redelivered 850 collides with the in-flight run.
POST
/
v1
/
workflows
/
wholesale-order
/
start
curl --request POST \
--url 'https://api.workstream.stateset.com/v1/workflows/wholesale-order/start' \
--header "x-api-key: $STATESET_TEMPORAL_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"brand_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"partner_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"po_number": "ORD-10042",
"po_total_cents": 4900,
"currency": "USD",
"lines": [
{
"line_number": "string",
"sku": "SKU-TENT-2P-GRN",
"quantity": 2,
"unit_price_cents": 4900
}
],
"ship_to": {},
"requested_ship_date": "2026-08-31T14:22:05Z",
"review_cap_cents": 1,
"fulfillment_tool": "string",
"fulfillment_params": {}
}'
{
"workflow_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"run_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
Request body
object
string
required
string
required
string
required
integer
required
string
required
object[]
required
object
required
string
integer
string
required
object
Response
StartWorkflowResponse
string
required
string
Status codes
| Code | Meaning |
|---|---|
200 | Wholesale-order workflow started; id is wholesale-order-{brand_uuid}-{po_number} so a redelivered 850 collides with the in-flight run. |
400 | Validation error |
401 | Unauthorized |
404 | Not found |
429 | Rate limited |
500 | Internal error |
curl --request POST \
--url 'https://api.workstream.stateset.com/v1/workflows/wholesale-order/start' \
--header "x-api-key: $STATESET_TEMPORAL_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"brand_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"partner_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"po_number": "ORD-10042",
"po_total_cents": 4900,
"currency": "USD",
"lines": [
{
"line_number": "string",
"sku": "SKU-TENT-2P-GRN",
"quantity": 2,
"unit_price_cents": 4900
}
],
"ship_to": {},
"requested_ship_date": "2026-08-31T14:22:05Z",
"review_cap_cents": 1,
"fulfillment_tool": "string",
"fulfillment_params": {}
}'
{
"workflow_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"run_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
Last modified on August 31, 2026