PATCH
/
api
/
v1
/
accounts
/
{account_id}
/
scheduling
/
appointments
/
{id}
Update a scheduling appointment
curl --request PATCH \
  --url https://one-link.kz/api/v1/accounts/{account_id}/scheduling/appointments/{id} \
  --header 'Content-Type: application/json' \
  --header 'api_access_token: <api-key>' \
  --data '
{
  "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>",
  "client_comment": "<string>",
  "source": "<string>",
  "external_ref": "<string>",
  "service_amount": 123,
  "prepaid_amount": 123,
  "prepaid_payment_method": "<string>",
  "settlement_amount": 123,
  "settlement_payment_method": "<string>",
  "payment_status": "<string>",
  "custom_attributes": {}
}
'
{
  "payload": {
    "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>"
    }
  }
}

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

id
integer
required

Body

application/json
resource_id
integer
contact_id
integer
service_id
integer
company_id
integer
conversation_id
integer
created_by_id
integer
starts_at
string<date-time>
ends_at
string<date-time>
duration_min
integer
status
string
appointment_type
string
client_name
string
client_phone
string
client_identifier
string
client_birth_date
string<date>
client_gender
string
client_comment
string
source
string
external_ref
string
service_amount
integer
prepaid_amount
integer
prepaid_payment_method
string
settlement_amount
integer
settlement_payment_method
string
payment_status
string
custom_attributes
object

Response

Appointment updated

payload
object