Skip to content
scango.ch
Esc
↑↓navigate↵open⌘Jpreview

Create category

Create a category. Requires a Write key.

POST/categories
Authorization
AuthorizationBearer token (API key) · headerrequired

Organization API key.

Request body
requiredapplication/json
namestringrequired
min length 1
externalIdstring

Optional external identifier

indexnumber
showOnScreenboolean
imageUrlstring
marginMinPercentnumber
marginMaxPercentnumber
hideStorestring[]

An empty array is not stored.

allowStorestring[]

An empty array is not stored.

Responses
200

Category created

successbooleanrequired
idstringrequired
400

Invalid parameters or body.

statusCodeintegerrequired

HTTP status code

messagestringrequired

Human-readable error message

timestampstring<date-time>required

When the error occurred (UTC).

pathstringrequired

Request URL (path and query string).

403

Missing, unknown or inactive API key, or a Read key on a write operation.

statusCodeintegerrequired

HTTP status code

messagestringrequired

Human-readable error message

timestampstring<date-time>required

When the error occurred (UTC).

pathstringrequired

Request URL (path and query string).

Try it
Server
Authorization
Bodyapplication/json
Request
curl -X POST 'https://dashboard.scango.ch/api/v1/categories' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "Beverages",
  "index": 1,
  "showOnScreen": true
}'
Response
{
  "success": true,
  "id": "newCategoryId"
}

Was this page helpful?