Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- openapi: 3.0.0
- info:
- title: 'СПС:API для взаимодействия с Банком'
- contact:
- email: developer@esphere.ru
- version: 1.0.0-oas3
- servers:
- - url: 'https://test.epshere.ru/api'
- tags:
- - name: token
- description: Методы получения сессионного токена
- - name: requests
- description: Методы работы с запросам от МВД в Банк
- - name: tickets
- description: Методы работы с квитанциями от Банка
- - name: responses
- description: Методы работы с ответом от Банка
- paths:
- '/token':
- post:
- tags:
- - token
- summary: Метод получения сессионного токена
- description: Возвращает сессионный токен, с ограниченным сроком действия
- requestBody:
- required: true
- content:
- application/x-www-form-urlencoded:
- schema:
- type: object
- properties:
- apiKey:
- type: string
- description: Ключ приложения
- required:
- - apiKey
- responses:
- '200':
- description: OK
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/token'
- '403':
- $ref: '#/components/responses/Forbidden'
- '500':
- $ref: '#/components/responses/InternalServerError'
- '/v1.0/request':
- get:
- security:
- - bearerAuth: []
- tags:
- - requests
- summary: Возвращает список запросов в Банк
- description: 'Метод возвращает список запросов МВД, которые требуют ответа от Банка'
- responses:
- '200':
- description: OK
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/list'
- '401':
- $ref: '#/components/responses/Unauthorized'
- '403':
- $ref: '#/components/responses/Forbidden'
- '500':
- $ref: '#/components/responses/InternalServerError'
- delete:
- security:
- - bearerAuth: []
- tags:
- - requests
- description: Метод удаляет несколько запросов
- parameters:
- - in: query
- name: id
- schema:
- type: array
- items:
- type: string
- format: uuid
- responses:
- '200':
- description: OK
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/list'
- '400':
- $ref: '#/components/responses/BadRequest'
- '401':
- $ref: '#/components/responses/Unauthorized'
- '403':
- $ref: '#/components/responses/Forbidden'
- '500':
- $ref: '#/components/responses/InternalServerError'
- '/v1.0/request/{id}':
- get:
- security:
- - bearerAuth: []
- tags:
- - requests
- summary: Метод получения метаданных по запросу
- description: Метод возвращает мета-информацию по конкретному запросу
- parameters:
- - name: id
- in: path
- description: Идентификатор запроса должен быть получен из метода получения списка запроса
- required: true
- schema:
- type: string
- format: uuid
- responses:
- '200':
- description: OK
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/request'
- '400':
- $ref: '#/components/responses/BadRequest'
- '401':
- $ref: '#/components/responses/Unauthorized'
- '403':
- $ref: '#/components/responses/Forbidden'
- '500':
- $ref: '#/components/responses/InternalServerError'
- delete:
- security:
- - bearerAuth: []
- tags:
- - requests
- summary: Метод удаления запроса из очереди для отправки в Банк
- description: Метод удаляет завпрос из очереди для отправки в Банк
- parameters:
- - name: id
- in: path
- description: Список запрос для удаления через ;
- required: true
- schema:
- type: string
- format: uuid
- responses:
- '200':
- description: OK
- '400':
- $ref: '#/components/responses/BadRequest'
- '401':
- $ref: '#/components/responses/Unauthorized'
- '403':
- $ref: '#/components/responses/Forbidden'
- '500':
- $ref: '#/components/responses/InternalServerError'
- '/v1.0/request/{id}/content/{contentId}':
- get:
- security:
- - bearerAuth: []
- tags:
- - requests
- summary: Метод получения файлов
- description: Метод возвращает зашифрованные файлы к запросу
- parameters:
- - name: id
- in: path
- description: Идентификатор запроса должен быть получен из метода получения списка запроса
- required: true
- schema:
- type: string
- format: uuid
- - name: contentId
- in: path
- description: Идентификатор файла должен быть получен из метода получения мета-информации по запросу
- required: true
- schema:
- type: string
- format: uuid
- responses:
- '200':
- description: OK
- content:
- application/octet-stream:
- schema:
- type: string
- format: binary
- '400':
- $ref: '#/components/responses/BadRequest'
- '401':
- $ref: '#/components/responses/Unauthorized'
- '403':
- $ref: '#/components/responses/Forbidden'
- '500':
- $ref: '#/components/responses/InternalServerError'
- '/v1.0/request/{id}/ticket':
- post:
- security:
- - bearerAuth: []
- tags:
- - tickets
- summary: Метод публикации квитанции от Банка
- description: Метод для публикации квитанции от Банка. Квитанцию публикует Банк после обработки запроса
- parameters:
- - name: id
- in: path
- description: Идентификатор запроса
- required: true
- schema:
- type: string
- format: uuid
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/signedFile'
- responses:
- '201':
- description: Created
- '400':
- $ref: '#/components/responses/BadRequest'
- '401':
- $ref: '#/components/responses/Unauthorized'
- '403':
- $ref: '#/components/responses/Forbidden'
- '500':
- $ref: '#/components/responses/InternalServerError'
- '/v1.0/request/{id}/response':
- post:
- security:
- - bearerAuth: []
- tags:
- - responses
- summary: Метод публикации ответа от Банка на запрос МВД
- description: Банк публикует ответ на запрос МВД
- parameters:
- - name: id
- in: path
- description: Идентификатор запроса
- required: true
- schema:
- type: string
- format: uuid
- requestBody:
- content:
- multipart/form-data:
- schema:
- type: object
- properties:
- packageDescription:
- $ref: '#/components/schemas/packageDescription'
- packageContent:
- type: array
- description: Содержимое пакета дкоументов
- items:
- type: string
- format: binary
- responses:
- '201':
- description: Created
- '400':
- description: Ошибка входных параметров
- '401':
- description: Некорректно указан сессионный токен
- '404':
- description: Запрос не найден
- '500':
- description: При обработке запроса возникла непредвиденная ошибка
- components:
- schemas:
- fileType:
- type: string
- description: 'Тип файла: xml/pdf'
- enum:
- - Xml
- - Pdf
- list:
- type: array
- items:
- maxLength: 255
- type: string
- format: uuid
- request:
- type: object
- properties:
- id:
- maxLength: 255
- type: string
- description: Идентификатор запроса
- date:
- type: string
- description: Дата и время формирования запроса
- format: date-time
- caseNumber:
- maxLength: 255
- type: string
- description: Номер дела
- caseDate:
- type: string
- description: Дата возбуждения дела
- format: date
- caseType:
- type: string
- description: 'Признак: уголовное дело/судебное решение'
- enum:
- - Judgment
- - Criminal
- status:
- type: string
- description: 'Статусы запроса'
- enum:
- - Agreement
- - Rejected
- - Awaiting
- - Error
- - Done
- signatures:
- type: array
- description: Подписи
- items:
- type: string
- format: byte
- certificates:
- type: array
- description: Сертификаты шифрования
- items:
- type: string
- format: byte
- content:
- type: array
- description: Информация по дополнительным файлам
- items:
- $ref: '#/components/schemas/contentInfo'
- contentInfo:
- type: object
- properties:
- id:
- type: string
- description: Идентификатор файла для скачивания
- fileName:
- type: string
- maxLength: 255
- description: Имя документа
- type:
- $ref: '#/components/schemas/fileType'
- encrypted:
- type: boolean
- description: Признак зашифрованного файла
- token:
- type: object
- properties:
- access_token:
- type: string
- token_type:
- type: string
- enum:
- - Bearer
- expires_in:
- type: number
- format: int32
- description: 'Время жизни токена, в секундах'
- signedFile:
- type: object
- properties:
- content:
- type: string
- format: byte
- signature:
- type: string
- format: byte
- required:
- - content
- - signature
- packageDescription:
- type: object
- properties:
- documents:
- type: array
- items:
- $ref: '#/components/schemas/document'
- signatures:
- type: array
- items:
- $ref: '#/components/schemas/signature'
- document:
- type: object
- properties:
- id:
- type: string
- format: uuid
- description: Идентификатор документа
- fileName:
- type: string
- maxLength: 255
- type:
- $ref: '#/components/schemas/fileType'
- encrypted:
- type: boolean
- description: Признак зашифрованного файла
- signature:
- type: object
- properties:
- documentRef:
- type: string
- format: uuid
- signature:
- type: string
- format: byte
- required:
- - documentRef
- - signature
- responses:
- BadRequest:
- description: Ошибка входных параметров
- Unauthorized:
- description: Требуется авторизация
- Forbidden:
- description: Не авторизован
- NotFound:
- description: Ресурс не найден
- InternalServerError:
- description: Возникли непредвиденные ошибки во время выполнения операции
- securitySchemes:
- bearerAuth:
- type: http
- scheme: bearer
- bearerFormat: JWT
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement