Skip to content

Create a service category

Request

Security
BearerPartnerUser
Path
location_idnumberrequired

location ID

Headers
Acceptstringrequired

e.g. application/vnd.api.v2+json

Example:application/vnd.api.v2+json
Content-Typestringrequired

application/json

Authorizationstringrequired

Bearer partner_token, User user_token

Bodyapplication/jsonrequired
titlestring

Service category name

Example:"Haircut very feminine"
api_idstring

External Category ID

Example:"adw322"
weightnumber

Category weight (used to sort categories when displayed)

Example:111
staffArray of numbers

List of IDs of team members providing services from the category

Example:
[ 5006, 8901 ]
curl -i -X POST \
  'https://developer.alteg.io/_mock/en/b2b-v1/openapi/service_categories/{location_id}' \
  -H 'Accept: application/vnd.api.v2+json' \
  -H 'Authorization: Bearer <YOUR_Bearer {PartnerToken}, User {UserToken}_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "title": "Haircut very feminine",
    "api_id": "adw322",
    "weight": 111,
    "staff": [
      5006,
      8901
    ]
  }'

Responses

Created

Bodyapplication/json
successboolean

Execution success status (true)

Example:true
dataobject

Object with data

Example:
{ "id": 3, "salon_service_id": 15, "title": "Haircut very feminine", "api_id": "adw322", "weight": 111, "staff": [ 5006, 8901 ] }
metaArray of objects

Metadata (empty array)

Example:
[]
Response
{ "success": true, "data": { "id": 3, "title": "Haircut very feminine", "api_id": "adw322", "weight": 111, "staff": [ … ] }, "meta": [] }