Получение списка вебхуков

Получает список вебхуков.

Request

GET

https://api.kit.yandex.net/v1/webhooks

Responses

200 OK

Список вебхуков.

Body

application/json
{
  "webhooks": [
    {
      "id": "019b21d9-c5d9-777d-80bd-d67c664bc6d9",
      "url": "https://example.com/webhook",
      "events": [
        "ORDER_STATUS_CHANGED"
      ],
      "status": "ACTIVE"
    }
  ],
  "total_count": 100
}

Name

Description

total_count

Type: integer

Общее количество вебхуков.

webhooks

Type: Webhook[]

Example
[
  {
    "id": "019b21d9-c5d9-777d-80bd-d67c664bc6d9",
    "url": "https://example.com/webhook",
    "events": [
      "ORDER_STATUS_CHANGED"
    ],
    "status": "ACTIVE"
  }
]

WebhookID

ID вебхука.

Type: string<uuid>

Example: 019b21d9-c5d9-777d-80bd-d67c664bc6d9

WebhookEventTypes

Тип события:

  • ORDER_STATUS_CHANGED — изменился статус заказа.
  • ORDER_PAYMENT_STATUS_CHANGED — изменился статус оплаты заказа.
  • ORDER_DELIVERY_STATUS_CHANGED — изменился статус доставки заказа.

Type: string

Enum: ORDER_STATUS_CHANGED, ORDER_PAYMENT_STATUS_CHANGED, ORDER_DELIVERY_STATUS_CHANGED

WebhookStatus

Статус вебхука:

  • ACTIVE — активный.
  • INACTIVE — неактивный.

Type: string

Enum: ACTIVE, INACTIVE

Webhook

Name

Description

events

Type: WebhookEventTypes[]

Список типов событий, на которые подписан вебхук.

Example
[
  "ORDER_STATUS_CHANGED"
]

id

Type: WebhookID

ID вебхука.

Example: 019b21d9-c5d9-777d-80bd-d67c664bc6d9

status

Type: WebhookStatus

Статус вебхука:

  • ACTIVE — активный.
  • INACTIVE — неактивный.

Enum: ACTIVE, INACTIVE

url

Type: string

URL вебхука.

Example: https://example.com/webhook

Example
{
  "id": "019b21d9-c5d9-777d-80bd-d67c664bc6d9",
  "url": "https://example.com/webhook",
  "events": [
    "ORDER_STATUS_CHANGED"
  ],
  "status": "ACTIVE"
}

400 Bad Request

Некорректный запрос.

Body

application/json
{
  "code": "VALIDATION_ERROR",
  "message": "Invalid input",
  "trace_id": "00000000000000000000000000000000"
}

Name

Description

code

Type: string

Example: VALIDATION_ERROR

message

Type: string

Example: Invalid input

trace_id

Type: string

Уникальный идентификатор запроса для отладки.

Example: 00000000000000000000000000000000

401 Unauthorized

Не авторизован.

Body

application/json
{
  "code": "VALIDATION_ERROR",
  "message": "Invalid input",
  "trace_id": "00000000000000000000000000000000"
}

Name

Description

code

Type: string

Example: VALIDATION_ERROR

message

Type: string

Example: Invalid input

trace_id

Type: string

Уникальный идентификатор запроса для отладки.

Example: 00000000000000000000000000000000

500 Internal Server Error

Внутренняя ошибка сервера.

Body

application/json
{
  "code": "VALIDATION_ERROR",
  "message": "Invalid input",
  "trace_id": "00000000000000000000000000000000"
}

Name

Description

code

Type: string

Example: VALIDATION_ERROR

message

Type: string

Example: Invalid input

trace_id

Type: string

Уникальный идентификатор запроса для отладки.

Example: 00000000000000000000000000000000