Skip to main content
POST
/
api
/
plans
/
{type}
/
{id}
/
items
curl --request POST \
  --url https://app.solya.app/api/plans/{type}/{id}/items \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "discountPercent": 30,
  "planType": "MARKDOWN",
  "reason": "End of season clearance",
  "shopId": "shop-uuid-paris-01",
  "sizeId": "size-uuid-l",
  "variantId": "var-uuid-nike-shirt"
}
'
{
  "itemId": "550e8400-e29b-41d4-a716-446655440020"
}

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)$

Query Parameters

page
integer

Page number (1-based)

Required range: x <= 9007199254740991
pageSize
integer

Items per page

Required range: x <= 9007199254740991

Free-text search across variant/product/size labels

side
enum<string>

Filter by exchange side (RETURN or RECEIVE); only applicable for SUPPLIER_EXCHANGE

Available options:
RETURN,
RECEIVE

Body

application/json
planType
enum<string>
required

Must be RESTOCK to match the plan type in the URL

Available options:
RESTOCK
quantity
integer
required

Quantity to restock (must be a positive integer)

Required range: x <= 9007199254740991
shopId
string
required

Shop (store) ID where the restock will be fulfilled

Minimum string length: 1
sizeId
string
required

Databricks size ID for the item to add

Minimum string length: 1
variantId
string
required

Databricks variant ID for the item to add

Minimum string length: 1
negotiationRate
number

Negotiated discount rate on the supplier price in percent (0–100); omit to use gross unit cost

Required range: 0 <= x <= 100
reason
string

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

Maximum string length: 500

Response

Successful response

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