swag-payments/spec/paths/processing@webhooks.yaml
2018-10-22 14:43:35 +03:00

62 lines
1.6 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

post:
description: Установить новый webhook.
tags:
- Webhooks
operationId: createWebhook
parameters:
- $ref: '#/parameters/requestID'
- $ref: '#/parameters/deadline'
- name: webhookParams
description: Параметры устанавливаемого webhook'а
in: body
required: true
schema:
$ref: '#/definitions/Webhook'
responses:
'201':
description: Webhook установлен
schema:
$ref: '#/definitions/Webhook'
'401':
$ref: '#/responses/Unauthorized'
'400':
description: Ошибочные данные webhook'а
schema:
type: object
required:
- code
- message
properties:
code:
description: |
[Код ошибки](#tag/Error-Codes)
type: string
enum:
- invalidShopID
- invalidRequest
- invalidDeadline
message:
description: Человекочитаемое описание ошибки
type: string
example: Shop not found
get:
description: Получить набор установленных webhook'ов.
tags:
- Webhooks
operationId: getWebhooks
parameters:
- $ref: '#/parameters/requestID'
- $ref: '#/parameters/deadline'
responses:
'200':
description: Набор webhook'ов
schema:
type: array
items:
$ref: '#/definitions/Webhook'
'401':
$ref: '#/responses/Unauthorized'
'400':
$ref: '#/responses/DefaultLogicError'