POST
/
api
/
v1
/
accounts
/
{account_id}
/
scheduling
/
services
Create a scheduling service
curl --request POST \
  --url https://one-link.kz/api/v1/accounts/{account_id}/scheduling/services \
  --header 'Content-Type: application/json' \
  --header 'api_access_token: <api-key>' \
  --data '
{
  "name": "<string>",
  "base_price": 123,
  "duration_min": 123,
  "category": "<string>",
  "direction": "<string>",
  "service_type": "<string>",
  "description": "<string>",
  "active": true,
  "prices": [
    {
      "resource_id": 123,
      "price": 123,
      "compensation_type": "<string>",
      "compensation_value": 123,
      "active": true
    }
  ],
  "custom_attributes": {}
}
'
{
  "payload": {
    "id": 123,
    "account_id": 123,
    "name": "<string>",
    "base_price": 123,
    "duration_min": 123,
    "category": "<string>",
    "direction": "<string>",
    "service_type": "<string>",
    "active": true,
    "prices": [
      {
        "id": 123,
        "resource_id": 123,
        "price": 123,
        "compensation_type": "<string>",
        "compensation_value": 123,
        "active": true
      }
    ]
  }
}

Authorizations

api_access_token
string
header
required

This token can be obtained by visiting the profile page or via rails console. Provides access to endpoints based on the user permissions levels. This token can be saved by an external system when user is created via API, to perform activities on behalf of the user.

Path Parameters

account_id
integer
required

The numeric ID of the account

Body

application/json
name
string
required
base_price
integer
required
duration_min
integer
required
category
string
direction
string
service_type
string
description
string
active
boolean
prices
object[]
custom_attributes
object

Response

Service created

payload
object