Skip to main content
POST
/
api
/
size-curve-targets
Create or replace a size curve target
curl --request POST \
  --url https://app.solya.app/api/size-curve-targets \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "rows": [
    {
      "sizeId": "size-s",
      "targetPct": 25
    },
    {
      "sizeId": "size-m",
      "targetPct": 50
    },
    {
      "sizeId": "size-l",
      "targetPct": 25
    }
  ],
  "scope": "BRAND",
  "scopeValue": "brand-uuid-aaa"
}
'
{
  "id": "row-uuid-1",
  "organizationId": "org-uuid-123",
  "rows": [
    {
      "sizeId": "size-s",
      "targetPct": 25
    },
    {
      "sizeId": "size-m",
      "targetPct": 50
    },
    {
      "sizeId": "size-l",
      "targetPct": 25
    }
  ],
  "scope": "BRAND",
  "scopeValue": "brand-uuid-aaa",
  "updatedAt": null
}

Authorizations

Authorization
string
header
required

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

Body

application/json
rows
object[]
required
Required array length: 1 - 50 elements
scope
enum<string>
required
Available options:
BRAND,
CATEGORY,
SEASON
scopeValue
string
required
Required string length: 1 - 255

Response

Successful response

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