swag-payments/spec/paths/processing@webhooks.yaml

62 lines
1.6 KiB
YAML
Raw Normal View History

post:
description: Установить новый webhook.
tags:
- Webhooks
operationId: createWebhook
parameters:
- $ref: '#/parameters/requestID'
2018-09-27 06:44:49 +00:00
- $ref: '#/parameters/deadline'
- name: webhookParams
description: Параметры устанавливаемого webhook'а
in: body
required: true
schema:
2017-10-23 13:26:44 +00:00
$ref: '#/definitions/Webhook'
responses:
'201':
description: Webhook установлен
schema:
$ref: '#/definitions/Webhook'
2018-10-22 08:45:48 +00:00
'401':
$ref: '#/responses/Unauthorized'
'400':
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
message:
description: Человекочитаемое описание ошибки
type: string
example: Shop not found
get:
description: Получить набор установленных webhook'ов.
tags:
- Webhooks
operationId: getWebhooks
parameters:
- $ref: '#/parameters/requestID'
2018-09-27 06:44:49 +00:00
- $ref: '#/parameters/deadline'
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'