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.4 KiB
YAML
49 lines
1.4 KiB
YAML
post:
|
|
description: Создать нового плательщика.
|
|
tags:
|
|
- Customers
|
|
operationId: createCustomer
|
|
parameters:
|
|
- $ref: '#/parameters/requestID'
|
|
- $ref: '#/parameters/deadline'
|
|
- name: customerParams
|
|
description: Параметры создаваемого плательщика
|
|
in: body
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/CustomerParams'
|
|
responses:
|
|
'201':
|
|
description: Плательщик создан
|
|
schema:
|
|
$ref: '#/definitions/CustomerAndToken'
|
|
'401':
|
|
$ref: '#/responses/Unauthorized'
|
|
'400':
|
|
description: Ошибочные данные плательщика
|
|
schema:
|
|
type: object
|
|
required:
|
|
- code
|
|
- message
|
|
properties:
|
|
code:
|
|
description: |
|
|
[Код ошибки](#tag/Error-Codes)
|
|
type: string
|
|
enum:
|
|
- operationNotPermitted
|
|
- invalidPartyID
|
|
- invalidShopID
|
|
- invalidPartyStatus
|
|
- invalidShopStatus
|
|
- invalidRequest
|
|
- invalidDeadline
|
|
- ambiguousPartyID
|
|
message:
|
|
description: Человекочитаемое описание ошибки
|
|
type: string
|
|
example: Operation not permitted
|
|
'409':
|
|
$ref: '#/responses/ExternalIDConflict'
|