curl --request POST \
--url 'https://api.workstream.stateset.com/v1/workflows/return-lifecycle/start' \
--header "x-api-key: $STATESET_TEMPORAL_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"brand_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"connector_key_mail": "string",
"connector_key_sms": "string",
"connector_key_returns": "string",
"connector_key_refund": "string",
"refund_provider": "string",
"customer_email": "ada.lovelace@example.com",
"customer_phone": "+1 415 555 0142",
"order_number": "ORD-10042",
"order_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"charge_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"refund_amount_minor": 4900,
"currency": "USD",
"return_items": null,
"conversation_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"escalation_assignee": "string",
"reminder_interval_secs": 1,
"max_reminders": 1,
"expiry_secs": 1,
"customer_timezone": "America/Los_Angeles",
"quiet_hours_start_hour": 1,
"quiet_hours_end_hour": 1,
"idempotency_key": "req_01J9X4Q8M2ZK7V3N",
"copy": {
"brand_name": "Acme Outdoors",
"sender_signature": "string",
"email_subject_override": "string"
},
"routing_mode": "string"
}'
{
"workflow_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"run_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
Start return lifecycle workflow
Workflow started (or the existing run returned when the deterministic workflow id already exists).
POST
/
v1
/
workflows
/
return-lifecycle
/
start
curl --request POST \
--url 'https://api.workstream.stateset.com/v1/workflows/return-lifecycle/start' \
--header "x-api-key: $STATESET_TEMPORAL_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"brand_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"connector_key_mail": "string",
"connector_key_sms": "string",
"connector_key_returns": "string",
"connector_key_refund": "string",
"refund_provider": "string",
"customer_email": "ada.lovelace@example.com",
"customer_phone": "+1 415 555 0142",
"order_number": "ORD-10042",
"order_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"charge_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"refund_amount_minor": 4900,
"currency": "USD",
"return_items": null,
"conversation_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"escalation_assignee": "string",
"reminder_interval_secs": 1,
"max_reminders": 1,
"expiry_secs": 1,
"customer_timezone": "America/Los_Angeles",
"quiet_hours_start_hour": 1,
"quiet_hours_end_hour": 1,
"idempotency_key": "req_01J9X4Q8M2ZK7V3N",
"copy": {
"brand_name": "Acme Outdoors",
"sender_signature": "string",
"email_subject_override": "string"
},
"routing_mode": "string"
}'
{
"workflow_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"run_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
Request body
object
string (uuid)
required
string
required
string
string
string
string
string
required
string
string
string
string
integer
string
object
Return line items (free-form JSON)
string
string
integer
integer
integer
string
integer
integer
string
object
string
Response
StartWorkflowResponse
string
required
string
Status codes
| Code | Meaning |
|---|---|
200 | Workflow started (or the existing run returned when the deterministic workflow id already exists). |
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/return-lifecycle/start' \
--header "x-api-key: $STATESET_TEMPORAL_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"brand_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"connector_key_mail": "string",
"connector_key_sms": "string",
"connector_key_returns": "string",
"connector_key_refund": "string",
"refund_provider": "string",
"customer_email": "ada.lovelace@example.com",
"customer_phone": "+1 415 555 0142",
"order_number": "ORD-10042",
"order_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"charge_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"refund_amount_minor": 4900,
"currency": "USD",
"return_items": null,
"conversation_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"escalation_assignee": "string",
"reminder_interval_secs": 1,
"max_reminders": 1,
"expiry_secs": 1,
"customer_timezone": "America/Los_Angeles",
"quiet_hours_start_hour": 1,
"quiet_hours_end_hour": 1,
"idempotency_key": "req_01J9X4Q8M2ZK7V3N",
"copy": {
"brand_name": "Acme Outdoors",
"sender_signature": "string",
"email_subject_override": "string"
},
"routing_mode": "string"
}'
{
"workflow_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"run_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
Last modified on August 31, 2026