mirror of
https://github.com/valitydev/swag-payments.git
synced 2024-11-07 09:58:57 +00:00
1603 lines
35 KiB
YAML
1603 lines
35 KiB
YAML
swagger: '2.0'
|
|
info:
|
|
version: 1.0.0
|
|
title: RBK Money Common API
|
|
description: "An API that implements System's entry point"
|
|
termsOfService: 'http://rbkmoney.com/'
|
|
contact:
|
|
name: Anton Kuranda
|
|
email: a.kuranda@rbkmoney.com
|
|
url: 'https://api.rbkmoney.com'
|
|
host: api.rbkmoney.com
|
|
basePath: /v1
|
|
schemes:
|
|
- https
|
|
consumes:
|
|
- application/json
|
|
produces:
|
|
- application/json
|
|
securityDefinitions:
|
|
bearer:
|
|
type: apiKey
|
|
name: Authorization
|
|
in: header
|
|
description: JWT token
|
|
security:
|
|
- bearer: []
|
|
responses:
|
|
NotFound:
|
|
description: Entity not found
|
|
schema:
|
|
$ref: '#/definitions/GeneralError'
|
|
BadRequest:
|
|
description: Illegal input for operation.
|
|
schema:
|
|
$ref: '#/definitions/LogicError'
|
|
parameters:
|
|
requestID:
|
|
name: X-Request-ID
|
|
in: header
|
|
description: Unique request identifier
|
|
required: true
|
|
type: string
|
|
paths:
|
|
'/processing/me':
|
|
get:
|
|
description: Get my party
|
|
operationId: getMyParty
|
|
tags:
|
|
- Parties
|
|
parameters:
|
|
- $ref: '#/parameters/requestID'
|
|
responses:
|
|
'200':
|
|
description: My party
|
|
schema:
|
|
$ref: '#/definitions/Party'
|
|
'/processing/me/suspend':
|
|
put:
|
|
description: Suspend my party
|
|
operationId: suspendMyParty
|
|
tags:
|
|
- Parties
|
|
parameters:
|
|
- $ref: '#/parameters/requestID'
|
|
responses:
|
|
'202':
|
|
description: Claim registered
|
|
schema:
|
|
type: object
|
|
required:
|
|
- claimID
|
|
properties:
|
|
claimID:
|
|
type: string
|
|
'/processing/me/activate':
|
|
put:
|
|
description: Activate my party
|
|
operationId: activateMyParty
|
|
tags:
|
|
- Parties
|
|
parameters:
|
|
- $ref: '#/parameters/requestID'
|
|
responses:
|
|
'202':
|
|
description: Claim registered
|
|
schema:
|
|
type: object
|
|
required:
|
|
- claimID
|
|
properties:
|
|
claimID:
|
|
type: string
|
|
'/processing/claims/':
|
|
get:
|
|
description: Get claim by status
|
|
operationId: getClaimByStatus
|
|
tags:
|
|
- Claims
|
|
parameters:
|
|
- $ref: '#/parameters/requestID'
|
|
- name: claimStatus
|
|
in: query
|
|
type: string
|
|
enum:
|
|
- pending
|
|
required: true
|
|
responses:
|
|
'200':
|
|
description: Claim found
|
|
schema:
|
|
$ref: '#/definitions/Claim'
|
|
'404':
|
|
$ref: '#/responses/NotFound'
|
|
'/processing/claims/{claimID}':
|
|
get:
|
|
description: Get claim by ID
|
|
operationId: getClaimByID
|
|
tags:
|
|
- Claims
|
|
parameters:
|
|
- $ref: '#/parameters/requestID'
|
|
- name: claimID
|
|
in: path
|
|
description: Claim ID
|
|
required: true
|
|
type: string
|
|
responses:
|
|
'200':
|
|
description: Claim found
|
|
schema:
|
|
$ref: '#/definitions/Claim'
|
|
'404':
|
|
$ref: '#/responses/NotFound'
|
|
'/processing/claims/{claimID}/revoke':
|
|
post:
|
|
description: Revoke claim by ID
|
|
operationId: revokeClaimByID
|
|
tags:
|
|
- Claims
|
|
parameters:
|
|
- $ref: '#/parameters/requestID'
|
|
- name: claimID
|
|
in: path
|
|
description: Claim ID
|
|
required: true
|
|
type: string
|
|
- name: revokeClaim
|
|
in: body
|
|
description: Revoke claim params
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/Reason'
|
|
responses:
|
|
'200':
|
|
description: Claim revoked
|
|
'404':
|
|
$ref: '#/responses/NotFound'
|
|
'400':
|
|
$ref: '#/responses/BadRequest'
|
|
'/processing/shops':
|
|
post:
|
|
description: Claim for creating a shop
|
|
operationId: createShop
|
|
tags:
|
|
- Shops
|
|
parameters:
|
|
- $ref: '#/parameters/requestID'
|
|
- name: createShopArgs
|
|
in: body
|
|
description: New shop params
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/CreateShopArgs'
|
|
responses:
|
|
'202':
|
|
description: Claim registered
|
|
schema:
|
|
type: object
|
|
required:
|
|
- claimID
|
|
properties:
|
|
claimID:
|
|
type: string
|
|
'404':
|
|
$ref: '#/responses/NotFound'
|
|
'/processing/shops/{shopID}':
|
|
post:
|
|
description: Claim for updating the shop
|
|
operationId: updateShop
|
|
tags:
|
|
- Shops
|
|
parameters:
|
|
- $ref: '#/parameters/requestID'
|
|
- name: shopID
|
|
in: path
|
|
description: Shop ID
|
|
required: true
|
|
type: string
|
|
- name: updateShopArgs
|
|
in: body
|
|
description: Shop params for an update
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/UpdateShopArgs'
|
|
responses:
|
|
'202':
|
|
description: Claim registered
|
|
schema:
|
|
type: object
|
|
required:
|
|
- claimID
|
|
properties:
|
|
claimID:
|
|
type: string
|
|
'404':
|
|
$ref: '#/responses/NotFound'
|
|
'400':
|
|
$ref: '#/responses/BadRequest'
|
|
'/processing/shops/{shopID}/suspend':
|
|
put:
|
|
description: Suspend shop
|
|
operationId: suspendShop
|
|
tags:
|
|
- Shops
|
|
parameters:
|
|
- $ref: '#/parameters/requestID'
|
|
- name: shopID
|
|
in: path
|
|
description: Shop ID
|
|
required: true
|
|
type: string
|
|
responses:
|
|
'202':
|
|
description: Claim registered
|
|
schema:
|
|
type: object
|
|
required:
|
|
- claimID
|
|
properties:
|
|
claimID:
|
|
type: string
|
|
'404':
|
|
$ref: '#/responses/NotFound'
|
|
'/processing/shops/{shopID}/activate':
|
|
put:
|
|
description: Activate shop
|
|
operationId: activateShop
|
|
tags:
|
|
- Shops
|
|
parameters:
|
|
- $ref: '#/parameters/requestID'
|
|
- name: shopID
|
|
in: path
|
|
description: Shop ID
|
|
required: true
|
|
type: string
|
|
responses:
|
|
'202':
|
|
description: Claim registered
|
|
schema:
|
|
type: object
|
|
required:
|
|
- claimID
|
|
properties:
|
|
claimID:
|
|
type: string
|
|
'404':
|
|
$ref: '#/responses/NotFound'
|
|
'/processing/shops/{shopID}/accounts':
|
|
get:
|
|
description: Get shop accounts
|
|
operationId: getShopAccounts
|
|
tags:
|
|
- Shops
|
|
parameters:
|
|
- $ref: '#/parameters/requestID'
|
|
- name: shopID
|
|
in: path
|
|
description: Shop ID
|
|
required: true
|
|
type: string
|
|
responses:
|
|
'200':
|
|
description: Accounts found
|
|
schema:
|
|
type: array
|
|
items:
|
|
$ref: '#/definitions/ShopAccount'
|
|
'404':
|
|
$ref: '#/responses/NotFound'
|
|
'/processing/shops/{shopID}/accounts/{accountID}':
|
|
get:
|
|
description: Get account by ID
|
|
operationId: getAccountByID
|
|
tags:
|
|
- Shops
|
|
parameters:
|
|
- $ref: '#/parameters/requestID'
|
|
- name: shopID
|
|
in: path
|
|
description: Shop ID
|
|
required: true
|
|
type: string
|
|
- name: accountID
|
|
in: path
|
|
description: Account ID
|
|
required: true
|
|
type: string
|
|
responses:
|
|
'200':
|
|
description: Account found
|
|
schema:
|
|
$ref: '#/definitions/Account'
|
|
'404':
|
|
$ref: '#/responses/NotFound'
|
|
'/processing/invoices':
|
|
post:
|
|
description: Create new invoice
|
|
tags:
|
|
- Invoices
|
|
operationId: createInvoice
|
|
parameters:
|
|
- $ref: '#/parameters/requestID'
|
|
- name: createInvoiceArgs
|
|
description: New invoice params
|
|
in: body
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/CreateInvoiceArgs'
|
|
responses:
|
|
'201':
|
|
description: Invoice created
|
|
schema:
|
|
type: object
|
|
required:
|
|
- id
|
|
properties:
|
|
id:
|
|
type: string
|
|
'400':
|
|
$ref: '#/responses/BadRequest'
|
|
'/processing/invoices/{invoiceID}':
|
|
get:
|
|
description: Returns invoice information by ID
|
|
tags:
|
|
- Invoices
|
|
operationId: getInvoiceByID
|
|
parameters:
|
|
- $ref: '#/parameters/requestID'
|
|
- name: invoiceID
|
|
in: path
|
|
description: Invoice ID
|
|
required: true
|
|
type: string
|
|
responses:
|
|
'200':
|
|
description: Invoice object
|
|
schema:
|
|
$ref: '#/definitions/Invoice'
|
|
'404':
|
|
$ref: '#/responses/NotFound'
|
|
'400':
|
|
$ref: '#/responses/BadRequest'
|
|
'/processing/invoices/{invoiceID}/fulfill':
|
|
post:
|
|
description: Fulfill invoice
|
|
tags:
|
|
- Invoices
|
|
operationId: fulfillInvoice
|
|
parameters:
|
|
- $ref: '#/parameters/requestID'
|
|
- name: invoiceID
|
|
in: path
|
|
description: Invoice ID
|
|
required: true
|
|
type: string
|
|
- name: fulfillInvoice
|
|
in: body
|
|
description: Fulfill invoice params
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/Reason'
|
|
responses:
|
|
'200':
|
|
description: Invoice fulfilled
|
|
'400':
|
|
$ref: '#/responses/BadRequest'
|
|
'404':
|
|
$ref: '#/responses/NotFound'
|
|
'/processing/invoices/{invoiceID}/rescind':
|
|
post:
|
|
description: Rescind invoice
|
|
tags:
|
|
- Invoices
|
|
operationId: rescindInvoice
|
|
parameters:
|
|
- $ref: '#/parameters/requestID'
|
|
- name: invoiceID
|
|
in: path
|
|
description: Invoice ID
|
|
required: true
|
|
type: string
|
|
- name: rescindInvoice
|
|
in: body
|
|
description: Rescind invoice params
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/Reason'
|
|
responses:
|
|
'200':
|
|
description: Invoice rescinded
|
|
'400':
|
|
$ref: '#/responses/BadRequest'
|
|
'404':
|
|
$ref: '#/responses/NotFound'
|
|
'/processing/invoices/{invoiceID}/events':
|
|
get:
|
|
description: Returns invoice events
|
|
tags:
|
|
- Invoices
|
|
operationId: getInvoiceEvents
|
|
parameters:
|
|
- $ref: '#/parameters/requestID'
|
|
- name: invoiceID
|
|
in: path
|
|
description: Invoice ID
|
|
required: true
|
|
type: string
|
|
- name: limit
|
|
in: query
|
|
description: Events limit
|
|
required: true
|
|
type: integer
|
|
format: int32
|
|
- name: eventID
|
|
in: query
|
|
description: Last seen event id
|
|
required: false
|
|
type: string
|
|
responses:
|
|
'200':
|
|
description: List of invoice events
|
|
schema:
|
|
type: array
|
|
items:
|
|
$ref: '#/definitions/Event'
|
|
'404':
|
|
$ref: '#/responses/NotFound'
|
|
'400':
|
|
$ref: '#/responses/BadRequest'
|
|
'/processing/invoices/{invoiceID}/payments':
|
|
post:
|
|
description: Start new payment
|
|
tags:
|
|
- Payments
|
|
operationId: createPayment
|
|
parameters:
|
|
- $ref: '#/parameters/requestID'
|
|
- name: invoiceID
|
|
in: path
|
|
description: Invoice ID
|
|
required: true
|
|
type: string
|
|
- name: createPaymentArgs
|
|
description: Invoice initiation request
|
|
in: body
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/CreatePaymentArgs'
|
|
responses:
|
|
'201':
|
|
description: Payment created
|
|
schema:
|
|
type: object
|
|
required:
|
|
- id
|
|
properties:
|
|
id:
|
|
type: string
|
|
'404':
|
|
$ref: '#/responses/NotFound'
|
|
'400':
|
|
$ref: '#/responses/BadRequest'
|
|
'/processing/invoices/{invoiceID}/payments/{paymentID}':
|
|
get:
|
|
description: Get payment info
|
|
tags:
|
|
- Payments
|
|
operationId: getPaymentByID
|
|
parameters:
|
|
- $ref: '#/parameters/requestID'
|
|
- name: invoiceID
|
|
in: path
|
|
description: Invoice ID
|
|
required: true
|
|
type: string
|
|
- name: paymentID
|
|
in: path
|
|
description: Payment ID
|
|
required: true
|
|
type: string
|
|
responses:
|
|
'200':
|
|
description: Payment object
|
|
schema:
|
|
$ref: '#/definitions/Payment'
|
|
'404':
|
|
$ref: '#/responses/NotFound'
|
|
'400':
|
|
$ref: '#/responses/BadRequest'
|
|
'/processing/payment_tools':
|
|
post:
|
|
description: Create new card data token
|
|
tags:
|
|
- Tokens
|
|
operationId: createPaymentToolToken
|
|
parameters:
|
|
- $ref: '#/parameters/requestID'
|
|
- name: paymentTool
|
|
description: Payment tool args
|
|
in: body
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/CreatePaymentToolTokenArgs'
|
|
responses:
|
|
'201':
|
|
description: Token created
|
|
schema:
|
|
type: object
|
|
required:
|
|
- token
|
|
- session
|
|
properties:
|
|
token:
|
|
type: string
|
|
session:
|
|
type: string
|
|
'400':
|
|
$ref: '#/responses/BadRequest'
|
|
'/processing/categories/':
|
|
get:
|
|
description: Get categories list
|
|
tags:
|
|
- Categories
|
|
operationId: getCategories
|
|
parameters:
|
|
- $ref: '#/parameters/requestID'
|
|
responses:
|
|
'200':
|
|
description: List of categories
|
|
schema:
|
|
type: array
|
|
items:
|
|
$ref: '#/definitions/Category'
|
|
'/processing/categories/{categoryRef}':
|
|
get:
|
|
description: Get category by reference
|
|
tags:
|
|
- Categories
|
|
operationId: getCategoryByRef
|
|
parameters:
|
|
- $ref: '#/parameters/requestID'
|
|
- name: categoryRef
|
|
in: path
|
|
description: Category reference
|
|
required: true
|
|
type: integer
|
|
format: int32
|
|
responses:
|
|
'200':
|
|
description: Category found
|
|
schema:
|
|
$ref: '#/definitions/Category'
|
|
'404':
|
|
$ref: '#/responses/NotFound'
|
|
'400':
|
|
$ref: '#/responses/BadRequest'
|
|
'/analytics/shops/{shopID}/invoices':
|
|
get:
|
|
description: Search invoices
|
|
tags:
|
|
- Analytics
|
|
operationId: getInvoices
|
|
parameters:
|
|
- $ref: '#/parameters/requestID'
|
|
- name: shopID
|
|
in: path
|
|
description: Shop ID
|
|
required: true
|
|
type: string
|
|
- name: limit
|
|
in: query
|
|
description: Invoices selection limit
|
|
required: false
|
|
type: integer
|
|
- name: offset
|
|
in: query
|
|
description: Invoices selection offset (inclusive)
|
|
required: false
|
|
type: integer
|
|
- name: fromTime
|
|
in: query
|
|
description: Invoices created time from
|
|
required: false
|
|
type: string
|
|
format: date-time
|
|
- name: toTime
|
|
in: query
|
|
description: Invoices created time to
|
|
required: false
|
|
type: string
|
|
format: date-time
|
|
- name: status
|
|
in: query
|
|
description: Invoices statuses (disjunction)
|
|
required: false
|
|
type: array
|
|
items:
|
|
type: string
|
|
enum:
|
|
- unpaid
|
|
- cancelled
|
|
- paid
|
|
- refunded
|
|
- fulfilled
|
|
- name: invoiceID
|
|
in: query
|
|
description: Invoice ID
|
|
required: false
|
|
type: string
|
|
responses:
|
|
'200':
|
|
description: List of invoices
|
|
schema:
|
|
type: object
|
|
properties:
|
|
totalCount:
|
|
type: integer
|
|
invoices:
|
|
type: array
|
|
items:
|
|
$ref: '#/definitions/Invoice'
|
|
'404':
|
|
$ref: '#/responses/NotFound'
|
|
'400':
|
|
$ref: '#/responses/BadRequest'
|
|
'/analytics/shops/{shopID}/payments/stats/conversion':
|
|
get:
|
|
description: Get payments conversion info
|
|
tags:
|
|
- Analytics
|
|
operationId: getPaymentConversionStats
|
|
parameters:
|
|
- $ref: '#/parameters/requestID'
|
|
- name: shopID
|
|
in: path
|
|
description: Shop ID
|
|
required: true
|
|
type: string
|
|
- name: fromTime
|
|
in: query
|
|
description: Selection starting time
|
|
required: true
|
|
type: string
|
|
format: date-time
|
|
- name: toTime
|
|
in: query
|
|
description: Selecting ending time
|
|
required: true
|
|
type: string
|
|
format: date-time
|
|
- name: splitUnit
|
|
in: query
|
|
description: Split unit
|
|
required: true
|
|
type: string
|
|
enum:
|
|
- minute
|
|
- hour
|
|
- day
|
|
- week
|
|
- month
|
|
- year
|
|
- name: splitSize
|
|
in: query
|
|
description: Split interval size (must be positive)
|
|
required: true
|
|
type: integer
|
|
format: int32
|
|
responses:
|
|
'201':
|
|
description: List of payment conversion stats
|
|
schema:
|
|
type: array
|
|
items:
|
|
$ref: '#/definitions/PaymentConversionStat'
|
|
'404':
|
|
$ref: '#/responses/NotFound'
|
|
'400':
|
|
$ref: '#/responses/BadRequest'
|
|
'/analytics/shops/{shopID}/payments/stats/revenue':
|
|
get:
|
|
description: Get payments revenue info
|
|
tags:
|
|
- Analytics
|
|
operationId: getPaymentRevenueStats
|
|
parameters:
|
|
- $ref: '#/parameters/requestID'
|
|
- name: shopID
|
|
in: path
|
|
description: Shop ID
|
|
required: true
|
|
type: string
|
|
- name: fromTime
|
|
in: query
|
|
description: Selection starting time
|
|
required: true
|
|
type: string
|
|
format: date-time
|
|
- name: toTime
|
|
in: query
|
|
description: Selecting ending time
|
|
required: true
|
|
type: string
|
|
format: date-time
|
|
- name: splitUnit
|
|
in: query
|
|
description: Split unit
|
|
required: true
|
|
type: string
|
|
enum:
|
|
- minute
|
|
- hour
|
|
- day
|
|
- week
|
|
- month
|
|
- year
|
|
- name: splitSize
|
|
in: query
|
|
description: Split interval size (must be positive)
|
|
required: true
|
|
type: integer
|
|
format: int32
|
|
responses:
|
|
'201':
|
|
description: List of payment revenue stats
|
|
schema:
|
|
type: array
|
|
items:
|
|
$ref: '#/definitions/PaymentRevenueStat'
|
|
'404':
|
|
$ref: '#/responses/NotFound'
|
|
'400':
|
|
$ref: '#/responses/BadRequest'
|
|
'/analytics/shops/{shopID}/payments/stats/geo':
|
|
get:
|
|
description: Get payments geo info
|
|
tags:
|
|
- Analytics
|
|
operationId: getPaymentGeoStats
|
|
parameters:
|
|
- $ref: '#/parameters/requestID'
|
|
- name: shopID
|
|
in: path
|
|
description: Shop ID
|
|
required: true
|
|
type: string
|
|
- name: fromTime
|
|
in: query
|
|
description: Selection starting time
|
|
required: true
|
|
type: string
|
|
format: date-time
|
|
- name: toTime
|
|
in: query
|
|
description: Selecting ending time
|
|
required: true
|
|
type: string
|
|
format: date-time
|
|
- name: splitUnit
|
|
in: query
|
|
description: Split unit
|
|
required: true
|
|
type: string
|
|
enum:
|
|
- minute
|
|
- hour
|
|
- day
|
|
- week
|
|
- month
|
|
- year
|
|
- name: splitSize
|
|
in: query
|
|
description: Split interval size (must be positive)
|
|
required: true
|
|
type: integer
|
|
format: int32
|
|
responses:
|
|
'201':
|
|
description: List of payment geo stats
|
|
schema:
|
|
type: array
|
|
items:
|
|
$ref: '#/definitions/PaymentGeoStat'
|
|
'404':
|
|
$ref: '#/responses/NotFound'
|
|
'400':
|
|
$ref: '#/responses/BadRequest'
|
|
'/analytics/shops/{shopID}/customers/stats/rate':
|
|
get:
|
|
description: Get payments rate info
|
|
tags:
|
|
- Analytics
|
|
operationId: getPaymentRateStats
|
|
parameters:
|
|
- $ref: '#/parameters/requestID'
|
|
- name: shopID
|
|
in: path
|
|
description: Shop ID
|
|
required: true
|
|
type: string
|
|
- name: fromTime
|
|
in: query
|
|
description: Selection starting time
|
|
required: true
|
|
type: string
|
|
format: date-time
|
|
- name: toTime
|
|
in: query
|
|
description: Selecting ending time
|
|
required: true
|
|
type: string
|
|
format: date-time
|
|
responses:
|
|
'201':
|
|
description: Payment rate stats
|
|
schema:
|
|
$ref: '#/definitions/PaymentRateStat'
|
|
'404':
|
|
$ref: '#/responses/NotFound'
|
|
'400':
|
|
$ref: '#/responses/BadRequest'
|
|
'/analytics/shops/{shopID}/customers/stats/payment_method':
|
|
get:
|
|
description: Payment method stats
|
|
tags:
|
|
- Analytics
|
|
operationId: getPaymentMethodStats
|
|
parameters:
|
|
- $ref: '#/parameters/requestID'
|
|
- name: shopID
|
|
in: path
|
|
description: Shop ID
|
|
required: true
|
|
type: string
|
|
- name: fromTime
|
|
in: query
|
|
description: Selection starting time
|
|
required: true
|
|
type: string
|
|
format: date-time
|
|
- name: toTime
|
|
in: query
|
|
description: Selecting ending time
|
|
required: true
|
|
type: string
|
|
format: date-time
|
|
- name: splitUnit
|
|
in: query
|
|
description: Split unit
|
|
required: true
|
|
type: string
|
|
enum:
|
|
- minute
|
|
- hour
|
|
- day
|
|
- week
|
|
- month
|
|
- year
|
|
- name: splitSize
|
|
in: query
|
|
description: Split interval size (must be positive)
|
|
required: true
|
|
type: integer
|
|
format: int32
|
|
- name: paymentMethod
|
|
in: query
|
|
description: Payment method type
|
|
type: string
|
|
enum:
|
|
- bank_card
|
|
responses:
|
|
'201':
|
|
description: List of payment method stats
|
|
schema:
|
|
type: array
|
|
items:
|
|
$ref: '#/definitions/PaymentMethodStat'
|
|
'404':
|
|
$ref: '#/responses/NotFound'
|
|
'400':
|
|
$ref: '#/responses/BadRequest'
|
|
definitions:
|
|
Claim:
|
|
type: object
|
|
required:
|
|
- id
|
|
- status
|
|
- changeset
|
|
properties:
|
|
id:
|
|
type: string
|
|
status:
|
|
$ref: '#/definitions/ClaimStatus'
|
|
changeset:
|
|
$ref: '#/definitions/PartyChangeset'
|
|
PartyChangeset:
|
|
type: array
|
|
items:
|
|
$ref: '#/definitions/PartyModification'
|
|
PartyModification:
|
|
type: object
|
|
discriminator: modificationType
|
|
required:
|
|
- modificationType
|
|
properties:
|
|
modificationType:
|
|
type: string
|
|
PartySuspension:
|
|
type: object
|
|
allOf:
|
|
- $ref: '#/definitions/PartyModification'
|
|
- type: object
|
|
required:
|
|
- details
|
|
properties:
|
|
details:
|
|
$ref: '#/definitions/Suspension'
|
|
ShopCreation:
|
|
type: object
|
|
allOf:
|
|
- $ref: '#/definitions/PartyModification'
|
|
- type: object
|
|
required:
|
|
- shop
|
|
properties:
|
|
shop:
|
|
$ref: '#/definitions/Shop'
|
|
ShopModificationUnit:
|
|
type: object
|
|
allOf:
|
|
- $ref: '#/definitions/PartyModification'
|
|
- type: object
|
|
required:
|
|
- shopID
|
|
- details
|
|
properties:
|
|
shopID:
|
|
type: string
|
|
details:
|
|
$ref: '#/definitions/ShopModification'
|
|
ShopModification:
|
|
type: object
|
|
discriminator: modificationType
|
|
required:
|
|
- modificationType
|
|
properties:
|
|
modificationType:
|
|
type: string
|
|
ShopSuspension:
|
|
type: object
|
|
allOf:
|
|
- $ref: '#/definitions/ShopModification'
|
|
- type: object
|
|
required:
|
|
- details
|
|
properties:
|
|
details:
|
|
$ref: '#/definitions/Suspension'
|
|
ShopUpdate:
|
|
type: object
|
|
allOf:
|
|
- $ref: '#/definitions/ShopModification'
|
|
- type: object
|
|
required:
|
|
- details
|
|
properties:
|
|
details:
|
|
$ref: '#/definitions/UpdateShopArgs'
|
|
ShopAccountCreated:
|
|
type: object
|
|
allOf:
|
|
- $ref: '#/definitions/ShopModification'
|
|
- type: object
|
|
required:
|
|
- account
|
|
properties:
|
|
account:
|
|
$ref: '#/definitions/ShopAccount'
|
|
Suspension:
|
|
type: object
|
|
required:
|
|
- suspensionType
|
|
properties:
|
|
suspensionType:
|
|
type: string
|
|
enum:
|
|
- active
|
|
- suspended
|
|
ClaimStatus:
|
|
type: object
|
|
discriminator: status
|
|
required:
|
|
- status
|
|
properties:
|
|
status:
|
|
type: string
|
|
ClaimPending:
|
|
type: object
|
|
allOf:
|
|
- $ref: '#/definitions/ClaimStatus'
|
|
ClaimAccepted:
|
|
type: object
|
|
allOf:
|
|
- $ref: '#/definitions/ClaimStatus'
|
|
ClaimDenied:
|
|
type: object
|
|
allOf:
|
|
- $ref: '#/definitions/ClaimStatus'
|
|
- type: object
|
|
required:
|
|
- reason
|
|
properties:
|
|
reason:
|
|
type: string
|
|
CreateShopArgs:
|
|
type: object
|
|
required:
|
|
- categoryRef
|
|
- shopDetails
|
|
properties:
|
|
categoryRef:
|
|
type: integer
|
|
format: int32
|
|
shopDetails:
|
|
$ref: '#/definitions/ShopDetails'
|
|
contractor:
|
|
$ref: '#/definitions/Contractor'
|
|
ShopDetails:
|
|
type: object
|
|
required:
|
|
- name
|
|
properties:
|
|
name:
|
|
type: string
|
|
description:
|
|
type: string
|
|
location:
|
|
type: string
|
|
UpdateShopArgs:
|
|
properties:
|
|
categoryRef:
|
|
type: integer
|
|
format: int32
|
|
contractor:
|
|
$ref: '#/definitions/Contractor'
|
|
shopDetails:
|
|
$ref: '#/definitions/ShopDetails'
|
|
Contractor:
|
|
type: object
|
|
required:
|
|
- registeredName
|
|
- legalEntity
|
|
properties:
|
|
registeredName:
|
|
type: string
|
|
legalEntity:
|
|
type: string
|
|
Category:
|
|
type: object
|
|
required:
|
|
- name
|
|
- categoryRef
|
|
properties:
|
|
name:
|
|
type: string
|
|
categoryRef:
|
|
type: integer
|
|
format: int32
|
|
description:
|
|
type: string
|
|
Party:
|
|
type: object
|
|
required:
|
|
- partyID
|
|
- isBlocked
|
|
- isSuspended
|
|
- shops
|
|
properties:
|
|
partyID:
|
|
type: string
|
|
isBlocked:
|
|
type: boolean
|
|
isSuspended:
|
|
type: boolean
|
|
shops:
|
|
type: array
|
|
items:
|
|
$ref: '#/definitions/Shop'
|
|
Shop:
|
|
type: object
|
|
required:
|
|
- shopID
|
|
- isBlocked
|
|
- isSuspended
|
|
- categoryRef
|
|
- shopDetails
|
|
properties:
|
|
shopID:
|
|
type: string
|
|
isBlocked:
|
|
type: boolean
|
|
isSuspended:
|
|
type: boolean
|
|
categoryRef:
|
|
type: integer
|
|
format: int32
|
|
shopDetails:
|
|
$ref: '#/definitions/ShopDetails'
|
|
contractor:
|
|
$ref: '#/definitions/Contractor'
|
|
contract:
|
|
$ref: '#/definitions/ShopContract'
|
|
ShopContract:
|
|
type: object
|
|
required:
|
|
- number
|
|
- systemContractorRef
|
|
- concludedAt
|
|
- validSince
|
|
- validUntil
|
|
properties:
|
|
number:
|
|
type: string
|
|
systemContractorRef:
|
|
type: string
|
|
concludedAt:
|
|
type: string
|
|
format: date-time
|
|
validSince:
|
|
type: string
|
|
format: date-time
|
|
validUntil:
|
|
type: string
|
|
format: date-time
|
|
terminatedAt:
|
|
type: string
|
|
format: date-time
|
|
ShopAccount:
|
|
type: object
|
|
required:
|
|
- generalID
|
|
- guaranteeID
|
|
properties:
|
|
generalID:
|
|
type: string
|
|
guaranteeID:
|
|
type: string
|
|
Account:
|
|
type: object
|
|
required:
|
|
- id
|
|
- ownAmount
|
|
- availableAmount
|
|
- currency
|
|
properties:
|
|
id:
|
|
type: string
|
|
ownAmount:
|
|
type: integer
|
|
availableAmount:
|
|
type: integer
|
|
currency:
|
|
type: string
|
|
PaymentConversionStat:
|
|
type: object
|
|
required:
|
|
- offset
|
|
- successfulCount
|
|
- totalCount
|
|
- conversion
|
|
properties:
|
|
offset:
|
|
type: integer
|
|
successfulCount:
|
|
type: integer
|
|
totalCount:
|
|
type: integer
|
|
conversion:
|
|
type: number
|
|
PaymentRateStat:
|
|
type: object
|
|
required:
|
|
- uniqueCount
|
|
properties:
|
|
uniqueCount:
|
|
type: integer
|
|
PaymentGeoStat:
|
|
type: object
|
|
required:
|
|
- offset
|
|
- cityName
|
|
- currency
|
|
- profit
|
|
- revenue
|
|
properties:
|
|
offset:
|
|
type: integer
|
|
cityName:
|
|
type: string
|
|
currency:
|
|
type: string
|
|
profit:
|
|
type: integer
|
|
revenue:
|
|
type: integer
|
|
PaymentMethodStat:
|
|
type: object
|
|
discriminator: statType
|
|
required:
|
|
- statType
|
|
properties:
|
|
statType:
|
|
type: string
|
|
PaymentMethodBankCardStat:
|
|
type: object
|
|
allOf:
|
|
- $ref: '#/definitions/PaymentMethodStat'
|
|
- type: object
|
|
required:
|
|
- offset
|
|
- totalCount
|
|
- paymentSystem
|
|
- profit
|
|
- revenue
|
|
properties:
|
|
offset:
|
|
type: integer
|
|
totalCount:
|
|
type: integer
|
|
paymentSystem:
|
|
type: string
|
|
profit:
|
|
type: integer
|
|
revenue:
|
|
type: integer
|
|
PaymentRevenueStat:
|
|
type: object
|
|
required:
|
|
- offset
|
|
- currency
|
|
- profit
|
|
- revenue
|
|
properties:
|
|
offset:
|
|
type: integer
|
|
currency:
|
|
type: string
|
|
profit:
|
|
type: integer
|
|
revenue:
|
|
type: integer
|
|
CreatePaymentToolTokenArgs:
|
|
type: object
|
|
required:
|
|
- paymentTool
|
|
- clientInfo
|
|
properties:
|
|
paymentTool:
|
|
$ref: '#/definitions/PaymentTool'
|
|
clientInfo:
|
|
$ref: '#/definitions/ClientInfo'
|
|
PaymentTool:
|
|
type: object
|
|
discriminator: paymentToolType
|
|
properties:
|
|
paymentToolType:
|
|
type: string
|
|
required:
|
|
- paymentToolType
|
|
CardData:
|
|
type: object
|
|
allOf:
|
|
- $ref: '#/definitions/PaymentTool'
|
|
- type: object
|
|
required:
|
|
- cardNumber
|
|
- expDate
|
|
- cvv
|
|
properties:
|
|
cardHolder:
|
|
type: string
|
|
cardNumber:
|
|
type: string
|
|
pattern: ^\d{10,19}$
|
|
expDate:
|
|
type: string
|
|
pattern: ^\d{2}\/\d{2}$
|
|
cvv:
|
|
type: string
|
|
pattern: ^\d{3,4}$
|
|
Invoice:
|
|
type: object
|
|
required:
|
|
- shopID
|
|
- amount
|
|
- currency
|
|
- context
|
|
- product
|
|
properties:
|
|
id:
|
|
type: string
|
|
shopID:
|
|
type: string
|
|
amount:
|
|
type: integer
|
|
format: int64
|
|
currency:
|
|
type: string
|
|
context:
|
|
$ref: '#/definitions/InvoiceContext'
|
|
dueDate:
|
|
type: string
|
|
format: date-time
|
|
status:
|
|
type: string
|
|
enum:
|
|
- unpaid
|
|
- cancelled
|
|
- paid
|
|
- refunded
|
|
- fulfilled
|
|
product:
|
|
type: string
|
|
description:
|
|
type: string
|
|
CreateInvoiceArgs:
|
|
type: object
|
|
required:
|
|
- shopID
|
|
- amount
|
|
- currency
|
|
- product
|
|
properties:
|
|
shopID:
|
|
type: string
|
|
amount:
|
|
type: integer
|
|
format: int64
|
|
currency:
|
|
type: string
|
|
context:
|
|
$ref: '#/definitions/InvoiceContext'
|
|
dueDate:
|
|
type:
|
|
string
|
|
format:
|
|
date-time
|
|
product:
|
|
type: string
|
|
description:
|
|
type: string
|
|
CreatePaymentArgs:
|
|
type: object
|
|
required:
|
|
- paymentToolToken
|
|
- paymentSession
|
|
- contactInfo
|
|
properties:
|
|
paymentToolToken:
|
|
type: string
|
|
paymentSession:
|
|
type: string
|
|
contactInfo:
|
|
$ref: '#/definitions/ContactInfo'
|
|
Payment:
|
|
type: object
|
|
required:
|
|
- id
|
|
- invoiceID
|
|
- createdAt
|
|
- status
|
|
- paymentToolToken
|
|
properties:
|
|
id:
|
|
type: string
|
|
invoiceID:
|
|
type: string
|
|
createdAt:
|
|
type: string
|
|
format: date-time
|
|
status:
|
|
type: string
|
|
enum:
|
|
- pending
|
|
- succeeded
|
|
- failed
|
|
paymentToolToken:
|
|
type: string
|
|
Event:
|
|
type: object
|
|
discriminator: eventType
|
|
required:
|
|
- id
|
|
- createdAt
|
|
- eventType
|
|
properties:
|
|
id:
|
|
type: integer
|
|
createdAt:
|
|
type: string
|
|
format: date-time
|
|
eventType:
|
|
type: string
|
|
EventInvoiceStatusChanged:
|
|
type: object
|
|
allOf:
|
|
- $ref: '#/definitions/Event'
|
|
- type: object
|
|
required:
|
|
- status
|
|
properties:
|
|
status:
|
|
type: string
|
|
enum:
|
|
- unpaid
|
|
- cancelled
|
|
- paid
|
|
- refunded
|
|
- fulfilled
|
|
EventPaymentStatusChanged:
|
|
type: object
|
|
allOf:
|
|
- $ref: '#/definitions/Event'
|
|
- type: object
|
|
required:
|
|
- status
|
|
- paymentID
|
|
properties:
|
|
paymentID:
|
|
type: string
|
|
status:
|
|
type: string
|
|
enum:
|
|
- pending
|
|
- succeeded
|
|
- failed
|
|
EventInvoiceCreated:
|
|
type: object
|
|
allOf:
|
|
- $ref: '#/definitions/Event'
|
|
- type: object
|
|
required:
|
|
- invoice
|
|
properties:
|
|
invoice:
|
|
$ref: '#/definitions/Invoice'
|
|
EventPaymentStarted:
|
|
type: object
|
|
allOf:
|
|
- $ref: '#/definitions/Event'
|
|
- type: object
|
|
required:
|
|
- payment
|
|
properties:
|
|
payment:
|
|
$ref: '#/definitions/Payment'
|
|
EventPaymentBound:
|
|
type: object
|
|
allOf:
|
|
- $ref: '#/definitions/Event'
|
|
- type: object
|
|
required:
|
|
- paymentID
|
|
properties:
|
|
paymentID:
|
|
type: string
|
|
EventInvoicePaymentInteractionRequested:
|
|
type: object
|
|
allOf:
|
|
- $ref: '#/definitions/Event'
|
|
- type: object
|
|
required:
|
|
- paymentID
|
|
- userInteraction
|
|
properties:
|
|
paymentID:
|
|
type: string
|
|
userInteraction:
|
|
$ref: '#/definitions/UserInteraction'
|
|
UserInteraction:
|
|
type: object
|
|
discriminator: interactionType
|
|
required:
|
|
- interactionType
|
|
properties:
|
|
interactionType:
|
|
type: string
|
|
Redirect:
|
|
type: object
|
|
allOf:
|
|
- $ref: '#/definitions/UserInteraction'
|
|
- type: object
|
|
required:
|
|
- request
|
|
properties:
|
|
request:
|
|
$ref: '#/definitions/BrowserRequest'
|
|
BrowserRequest:
|
|
type: object
|
|
discriminator: requestType
|
|
required:
|
|
- requestType
|
|
properties:
|
|
requestType:
|
|
type: string
|
|
BrowserGetRequest:
|
|
type: object
|
|
allOf:
|
|
- $ref: '#/definitions/BrowserRequest'
|
|
- type: object
|
|
required:
|
|
- uriTemplate
|
|
properties:
|
|
uriTemplate:
|
|
type: string
|
|
BrowserPostRequest:
|
|
type: object
|
|
allOf:
|
|
- $ref: '#/definitions/BrowserRequest'
|
|
- type: object
|
|
required:
|
|
- uriTemplate
|
|
- form
|
|
properties:
|
|
uriTemplate:
|
|
type: string
|
|
form:
|
|
$ref: "#/definitions/UserInteractionForm"
|
|
UserInteractionForm:
|
|
type: array
|
|
items:
|
|
type: object
|
|
required:
|
|
- key
|
|
- template
|
|
properties:
|
|
key:
|
|
type: string
|
|
template:
|
|
type: string
|
|
Reason:
|
|
type: object
|
|
required:
|
|
- reason
|
|
properties:
|
|
reason:
|
|
type: string
|
|
GeneralError:
|
|
type: object
|
|
required:
|
|
- message
|
|
properties:
|
|
message:
|
|
type: string
|
|
LogicError:
|
|
type: object
|
|
required:
|
|
- code
|
|
- message
|
|
properties:
|
|
code:
|
|
type: string
|
|
message:
|
|
type: string
|
|
InvoiceContext:
|
|
type: object
|
|
maxLength: 512
|
|
ContactInfo:
|
|
type: object
|
|
properties:
|
|
phoneNumber:
|
|
type: string
|
|
email:
|
|
type: string
|
|
ClientInfo:
|
|
type: object
|
|
required:
|
|
- fingerprint
|
|
properties:
|
|
fingerprint:
|
|
type: string
|