mirror of
https://github.com/valitydev/swag-payments.git
synced 2024-11-06 09:35:22 +00:00
46d5dc527e
Add optional external ID to entity params. Add ExternalIDConflict responses
49 lines
1.5 KiB
YAML
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'
|