Webhooks

Change Event Notification Settings

Changed on

Replace the complete location-wide URL set and apply one event-flag set to every supplied destination. Omitted flags default to 0. Requires webhook settings read access and permission to edit the location. A location-level webhook feature restriction can also deny the write. Read url_settings first: existing URLs may have different flags, and this POST overwrites them all. The response reports saved configuration, not delivery success.

post/hooks_settings/{location_id}

Request

  • Base URL
    https://api.alteg.io/api/v1
  • URL
    https://api.alteg.io/api/v1/hooks_settings/{location_id}
  • Auth
    HTTP bearer

Path parameters

location_idnumber required

location ID

Headers

Acceptstring required

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

Content-Typestring required

application/json

Authorizationstring required

Bearer partner_token, User user_token

Request body

urlsstring[] required

Complete replacement list: 1–10 distinct nonempty URLs after trimming and duplicate removal. The backend checks only for an http or https prefix; supply a valid HTTPS URL for each receiver.

activenumber required

1 - notifications are active, 0 - not active

salonnumber

1 - send events by location entity, 0 - do not send

service_categorynumber

1 - send events by service category entity, 0 - do not send

servicenumber

1 - send events by service entity, 0 - do not send

goodnumber

1 - send events by product entity, 0 - don't send

masternumber

1 - send events by team member entity, 0 - don't send

clientnumber

1 - send events by client entity, 0 - don't send

recordnumber

1 - send events by appointment entity, 0 - do not send

schedulenumber

1 - send schedule update events, 0 - do not send

loyalty_cardnumber

1 - send loyalty card events, 0 - do not send

goods_operations_salenumber

1 - send events by the product sale entity, 0 - do not send

goods_operations_receiptnumber

1 - send events by the entity arrival of products, 0 - do not send

goods_operations_consumablenumber

1 - send events by the consumable write-off entity, 0 - do not send

goods_operations_stolennumber

1 - send events by the product write-off entity, 0 - do not send

goods_operations_movenumber

1 - send events by the product movement entity, 0 - no send

finances_operationnumber

1 - send events by entity financial operation, 0 - no send

self_sendingnumber

1 - The webhook creator will receive events triggered by their own actions, 0 - The webhook creator will not receive events triggered by their own actions

Example request

{
  "urls": [
    "https://dev.tools.test.com/test/Hooks"
  ],
  "active": 0,
  "salon": 1,
  "service_category": 0,
  "service": 1,
  "good": 1,
  "master": 1,
  "client": 1,
  "record": 1,
  "schedule": 1,
  "loyalty_card": 0,
  "goods_operations_sale": 1,
  "goods_operations_receipt": 1,
  "goods_operations_consumable": 1,
  "goods_operations_stolen": 1,
  "goods_operations_move": 1,
  "finances_operation": 1,
  "self_sending": 0
}

Response

Created

successboolean

Execution success status (true)

metaobject[]

Metadata (empty array)

Example response

{
  "success": true,
  "data": {
    "company_id": 123456,
    "urls": [
      "https://dev.tools.test.com/test/Hooks"
    ],
    "url_settings": [
      {
        "url": "https://dev.tools.test.com/test/Hooks",
        "active": 0,
        "salon": 1,
        "good": 1,
        "schedule": 1,
        "loyalty_card": 0,
        "self_sending": 0
      }
    ],
    "active": 0,
    "salon": 1,
    "service_category": 0,
    "service": 1,
    "good": 1,
    "master": 1,
    "client": 1,
    "record": 1,
    "schedule": 1,
    "loyalty_card": 0,
    "goods_operations_sale": 1,
    "goods_operations_receipt": 1,
    "goods_operations_consumable": 1,
    "goods_operations_stolen": 1,
    "goods_operations_move": 1,
    "finances_operation": 1,
    "self_sending": 0
  },
  "meta": []
}

Changes

    • breaking

      request body became required

    • breaking

      the request property's minItems was increased to 1

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the non-success response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status