Created
June 15, 2020 10:50
-
-
Save sabomichal/3596bd8bd54d825e309904141cbdfb04 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openapi: 3.0.1 | |
info: | |
title: OpenAPI definition | |
version: v0 | |
servers: | |
- url: "http://localhost:2589" | |
description: Generated server url | |
paths: | |
/api/v1/transaction: | |
get: | |
tags: | |
- Transactions | |
summary: Return transactions (now only with awaiting-bookmaker-approval filter) | |
operationId: getTransactions | |
parameters: | |
- name: awaiting-bookmaker-approval | |
in: query | |
description: filter for transactions which are awaiting for bookmaker approval | |
required: true | |
schema: | |
type: string | |
responses: | |
"200": | |
description: Successfully returned transactions based on applied filter/s | |
content: | |
application/json: | |
schema: | |
type: array | |
items: | |
$ref: "#/components/schemas/OfferActiveBookmakerApprovalAwaitingTransactionListItem" | |
/api/v1/offer/{ticketId}: | |
get: | |
tags: | |
- Offers | |
summary: Find offer by ticketId | |
operationId: getOffer | |
parameters: | |
- name: ticketId | |
in: path | |
required: true | |
schema: | |
type: string | |
- name: do_not_forward | |
in: query | |
description: if request should not be forwarded to another instance (when | |
this instance does not have needed data) | |
schema: | |
type: string | |
responses: | |
"200": | |
description: offer found | |
content: | |
application/json: | |
schema: | |
$ref: "#/components/schemas/OfferActiveBookmakerApprovalAwaitingTransactionDetail" | |
"404": | |
description: Offer not found | |
content: | |
application/json: | |
schema: | |
$ref: "#/components/schemas/SingleCmdRespDto" | |
"500": | |
description: "Proxy loop, possible rebalance in progress or Unknown partition\ | |
\ processor" | |
content: | |
application/json: | |
schema: | |
$ref: "#/components/schemas/SingleCmdRespDto" | |
/api/v1/offers/forbid: | |
post: | |
tags: | |
- Offers | |
summary: Forbid offers by ticketIds | |
operationId: forbidOffers | |
parameters: | |
- name: do_not_forward | |
in: query | |
description: if request should not be forwarded to another instance (when | |
this instance does not have needed data) | |
schema: | |
type: string | |
requestBody: | |
description: "List of ticketIds, which will be used to find offer to forbid" | |
content: | |
application/json: | |
schema: | |
$ref: "#/components/schemas/ForbidOffersDto" | |
responses: | |
"200": | |
description: Response | |
content: | |
application/json: | |
schema: | |
$ref: "#/components/schemas/BatchCmdRespDto" | |
/api/v1/restrictions/global: | |
post: | |
tags: | |
- Global restrictions | |
summary: Change global restrictions | |
operationId: changeGlobalRestrictions | |
requestBody: | |
description: Global restrictions data | |
content: | |
application/json: | |
schema: | |
$ref: "#/components/schemas/ChangeGlobalRestrictionsReqDto" | |
responses: | |
"200": | |
description: Single command response | |
content: | |
application/json: | |
schema: | |
$ref: "#/components/schemas/SingleCmdRespDto" | |
/api/v1/offer/{ticketId}/transaction/start: | |
post: | |
tags: | |
- Transactions | |
summary: Start transaction | |
operationId: startTransaction | |
parameters: | |
- name: ticketId | |
in: path | |
required: true | |
schema: | |
type: string | |
- name: do_not_forward | |
in: query | |
description: if request should not be forwarded to another instance (when | |
this instance does not have needed data) | |
schema: | |
type: string | |
requestBody: | |
description: Start transaction body request | |
content: | |
application/json: | |
schema: | |
$ref: "#/components/schemas/StartTransactionReqDto" | |
responses: | |
"200": | |
description: Single command response | |
content: | |
application/json: | |
schema: | |
$ref: "#/components/schemas/SingleCmdRespDto" | |
"404": | |
description: Offer not found | |
content: | |
application/json: | |
schema: | |
$ref: "#/components/schemas/SingleCmdRespDto" | |
"412": | |
description: Some precondition failed | |
content: | |
application/json: | |
schema: | |
$ref: "#/components/schemas/SingleCmdRespDto" | |
"500": | |
description: "Proxy loop, possible rebalance in progress or Unknown partition\ | |
\ processor" | |
content: | |
application/json: | |
schema: | |
$ref: "#/components/schemas/SingleCmdRespDto" | |
/api/v1/offer/{ticketId}/transaction/{activeTransactionId}/approve: | |
post: | |
tags: | |
- Transactions | |
summary: Approve transaction | |
operationId: approveTransaction | |
parameters: | |
- name: ticketId | |
in: path | |
required: true | |
schema: | |
type: string | |
- name: activeTransactionId | |
in: path | |
required: true | |
schema: | |
type: string | |
- name: do_not_forward | |
in: query | |
description: if request should not be forwarded to another instance (when | |
this instance does not have needed data) | |
schema: | |
type: string | |
requestBody: | |
description: Approve transaction body request | |
content: | |
application/json: | |
schema: | |
$ref: "#/components/schemas/ApproveTransactionReqDto" | |
responses: | |
"200": | |
description: Single command response | |
content: | |
application/json: | |
schema: | |
$ref: "#/components/schemas/SingleCmdRespDto" | |
"404": | |
description: Offer not found | |
content: | |
application/json: | |
schema: | |
$ref: "#/components/schemas/SingleCmdRespDto" | |
"412": | |
description: Some precondition failed | |
content: | |
application/json: | |
schema: | |
$ref: "#/components/schemas/SingleCmdRespDto" | |
"500": | |
description: "Proxy loop, possible rebalance in progress or Unknown partition\ | |
\ processor" | |
content: | |
application/json: | |
schema: | |
$ref: "#/components/schemas/SingleCmdRespDto" | |
/api/v1/offer/{ticketId}/transaction/{activeTransactionId}/reject: | |
post: | |
tags: | |
- Transactions | |
summary: Reject transaction | |
operationId: rejectTransaction | |
parameters: | |
- name: ticketId | |
in: path | |
required: true | |
schema: | |
type: string | |
- name: activeTransactionId | |
in: path | |
required: true | |
schema: | |
type: string | |
- name: do_not_forward | |
in: query | |
description: if request should not be forwarded to another instance (when | |
this instance does not have needed data) | |
schema: | |
type: string | |
requestBody: | |
description: Reject transaction body request | |
content: | |
application/json: | |
schema: | |
$ref: "#/components/schemas/RejectTransactionReqDto" | |
responses: | |
"200": | |
description: Single command response | |
content: | |
application/json: | |
schema: | |
$ref: "#/components/schemas/SingleCmdRespDto" | |
"404": | |
description: Offer not found | |
content: | |
application/json: | |
schema: | |
$ref: "#/components/schemas/SingleCmdRespDto" | |
"412": | |
description: Some precondition failed | |
content: | |
application/json: | |
schema: | |
$ref: "#/components/schemas/SingleCmdRespDto" | |
"500": | |
description: "Proxy loop, possible rebalance in progress or Unknown partition\ | |
\ processor" | |
content: | |
application/json: | |
schema: | |
$ref: "#/components/schemas/SingleCmdRespDto" | |
/api/v1/offer/{ticketId}/transaction/{activeTransactionId}/reject-and-forbid: | |
post: | |
tags: | |
- Transactions | |
summary: Reject transaction and forbid offer | |
operationId: rejectTransactionAndForbidOffer | |
parameters: | |
- name: ticketId | |
in: path | |
required: true | |
schema: | |
type: string | |
- name: activeTransactionId | |
in: path | |
required: true | |
schema: | |
type: string | |
- name: do_not_forward | |
in: query | |
description: if request should not be forwarded to another instance (when | |
this instance does not have needed data) | |
schema: | |
type: string | |
requestBody: | |
description: Reject transaction and forbid offer body request | |
content: | |
application/json: | |
schema: | |
$ref: "#/components/schemas/RejectTransactionAndForbidOfferReqDto" | |
responses: | |
"200": | |
description: Single command response | |
content: | |
application/json: | |
schema: | |
$ref: "#/components/schemas/SingleCmdRespDto" | |
"404": | |
description: Offer not found | |
content: | |
application/json: | |
schema: | |
$ref: "#/components/schemas/SingleCmdRespDto" | |
"412": | |
description: Some precondition failed | |
content: | |
application/json: | |
schema: | |
$ref: "#/components/schemas/SingleCmdRespDto" | |
"500": | |
description: "Proxy loop, possible rebalance in progress or Unknown partition\ | |
\ processor" | |
content: | |
application/json: | |
schema: | |
$ref: "#/components/schemas/SingleCmdRespDto" | |
components: | |
schemas: | |
OfferActiveBookmakerApprovalAwaitingTransactionListItem: | |
type: object | |
properties: | |
ticketId: | |
$ref: "#/components/schemas/TicketId" | |
id: | |
type: integer | |
format: int32 | |
offeredAmount: | |
type: number | |
requestedAmount: | |
type: number | |
contractId: | |
type: integer | |
format: int64 | |
registrationBranchId: | |
type: integer | |
format: int32 | |
stake: | |
type: number | |
type: | |
type: string | |
enum: | |
- LIVE_SOLO | |
- LIVE_AKO | |
- PREMATCH_SOLO | |
- PREMATCH_AKO | |
- HYBRID | |
TicketId: | |
type: object | |
properties: | |
ticketPart: | |
type: integer | |
format: int64 | |
branchPart: | |
type: integer | |
format: int32 | |
OfferActiveBookmakerApprovalAwaitingTransactionDetail: | |
type: object | |
properties: | |
ticketId: | |
$ref: "#/components/schemas/TicketId" | |
activeTransactionId: | |
type: integer | |
format: int32 | |
contractId: | |
type: integer | |
format: int64 | |
registrationBranchId: | |
type: integer | |
format: int32 | |
registrationChannel: | |
type: string | |
enum: | |
- BRANCH | |
- PORTAL | |
- MOBILE_PORTAL | |
- NATIVE_APP | |
- SMS | |
stake: | |
type: number | |
initialWin: | |
type: number | |
initialOdds: | |
type: number | |
offeredAmount: | |
type: number | |
type: | |
type: string | |
enum: | |
- LIVE_SOLO | |
- LIVE_AKO | |
- PREMATCH_SOLO | |
- PREMATCH_AKO | |
- HYBRID | |
requestedAmount: | |
type: number | |
prematchInLive: | |
type: boolean | |
picks: | |
type: array | |
properties: | |
empty: | |
type: boolean | |
items: | |
$ref: "#/components/schemas/Pick" | |
Pick: | |
type: object | |
properties: | |
betId: | |
type: integer | |
format: int64 | |
selectionCode: | |
type: integer | |
format: int32 | |
systemGroup: | |
type: integer | |
format: int32 | |
initialOdds: | |
type: number | |
currentOdds: | |
type: number | |
prematchInLiveCurrentOdds: | |
type: number | |
CommandResultDto: | |
type: object | |
properties: | |
commandResultType: | |
type: string | |
enum: | |
- StartTransactionCommandResult | |
- BookmakerApproveTransactionCommandResult | |
- BookmakerRejectTransactionCommandResult | |
- BookmakerRejectTransactionAndForbidOfferCommandResult | |
- ForbidOfferCommandResult | |
- ForbidOfferTicketTypeCommandResult | |
- GenericErrorResult | |
- NoSuchOfferErrorResult | |
- InvalidTicketSequenceErrorResult | |
- CreateOfferCommandAlreadyExistsErrorResult | |
- InvalidPickSequenceErrorResult | |
- CorrespondingPickNotFoundErrorResult | |
- InvalidActiveTransactionIdErrorResult | |
- InvalidTransactionOfferStateErrorResult | |
- InvalidCustomerSequenceErrorResult | |
status: | |
type: string | |
enum: | |
- SUCCESS | |
- FAILURE | |
error: | |
type: string | |
SingleCmdRespDto: | |
type: object | |
properties: | |
commandResult: | |
$ref: "#/components/schemas/CommandResultDto" | |
ForbidOffersDto: | |
type: object | |
properties: | |
ticketIds: | |
type: array | |
items: | |
type: string | |
BatchCmdRespDto: | |
type: object | |
properties: | |
commandResults: | |
type: array | |
items: | |
$ref: "#/components/schemas/CommandResultDto" | |
ChangeGlobalRestrictionsReqDto: | |
type: object | |
properties: | |
prematchSolo: | |
type: boolean | |
prematchAko: | |
type: boolean | |
liveSolo: | |
type: boolean | |
liveAko: | |
type: boolean | |
StartTransactionReqDto: | |
type: object | |
properties: | |
changesAccepted: | |
type: boolean | |
requestedAmount: | |
type: number | |
ApproveTransactionReqDto: | |
type: object | |
properties: | |
approvedAmount: | |
type: number | |
bookmakerId: | |
type: integer | |
format: int32 | |
RejectTransactionReqDto: | |
type: object | |
properties: | |
bookmakerId: | |
type: integer | |
format: int32 | |
RejectTransactionAndForbidOfferReqDto: | |
type: object | |
properties: | |
bookmakerId: | |
type: integer | |
format: int32 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment