Вебхуки: методи API Bimp
Методи API Bimp для ресурсу «Вебхуки» (/org2/webhook/…): 4 методи. Базова адреса: https://app.bimpsoft.com. Усі запити, крім входу, передають токен компанії в заголовку access-token — див. Початок роботи з API.
| Метод | Що робить |
|---|---|
POST /org2/webhook/api-readList | |
POST /org2/webhook/api-read | |
POST /org2/webhook/api-upsert | |
POST /org2/webhook/api-delete |
api-readList
POST /org2/webhook/api-readList
Тіло запиту (JSON)
| Поле | Тип | Обов’язкове | Опис |
|---|---|---|---|
eventKind | string (“inventory_balance”) | string (“product_upsert”) | string (“order_status”) |
Відповідь: поле data
| Поле | Тип | Опис |
|---|---|---|
[].id | string (uuid) | |
[].companyId | string (uuid) | |
[].eventKind | string | |
[].name | string | null | |
[].url | string | |
[].enabled | integer | |
[].orgId | string (uuid) | null | |
[].warehouseIds | object[] | null | |
[].statusIds | object[] | null | |
[].extraHeaders | string | null | |
[].hasSecret | boolean |
curl -X POST 'https://app.bimpsoft.com/org2/webhook/api-readList' \
-H 'access-token: <токен компанії>' \
-H 'Content-Type: application/json' \
-d '{"eventKind":"string"}'
api-read
POST /org2/webhook/api-read
Тіло запиту (JSON)
| Поле | Тип | Обов’язкове | Опис |
|---|---|---|---|
id | string (uuid) | так |
Відповідь: поле data
| Поле | Тип | Опис |
|---|---|---|
id | string (uuid) | |
companyId | string (uuid) | |
eventKind | string | |
name | string | null | |
url | string | |
enabled | integer | |
orgId | string (uuid) | null | |
warehouseIds | object[] | null | |
statusIds | object[] | null | |
extraHeaders | string | null | |
hasSecret | boolean |
curl -X POST 'https://app.bimpsoft.com/org2/webhook/api-read' \
-H 'access-token: <токен компанії>' \
-H 'Content-Type: application/json' \
-d '{"id":"00000000-0000-0000-0000-000000000000"}'
api-upsert
POST /org2/webhook/api-upsert
Тіло запиту (JSON)
| Поле | Тип | Обов’язкове | Опис |
|---|---|---|---|
eventKind | string (“inventory_balance”) | string (“product_upsert”) | string (“order_status”) | так | |
id | string (uuid) | ||
name | string | null | ||
url | string | так | |
secret | string | null | ||
enabled | boolean | ||
orgId | string (uuid) | null | ||
warehouseIds | object[] | null | ||
statusIds | object[] | null | ||
extraHeaders | object |
Відповідь: поле data
| Поле | Тип | Опис |
|---|---|---|
id | string (uuid) |
curl -X POST 'https://app.bimpsoft.com/org2/webhook/api-upsert' \
-H 'access-token: <токен компанії>' \
-H 'Content-Type: application/json' \
-d '{"eventKind":"string","url":"string"}'
api-delete
POST /org2/webhook/api-delete
Тіло запиту (JSON)
| Поле | Тип | Обов’язкове | Опис |
|---|---|---|---|
id | string (uuid) | так |
Відповідь: поле data
| Поле | Тип | Опис |
|---|---|---|
deleted | boolean |
curl -X POST 'https://app.bimpsoft.com/org2/webhook/api-delete' \
-H 'access-token: <токен компанії>' \
-H 'Content-Type: application/json' \
-d '{"id":"00000000-0000-0000-0000-000000000000"}'
Інтерактивна документація з можливістю надіслати тестовий запит: https://app.bimpsoft.com/docs. Специфікація OpenAPI оновлюється разом із Bimp; ця сторінка згенерована з неї автоматично.