GET
/
api
/
v1
/
accounts
/
{account_id}
/
scheduling
/
calendar
Get scheduling calendar payload
curl --request GET \
  --url https://one-link.kz/api/v1/accounts/{account_id}/scheduling/calendar \
  --header 'api_access_token: <api-key>'
{
  "payload": {
    "view": "<string>",
    "range": {},
    "resources": [
      {
        "id": 123,
        "account_id": 123,
        "user_id": 123,
        "name": "<string>",
        "specialty": "<string>",
        "timezone": "<string>",
        "slot_duration_min": 123,
        "compensation_type": "<string>",
        "compensation_value": 123,
        "active": true,
        "custom_attributes": {}
      }
    ],
    "work_rules": [
      {
        "id": 123,
        "account_id": 123,
        "resource_id": 123,
        "weekday": 123,
        "start_minute": 123,
        "end_minute": 123,
        "active": true
      }
    ],
    "break_rules": [
      {
        "id": 123,
        "account_id": 123,
        "resource_id": 123,
        "weekday": 123,
        "start_minute": 123,
        "end_minute": 123,
        "title": "<string>",
        "active": true
      }
    ],
    "holidays": [
      {
        "id": 123,
        "date": "2023-12-25",
        "title": "<string>",
        "recurring_yearly": true,
        "working_day_override": true,
        "custom_attributes": {}
      }
    ],
    "workday_overrides": [
      {
        "id": 123,
        "resource_id": 123,
        "date": "2023-12-25",
        "start_minute": 123,
        "end_minute": 123,
        "break_start_minute": 123,
        "break_end_minute": 123,
        "break_title": "<string>",
        "custom_attributes": {}
      }
    ],
    "time_offs": [
      {
        "id": 123,
        "resource_id": 123,
        "kind": "<string>",
        "starts_at": "2023-11-07T05:31:56Z",
        "ends_at": "2023-11-07T05:31:56Z",
        "title": "<string>",
        "notes": "<string>",
        "custom_attributes": {}
      }
    ],
    "appointments": [
      {
        "id": 123,
        "account_id": 123,
        "resource_id": 123,
        "contact_id": 123,
        "service_id": 123,
        "company_id": 123,
        "conversation_id": 123,
        "created_by_id": 123,
        "starts_at": "2023-11-07T05:31:56Z",
        "ends_at": "2023-11-07T05:31:56Z",
        "duration_min": 123,
        "status": "<string>",
        "appointment_type": "<string>",
        "client_name": "<string>",
        "client_phone": "<string>",
        "client_identifier": "<string>",
        "client_birth_date": "2023-12-25",
        "client_gender": "<string>",
        "payment_status": "<string>",
        "service_amount": 123,
        "prepaid_amount": 123,
        "settlement_amount": 123,
        "external_ref": "<string>",
        "idempotency_key": "<string>",
        "payments": [
          {
            "id": 123,
            "amount": 123,
            "payment_method": "<string>",
            "payment_kind": "<string>"
          }
        ],
        "expense": {
          "id": 123,
          "amount": 123,
          "status": "<string>"
        }
      }
    ],
    "payments": [
      {
        "id": 123,
        "appointment_id": 123,
        "recorded_by_id": 123,
        "amount": 123,
        "payment_method": "<string>",
        "payment_kind": "<string>"
      }
    ],
    "expenses": [
      {
        "id": 123,
        "appointment_id": 123,
        "resource_id": 123,
        "amount": 123,
        "status": "<string>",
        "paid_at": "2023-11-07T05:31:56Z",
        "paid_by_id": 123
      }
    ],
    "slots": [
      {}
    ]
  }
}

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

Query Parameters

view
enum<string>
default:week
Available options:
day,
week,
month,
list
from
string<date-time>
required
to
string<date-time>
required
resource_ids
string

Comma-separated resource ids

include_slots
boolean
default:false
duration_min
integer
Required range: x >= 5

Response

Calendar payload

payload
object