Skip to main content
DELETE
/
api
/
plans
/
{type}
/
{id}
/
items
Delete plan item(s)
curl --request DELETE \
  --url https://app.solya.app/api/plans/{type}/{id}/items \
  --header 'Authorization: Bearer <token>'
{
  "deleted": 2
}

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

itemIds
string

Comma-separated list of item IDs to delete (for REBALANCE, MARKDOWN, SUPPLIER_RETURN, SUPPLIER_EXCHANGE)

variantIds
string

Comma-separated list of variant IDs to delete (for RESTOCK only)

reason
string

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

Maximum string length: 500

Response

Successful response

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