General documentation about copyBetting

Copy-betting Widget

We have 2 user actions types Share and Copy

Share action

11.jpg

On point 2 we need to get the last user’s bets to show them in the chat, from Alternar’s API.

ALtenar’s API We will request this API when user opens list with their “last bets”.

It should be an array of last placed bets by userId in the format below, sorted by betDate

Request parameters

Parameter Type Required Description
limit number Yes Parameter for a pagination
offset number Yes Parameter for a pagination
clientNumber string Yes Parameter to indentify user on parner side

Request headers

Parameter Type Required Description
Bearer string Yes Classic Bearer token header for securing backend to backend requests
api-key number Yes Parameter for differentiate Altenar partners

Response Example

[
  {
    "betType": "SINGLE",
    "status": "WIN",
    "totalFactor": 3.6,
    "orderDate": "2023-05-18T09:29:17.163Z",
    "barcode": "167798842222",
    "positions": [
      {
        "positionId": 1,
        "factorValue": 3.6,
        "status": "WIN",
        "eventId": "17484857",
        "eventTitle": "Man Utd - Southampton",
        "eventDate": "2023-05-18T07:11:01.05Z",
        "outcomeId": "1947496370",
        "outcomeGroupTitle": "WINNER",
        "outcomeTitle": "2",
        "blockTitle": "Main time",
        "additionalValue": null,
        "sportTypeTitle": "FootBall",
        "sportTypeId": 128,
        "iconUrl": "<https://cdn-icons-png.flaticon.com/512/1165/1165249.png>",
      }
    ]
  }
]

Copy action

22.jpg

User can click on other users' widgets in the chat to repeat the bet.