Void Endpoint

Path: {operator-env-url}/void

Sometimes the BetLink backend will need to void bets. Some examples of when this might happen are:

  • there is a network issue during bet a placement request to the operator that means the BetLink backend has no knowledge of whether the betslip was successfully placed or otherwise on the operator end

  • in future versions of BetLink, automated bet voiding tools will be added that allow an operator agent to void bets or groups of bets via an admin console

When a void request is received, all of the bets within the bets array should be looked up in the operator backend and set to a status akin to 'VOIDED', which can never be resulted/settled. If the operator has no record of the bets (or that they're already voided as per the idempotency requirements), it should respond anyway with a successful void response, as detailed below.

Request Parameters

type: POST content-type: application/json

Idempotency

Request will contain a header X-Idempotency-Key in the form of a UUID string. See the 'Idempotency' section for more detail.

Parameter
Type
Required?
Example

requestId

String/UUID

Yes

92e02ae9-a2a3-48e2-af0e-940aec4bbcfb

userId

String

Yes

user123

timestamp

String (epoch)

Yes

1640995200000

bets

Array <VoidBetDetails>

Yes

Response Parameters

accepts: application/json

Parameter
Type
Required?

requestId

String/UUID

Yes

Matches request's requestId

userId

String

Yes

timestamp

String (epoch)

Yes

Response timestamp

status

String ("VOIDED")

Yes

bets

Array <VoidBetDetails>

Yes

Error Response

accepts: application/json

Parameter
Type
Required?

status

String ("FAILURE")

Yes

errorCode

String

Yes

errorMessage

String

No

Errors

Error Code
Http Status

INVALID_USER

400

INVALID_BET_DETAILS

400

MISSING_PARAMETER

400

AUTHENTICATION_FAILED

403

GENERAL_EXCEPTION

500

REQUEST_TIMED_OUT

503

VoidBetDetails

Parameter
Type
Required?

betId

String/UUID

Yes

sportId

String

Yes

eventId

String

Yes

marketId

String

Yes

selectionId

String

Yes

Last updated