Update plan item(s)
Updates one or more items in a plan. The request body must include planType matching the URL. RESTOCK supports bulk upsert via a changes map; other types update a single item by itemId. PRE_SEASON is not yet supported and returns HTTP 422.
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
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)$Query Parameters
Page number (1-based)
x <= 9007199254740991Items per page
x <= 9007199254740991Free-text search across variant/product/size labels
Filter by exchange side (RETURN or RECEIVE); only applicable for SUPPLIER_EXCHANGE
RETURN, RECEIVE Body
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
Map of variantId → sizeId → new quantity. Example: {"var-uuid": {"size-uuid": 10}}. Setting a quantity to 0 removes the item for that variant/size/shop combination.
Must be RESTOCK to match the plan type in the URL
RESTOCK Shop ID owning the items to update (used to scope the update)
1Human-readable reason for this change; written to the audit log
500
