Skip to main content
POST
/
api
/
rebalance-plans
Create rebalance plan
curl --request POST \
  --url https://app.solya.app/api/rebalance-plans \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "fromShopId": "shop-uuid-lyon-bellecour",
  "name": "Rebalance Lyon → Paris Q1 2025",
  "toShopId": "shop-uuid-paris-opera"
}
'
{
  "fromShopId": "shop-uuid-lyon-bellecour",
  "id": "rbp-uuid-001",
  "status": "DRAFT",
  "toShopId": "shop-uuid-paris-opera"
}

Authorizations

Authorization
string
header
required

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

Body

application/json
fromShopId
string
required

Identifier of the shop sending stock (outgoing)

Minimum string length: 1
toShopId
string
required

Identifier of the shop receiving stock (ingoing)

Minimum string length: 1
name
string

Optional display name for the plan

Response

Successful response

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