Skip to main content
PATCH
/
api
/
plans
/
{type}
/
{id}
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

Authorization
string
header
required

User session token issued by NextAuth. For human users accessing Solya via the web application.

Path Parameters

type
enum<string>
required

Plan type. One of: RESTOCK, REBALANCE, MARKDOWN, SUPPLIER_RETURN, SUPPLIER_EXCHANGE, PRE_SEASON

Available options:
RESTOCK,
REBALANCE,
MARKDOWN,
SUPPLIER_RETURN,
SUPPLIER_EXCHANGE,
PRE_SEASON
id
string<uuid>
required

Unique identifier of the plan (UUID)

Pattern: ^([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

application/json
name
string

New display name for the plan (1–255 characters)

Required string length: 1 - 255
notes
string | null

Long-form notes attached to the plan header. Pass null to clear existing notes.

Maximum string length: 10000
reason
string

Human-readable reason for this change; written to the audit log

Maximum string length: 500
status
string

Target status to transition the plan to. Must be a valid next-state per the plan type's state machine.

Minimum string length: 1

Response

Successful response

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