CmsWager Integration Document
  • Introduction
  • Before Start
  • Sportsbook UI
    • Integration
    • Window Message Events
  • CmsWager Api
    • Summary
    • Authentication
    • API Reference
      • Login/Register User
      • Freebet and Bonus assignment
    • Errors
  • Client API Reference
    • Summary
    • Api Reference
      • Bet placement
      • Cancelling bets
      • Concluding bets
      • Reopening concluded bets
      • Partial Cashout
      • Insurance
  • Frontend Api (optional)
    • Summary
    • Api Reference
      • Components
        • Top Leagues
        • Prematch Active Sports
        • Prematch Sport Menu
        • Last minute
        • Live now (reduced)
      • Matches
        • Tournament Odds
        • Match Odds
  • Appendix
    • Transaction types
    • Bet Status
    • Bet Type
    • Error Codes
Powered by GitBook
On this page
  1. Client API Reference
  2. Api Reference

Reopening concluded bets

POST {clientApi}/ticket/reopen

A concluded ticket can be reopened, going back to "running" status. The request can contain a withdraw transaction type. In this case the amount must be deducted from the user balance.

If this request encounters a server error, it will be retried for 24 hours until it gets a meaningful response

If the new status (in request) is the same of the client system, no action need to be taken in client system and a 200 response must be returned.

"Reopening Concluded bet" request will be sent only for tickets with status different from "0" (in running). If the ticket status on client side is "0" please response with failiure "406" code. This means that a previous "Concluding bets" or "Partial cashout" or "Cancelling bet" message was sent and has not been processed

Example request

{
  "clientId": "xyzk",
  "userId": 123456,
  "transactionType": 2,
  "amount": 10.56,
  "ticket": {
    "id": 123456,
    "code": "abcd1234",
    "isBonus": false,
    "isFreebet": false,
    "freebetId": 0,
    "newStauts" : 0
  },
  "code": 2021,
  "reason": "ticket_canceled"
}

Example Success Response

Response code 200

After the deposit amount is added to user balance and the ticket is setted to "canceled" in client system, a 200 success response should be returned.

{    
    "status": "success",
    "balance": 140.85,
    "error_code": 0,
    "error_message": ""
}

Example Failure Response

Response code 406

If there is any error in client system, a 406 response cose should be returned

{
    "status": "error",
    "balance": 140.85,
    "error_code": 406,
    "error_message": "client error"
}

PreviousConcluding betsNextPartial Cashout

Last updated 1 month ago