2017-04-24 13:30:38 +00:00
|
|
|
|
post:
|
|
|
|
|
description: Установить новый webhook.
|
|
|
|
|
tags:
|
|
|
|
|
- Webhooks
|
|
|
|
|
operationId: createWebhook
|
|
|
|
|
parameters:
|
|
|
|
|
- $ref: '#/parameters/requestID'
|
2018-09-27 06:44:49 +00:00
|
|
|
|
- $ref: '#/parameters/deadline'
|
2017-04-24 13:30:38 +00:00
|
|
|
|
- name: webhookParams
|
|
|
|
|
description: Параметры устанавливаемого webhook'а
|
|
|
|
|
in: body
|
|
|
|
|
required: true
|
|
|
|
|
schema:
|
2017-10-23 13:26:44 +00:00
|
|
|
|
$ref: '#/definitions/Webhook'
|
2017-04-24 13:30:38 +00:00
|
|
|
|
responses:
|
|
|
|
|
'201':
|
|
|
|
|
description: Webhook установлен
|
|
|
|
|
schema:
|
|
|
|
|
$ref: '#/definitions/Webhook'
|
2018-10-22 08:45:48 +00:00
|
|
|
|
'401':
|
|
|
|
|
$ref: '#/responses/Unauthorized'
|
2017-04-24 13:30:38 +00:00
|
|
|
|
'400':
|
2018-05-07 13:05:18 +00:00
|
|
|
|
description: Ошибочные данные webhook'а
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
required:
|
|
|
|
|
- code
|
|
|
|
|
- message
|
|
|
|
|
properties:
|
|
|
|
|
code:
|
|
|
|
|
description: |
|
|
|
|
|
[Код ошибки](#tag/Error-Codes)
|
|
|
|
|
type: string
|
|
|
|
|
enum:
|
|
|
|
|
- invalidShopID
|
2018-10-22 08:45:48 +00:00
|
|
|
|
- invalidRequest
|
|
|
|
|
- invalidDeadline
|
2018-05-07 13:05:18 +00:00
|
|
|
|
message:
|
|
|
|
|
description: Человекочитаемое описание ошибки
|
|
|
|
|
type: string
|
|
|
|
|
example: Shop not found
|
2017-04-24 13:30:38 +00:00
|
|
|
|
|
|
|
|
|
get:
|
|
|
|
|
description: Получить набор установленных webhook'ов.
|
|
|
|
|
tags:
|
|
|
|
|
- Webhooks
|
|
|
|
|
operationId: getWebhooks
|
|
|
|
|
parameters:
|
|
|
|
|
- $ref: '#/parameters/requestID'
|
2018-09-27 06:44:49 +00:00
|
|
|
|
- $ref: '#/parameters/deadline'
|
2017-04-24 13:30:38 +00:00
|
|
|
|
responses:
|
|
|
|
|
'200':
|
|
|
|
|
description: Набор webhook'ов
|
|
|
|
|
schema:
|
|
|
|
|
type: array
|
|
|
|
|
items:
|
|
|
|
|
$ref: '#/definitions/Webhook'
|
2018-10-22 08:45:48 +00:00
|
|
|
|
'401':
|
|
|
|
|
$ref: '#/responses/Unauthorized'
|
|
|
|
|
'400':
|
2018-10-22 11:43:35 +00:00
|
|
|
|
$ref: '#/responses/DefaultLogicError'
|