Skip to main content
POST
/
api
/
supplier-return-plans
Create supplier return plan
curl --request POST \
  --url https://app.solya.app/api/supplier-return-plans \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "deadline": "2025-09-30",
  "description": "First return batch for Adidas FW25 overstocked units",
  "name": "Adidas FW25 Return Wave 1",
  "reason": "Initiated by the inventory rebalancing agent",
  "sourceShopId": "550e8400-e29b-41d4-a716-446655440020",
  "supplierId": "550e8400-e29b-41d4-a716-446655440010"
}
'
{
  "id": "srp-uuid-001",
  "status": "DRAFT",
  "supplierId": "550e8400-e29b-41d4-a716-446655440010"
}

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 return plan

Minimum string length: 1
deadline
string

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

description
string

Optional free-text description of the plan

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

Response

Successful response

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