Skip to main content
POST
/
api
/
data-platform
/
workflow-actions
/
create-or-get-plan
Create or retrieve a plan for workflow execution
curl --request POST \
  --url https://app.solya.app/api/data-platform/workflow-actions/create-or-get-plan \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "organizationId": "org-uuid-1",
  "planConfig": {
    "brandId": "brand-uuid-1",
    "collectionId": "collection-uuid-1",
    "deadline": "2026-06-30T23:59:59.000Z",
    "description": "Automated restock for SS26 collection",
    "workflowRunId": "workflow-run-uuid-1"
  },
  "planType": "RESTOCK"
}
'
{
  "data": {
    "isNew": true,
    "planId": "<string>",
    "planName": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Static internal-ops token used by the data platform and internal cron jobs (e.g. zombie-run sweep). Validated via requireBearerToken inside the handler against a service-specific environment variable.

Body

application/json
organizationId
string
required

UUID of the organization that owns the plan

Minimum string length: 1
planConfig
object
required

Restock-specific plan configuration (brand, collection, deadline…)

planType
enum<string>
required

Discriminator — must be 'RESTOCK' for this variant

Available options:
RESTOCK

Response

Successful response

data
object
required
success
enum<boolean>
required
Available options:
true