Skip to main content
POST
/
api
/
supplier-exchange-plans
Create supplier exchange plan
curl --request POST \
  --url https://app.solya.app/api/supplier-exchange-plans \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "deadline": "2025-10-15",
  "description": "Exchange of overstocked FW25 items with new SS26 units from Nike",
  "destinationShopId": "550e8400-e29b-41d4-a716-446655440021",
  "name": "Nike FW25 Exchange Wave 1",
  "reason": "Initiated by the inventory rebalancing agent",
  "sourceShopId": "550e8400-e29b-41d4-a716-446655440020",
  "supplierId": "550e8400-e29b-41d4-a716-446655440011"
}
'
{
  "id": "sep-uuid-001",
  "status": "DRAFT",
  "supplierId": "550e8400-e29b-41d4-a716-446655440011"
}

Authorizations

Authorization
string
header
required

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

Body

application/json
supplierId
string
required

Identifier of the supplier for the exchange plan

Minimum string length: 1
deadline
string

Optional exchange deadline in ISO-8601 format (e.g. 2025-09-30)

description
string

Optional free-text description of the plan

destinationShopId
string

Optional identifier of the shop that will receive items from the supplier (RECEIVE side)

name
string

Optional display name for the plan; auto-generated when omitted

reason
string

Optional free-text reason for creating the plan; recorded in the audit trail

Maximum string length: 500
ruleGroupId
string

Optional identifier of the business-logic rule group to attach to the plan

sourceShopId
string

Optional identifier of the shop from which items are returned (RETURN side)

Response

Successful response

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