Skip to main content
POST
/
api
/
data-platform
/
workflow-actions
/
add-items-to-plan
Add inventory items to a plan
curl --request POST \
  --url https://app.solya.app/api/data-platform/workflow-actions/add-items-to-plan \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "items": [
    {
      "quantity": 12,
      "shopId": "shop-uuid-1",
      "sizeId": "size-uuid-1",
      "variantId": "variant-uuid-1"
    },
    {
      "quantity": 8,
      "shopId": "shop-uuid-1",
      "sizeId": "size-uuid-2",
      "variantId": "variant-uuid-2"
    }
  ],
  "organizationId": "org-uuid-1",
  "planId": "plan-uuid-1",
  "planType": "RESTOCK",
  "workflowRunId": "workflow-run-uuid-1"
}
'
{
  "addedCount": 2,
  "errors": [],
  "skippedCount": 0
}

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
items
object[]
required

Non-empty list of restock items to add or refresh in the plan

Minimum array length: 1
organizationId
string
required

UUID of the organization that owns the plan

Minimum string length: 1
planId
string
required

UUID of the existing plan to add items to

Minimum string length: 1
planType
enum<string>
required

Discriminator — must be 'RESTOCK' for this variant

Available options:
RESTOCK
workflowRunId
string

Databricks workflow run ID; used as the audit sourceRef for every item written

Response

Successful response

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