curl --request PATCH \
--url https://app.solya.app/api/plans/{type}/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Restock Adidas FW2025 — Final",
"reason": "Final quantities locked for ordering",
"status": "VALIDATED"
}
'{
"id": "550e8400-e29b-41d4-a716-446655440001",
"name": "Restock Adidas FW2025 — Final",
"notes": null,
"planType": "RESTOCK",
"status": "VALIDATED"
}Update plan name, notes, or status
Unified plan update endpoint supporting all 6 plan types. Accepts any combination of name, notes, and status in a single request. Fields are applied in order: name → notes → status. Status transitions are validated by the per-type state machine — an invalid transition returns HTTP 422. All changes are recorded in the plan audit log.
curl --request PATCH \
--url https://app.solya.app/api/plans/{type}/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Restock Adidas FW2025 — Final",
"reason": "Final quantities locked for ordering",
"status": "VALIDATED"
}
'{
"id": "550e8400-e29b-41d4-a716-446655440001",
"name": "Restock Adidas FW2025 — Final",
"notes": null,
"planType": "RESTOCK",
"status": "VALIDATED"
}Authorizations
User session token issued by NextAuth. For human users accessing Solya via the web application.
Path Parameters
Plan type. One of: RESTOCK, REBALANCE, MARKDOWN, SUPPLIER_RETURN, SUPPLIER_EXCHANGE, PRE_SEASON. Case-insensitive — "restock" and "RESTOCK" are both accepted.
RESTOCK, REBALANCE, MARKDOWN, SUPPLIER_RETURN, SUPPLIER_EXCHANGE, PRE_SEASON Unique identifier of the plan (UUID)
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Body
New display name for the plan (1–255 characters)
1 - 255Long-form notes attached to the plan header. Pass null to clear existing notes.
10000Human-readable reason for this change; written to the audit log
500Target status to transition the plan to. Must be a valid next-state per the plan type's state machine.
1
