Skip to main content
POST
/
api
/
data-platform
/
plans
/
{type}
/
{id}
/
validate
Validate a plan and capture its decision context snapshot
curl --request POST \
  --url https://app.solya.app/api/data-platform/plans/{type}/{id}/validate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "decisionContextSnapshot": {
    "forecastValues": {
      "variant-uuid-1": 12,
      "variant-uuid-2": 8
    },
    "ruleOutcomes": [
      {
        "outcome": "WARN",
        "ruleId": "rule-uuid-1",
        "variantId": "variant-uuid-1"
      }
    ],
    "stockOutRiskScores": {
      "variant-uuid-1": 0.85
    }
  },
  "organizationId": "org-uuid-1"
}
'
{
  "capturedAt": "2026-05-15T10:30:00.001Z",
  "decidedAt": "2026-05-15T10:30:00.000Z",
  "planId": "plan-uuid-1",
  "planType": "RESTOCK",
  "status": "VALIDATED"
}

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.

Path Parameters

type
string
required

Plan type path segment (RESTOCK, REBALANCE, MARKDOWN, SUPPLIER_RETURN, SUPPLIER_EXCHANGE)

Minimum string length: 1
id
string
required

UUID of the plan to validate

Minimum string length: 1

Body

application/json
decisionContextSnapshot
object
required

Forecast values and rule outcomes to persist at decision time; capturedAt is set server-side

organizationId
string
required

UUID of the organization that owns the plan

Minimum string length: 1

Response

Successful response

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