swag-payments/spec/paths/processing@invoice-templates.yaml
Yaroslav Rogov 46d5dc527e
ED-81+ED-92+ED-93+ED-94/feat: Add external ids
Add optional external ID to entity params.
Add ExternalIDConflict responses
2021-03-30 13:51:12 +03:00

49 lines
1.5 KiB
YAML

post:
description: Создать новый шаблон инвойса.
tags:
- InvoiceTemplates
operationId: createInvoiceTemplate
parameters:
- $ref: '#/parameters/requestID'
- $ref: '#/parameters/deadline'
- name: invoiceTemplateCreateParams
description: Параметры шаблона инвойса.
in: body
required: true
schema:
$ref: '#/definitions/InvoiceTemplateCreateParams'
responses:
'201':
description: Шаблон инвойса создан.
schema:
$ref: '#/definitions/InvoiceTemplateAndToken'
'401':
$ref: '#/responses/Unauthorized'
'400':
description: Ошибочные данные для создания шаблона
schema:
type: object
required:
- code
- message
properties:
code:
description: |
[Код ошибки](#tag/Error-Codes)
type: string
enum:
- invalidPartyID
- invalidRequest
- invalidDeadline
- invalidShopID
- invalidPartyStatus
- invalidShopStatus
- invalidInvoiceCart
- ambiguousPartyID
message:
description: Человекочитаемое описание ошибки
type: string
example: Lifetime cannot be zero
'409':
$ref: '#/responses/ExternalIDConflict'