swag-payments/spec/paths/parties@{partyID}@shops@{shopID}@reports.yaml
2020-09-28 14:23:36 +03:00

88 lines
2.5 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: Сгенерировать отчет с указанным типом по магазину за указанный промежуток времени
tags:
- Reports
operationId: createReportForParty
parameters:
- $ref: '#/parameters/requestID'
- $ref: '#/parameters/deadline'
- $ref: '#/parameters/shopID'
- $ref: '#/parameters/partyID'
- name: createReport
in: body
description: Параметры генерации отчета
required: true
schema:
$ref: '#/definitions/ReportParams'
responses:
'201':
description: Отчет создан
schema:
$ref: '#/definitions/Report'
'401':
$ref: '#/responses/Unauthorized'
'400':
description: Ошибочные данные для генерации
schema:
type: object
required:
- code
- message
properties:
code:
description: |
[Код ошибки](#tag/Error-Codes)
type: string
enum:
- invalidShopID
- invalidRequest
- invalidDeadline
message:
description: Человекочитаемое описание ошибки
type: string
example: "Invalid shop id"
'404':
$ref: '#/responses/NotFound'
get:
description: Получить список отчетов по данному магазину за период
tags:
- Reports
operationId: getReportsForParty
parameters:
- $ref: '#/parameters/requestID'
- $ref: '#/parameters/deadline'
- $ref: '#/parameters/shopID'
- $ref: '#/parameters/fromTime'
- $ref: '#/parameters/toTime'
- $ref: '#/parameters/partyID'
responses:
'200':
description: Найденные отчеты
schema:
type: array
items:
$ref: '#/definitions/Report'
'401':
$ref: '#/responses/Unauthorized'
'400':
description: Ошибочные данные для получения
schema:
type: object
required:
- code
- message
properties:
code:
description: |
[Код ошибки](#tag/Error-Codes)
type: string
enum:
- limitExceeded
- invalidRequest
- invalidDeadline
message:
description: Человекочитаемое описание ошибки
type: string
example: "Max limit: 1000"