Mobadoo

  • Products
    • eSports betting pool
    • Odds
    • Fantasy
  • Added Value
  • Coverage
  • Contact
  • Press
  • LOGIN
  • Inicio
  • Documentation
  • Webhook
marzo 27, 2023

Webhook

Webhook

por Pedro Gallego Torrecilla / martes, 20 abril 2021 / Publicado en Documentation

Webhook

 

Table of Contents

  • 1. Introduction
  • 2. Desynchronization
  • 3. Models
    • 3.1 MODEL CHANGE
      • 3.1.1 League
      • 3.1.2 Serie
      • 3.1.3 Tournament
      • 3.1.4 Match
      • 3.1.5 Game
    • 3.2 TICKET CHANGE

1. Introduction

The webhook is a real time notification system of changes in the state of the matches’ data. This is  functionality designed for keeping the pre-match information always updated.

This function objective is to avoid unnecessary calls to be made, but only when it is needed. 

  • Changes in the matches’ data: status, date modification, …
  • Odds updates

The notification URL is configured on the user profile of the backoffice console, and the system will notify of the changes made to the matches’ information.

2. Desynchronization

In the case of a desynchronization, Mobadoo’s system will notify the need for data to be updated.

For updating the data, a new cycle of calls, explained in the life cycle section, and, once finished, Mobadoo should be informed, by using an endpoint, that the synchronization has ended.

The call to the endpoint is shown below:

GET: https://api-stage.mobadoo.com/api/v1/notifications/reset?token=XXXX

3 Models

In the webhook we will receive a series of models that will be as follows as detailed in the following points.
We have two main types:

  • MODEL_CHANGE
    • League
    • Tournament
    • Match
    • Game
  • TICKET_CHANGE

3.1 MODEL CHANGE

3.1.1 League

Information about changes in League type

 


{
  "message": "MODEL_CHANGED",
  "entity": "League",
  "origin": "WS_LISTENER",
  "videogame": "lol",
  "result": {
    "id": 4483,
    "url": "https://iberiancup.lvp.global/",
    "image_url": "https://images.mobadoo.com/images/league/image/4483/Iberiancup2020.png",
    "slug": "league-of-legends-iberian-cup",
    "name": "Iberian Cup",
    "series": [
      {
        "id": 3069,
        "begin_at": "2020-10-09T22:00:00Z",
        "end_at": "2020-11-15T22:00:00Z",
        "full_name": "2020",
        "status": "finished",
        "fantasy": false,
        "year": 2020,
        "slug": "league-of-legends-iberian-cup-2020",
        "tier": "C-tier"
      }
    ]
  }
}

3.1.2 Serie

Information about changes in Serie type

 


{
  "message": "MODEL_CHANGED",
  "entity": "Serie",
  "origin": "WS_LISTENER",
  "videogame": "lol",
  "result": {
    "id": 3325,
    "begin_at": "2021-02-04T23:00:00Z",
    "end_at": "2021-03-13T23:00:00Z",
    "full_name": "Spring 2021",
    "season": "Spring",
    "status": "postponed",
    "fantasy": false,
    "year": 2021,
    "slug": "league-of-legends-lcs-spring-2021",
    "league": {
      "id": 4198,
      "url": "https://nexus.leagueoflegends.com/en-us/esports/",
      "image_url": "https://cdn.pandascore.co/images/league/image/4198/image.png",
      "slug": "league-of-legends-lcs",
      "name": "LCS"
    },
    "tournaments": [
      {
        "id": 5459,
        "begin_at": "2021-02-05T23:00:00Z",
        "end_at": "2021-03-15T01:00:00Z",
        "name": "Regular Season",
        "full_name": "LCS Spring 2021 Regular Season",
        "winner_type": "Team",
        "status": "finished",
        "slug": "league-of-legends-lcs-spring-2021-split-regular-season"
      }
    ],
    "teams": [
      {
        "id": 311,
        "name": "FlyQuest",
        "acronym": "FLY",
        "slug": "flyquest",
        "image_url": "https://images.mobadoo.com/images/team/image/311/flyquest-academy-gx8a0xfs.png",
        "players": [
          {
            "id": 1190,
            "name": "Licorice",
            "first_name": "Eric",
            "last_name": "Ritchie",
            "hometown": "Canada",
            "role": "top",
            "current_team": 311,
            "slug": "licorice",
            "image_url": "https://images.mobadoo.com/images/player/image/1190/220px_c9_licorice_2020_split_2.png"
          }
          ...
        ]
      }
      ...
    ],
    "tier": "A-tier",
    "odds": []
  }
}

3.1.3 Tournament

Information about changes in Tournament type

{
  "message": "MODEL_CHANGED",
  "entity": "Tournament",
  "origin": "WS_LISTENER",
  "videogame": "codmw",
  "result": {
    "id": 5688,
    "begin_at": "2021-04-07T20:00:00Z",
    "end_at": "2021-04-12T00:30:00Z",
    "name": "Major",
    "full_name": "Call of Duty League Stage 2 2021 Major",
    "winner_id": null,
    "winner_type": "Team",
    "prizepool": "500000 United States Dollar",
    "status": "not_started",
    "slug": "cod-mw-call-of-duty-league-stage-2-2021-major",
    "league": {
      "id": 4304,
      "url": "https://callofdutyleague.com/en-us/",
      "image_url": "https://images.mobadoo.com/images/league/image/4304/1200px-CallofDutyLeague.png",
      "slug": "cod-mw-call-of-duty-league",
      "name": "Call of Duty League"
    },
    "serie": {
      "id": 3435,
      "begin_at": "2021-03-18T17:00:00Z",
      "end_at": "2021-04-12T01:00:00Z",
      "full_name": "Stage 2 2021",
      "season": null,
      "status": "running",
      "fantasy": false,
      "winner_id": null,
      "winner_type": null,
      "year": 2021,
      "slug": "cod-mw-call-of-duty-league-stage-2-2021",
      "tier": "S-tier"
    },
    "matches": [
      {
        "id": 586687,
        "begin_at": "2021-04-11T23:00:00Z",
        "end_at": null,
        "name": "Grand Final: TBD vs TBD",
        "winner_id": null,
        "forfeit": false,
        "number_of_games": 9,
        "draw": false,
        "live_url": null,
        "status": "not_started",
        "slug": "2021-04-12-5c062a1a-3759-43a4-81ff-397e5a1b0f77",
        "has_live": false,
        "detailed_stats": false,
        "ws_live_url": null,
        "live_embed_url": null,
        "official_stream_url": null
      },
      {
        "id": 586686,
        "begin_at": "2021-04-11T21:30:00Z",
        "end_at": null,
        "name": "Lower Bracket Final: TBD vs TBD",
        "winner_id": null,
        "forfeit": false,
        "number_of_games": 5,
        "draw": false,
        "live_url": null,
        "status": "not_started",
        "slug": "2021-04-11-0472abfd-aae2-450a-a229-f90400bcf6c0",
        "has_live": false,
        "detailed_stats": false,
        "ws_live_url": null,
        "live_embed_url": null,
        "official_stream_url": null
      },
      ...
    ],
    "teams": [],
    "odds": []
  }
}

3.1.4 Match

Information about changes in Match type

{
  "message": "MODEL_CHANGED",
  "entity": "Match",
  "origin": "WS_LISTENER",
  "videogame": "lol",
  "result": {
    "id": 579897,
    "begin_at": "2021-03-22T11:16:23Z",
    "end_at": "2021-03-22T11:54:50Z",
    "name": "DRXC vs LSB",
    "winner_id": 128344,
    "forfeit": false,
    "number_of_games": 1,
    "draw": false,
    "live_url": "https://www.twitch.tv/lck_challengers",
    "status": "finished",
    "slug": "drx-challengers-vs-liiv-sandbox-challengers-2021-03-22",
    "league": {
      "id": 4142,
      "url": "https://lol.gamepedia.com/Challengers_Korea/2018_Season/Summer_Season#Schedule",
      "image_url": "https://images.mobadoo.com/images/league/image/4142/_.png",
      "slug": "league-of-legends-challenger-korea",
      "name": "Challenger Korea"
    },
    "serie": {
      "id": 3259,
      "begin_at": "2021-01-18T06:15:53Z",
      "end_at": null,
      "full_name": "LCK CL Spring 2021",
      "season": "Spring",
      "status": "running",
      "fantasy": false,
      "winner_id": null,
      "winner_type": null,
      "year": 2021,
      "slug": "league-of-legends-challenger-korea-lck-cl-spring-2021",
      "tier": "C-tier"
    },
    "tournament": {
      "id": 5357,
      "begin_at": "2021-01-18T06:15:53Z",
      "end_at": "2021-03-22T13:00:00Z",
      "name": "Regular",
      "full_name": "Challenger Korea LCK CL Spring 2021 Regular",
      "winner_id": null,
      "winner_type": "Team",
      "prizepool": null,
      "status": "running",
      "slug": "league-of-legends-challenger-korea-lck-cl-spring-2021-regular"
    },
    "games": [
      {
        "id": 221666,
        "begin_at": "2021-03-22T11:16:24Z",
        "end_at": "2021-03-22T11:54:50Z",
        "length": 2306,
        "position": 1,
        "winner_id": 128344,
        "winner_type": "Team",
        "status": "finished",
        "video_url": null
      }
    ],
    "stats": [],
    "teams": [
      {
        "id": 128344,
        "name": "DRX Challengers",
        "acronym": "DRXC",
        "slug": "drx-challengers",
        "image_url": "https://images.mobadoo.com/images/team/image/128344/dr_xlogo_square.png"
      },
      {
        "id": 128349,
        "name": "Liiv SANDBOX Challengers",
        "acronym": "LSB",
        "slug": "liiv-sandbox-challengers",
        "image_url": "https://images.mobadoo.com/images/team/image/128349/liiv_sandbo_xlogo_square.png"
      }
    ],
    "live_markets": [
      {
        "id": 2,
        "name": "Match Winner",
        "slug": "winner2-way",
        "type": "M",
        "group": "WIN",
        "has_live": true
      }
    ],
    "has_live": true,
    "ws_live_url": null,
    "detailed_stats": true,
    "live_embed_url": "https://player.twitch.tv/?channel=lck_challengers",
    "official_stream_url": "https://www.twitch.tv/lck_challengers",
    "odds": [
      {
        "id": 1616363784800,
        "market_id": 2,
        "selection_id": 2,
        "selection_name": "Team A",
        "team_id": 128344,
        "odd_decimal": "0.4922",
        "odd_quota": "2.031694433157253149126371394",
        "odd_fractional": "5000/2461",
        "odd_american": 103,
        "date_create": "2021-03-21T21:56:24Z",
        "result": null,
        "odd_origin": "PRE",
        "status": "TDM"
      },
      {
        "id": 1616363784809,
        "market_id": 2,
        "selection_id": 3,
        "selection_name": "Team B",
        "team_id": 128349,
        "odd_decimal": "0.5778",
        "odd_quota": "1.730702665282104534440983039",
        "odd_fractional": "5000/2889",
        "odd_american": -137,
        "date_create": "2021-03-21T21:56:24Z",
        "result": null,
        "odd_origin": "PRE",
        "status": "TDM"
      }
    ]
  }
}

3.1.5 Game

Information about changes in Game type


{
  "message": "MODEL_CHANGED",
  "entity": "Game",
  "origin": "WS_LISTENER",
  "videogame": "dota2",
  "result": {
    "id": 672490,
    "begin_at": "2021-03-22T11:18:35Z",
    "end_at": "2021-03-22T12:25:35Z",
    "length": 2616,
    "position": 1,
    "winner_id": 128080,
    "winner_type": "Team",
    "status": "finished",
    "odds": [
      {
        "id": 1616411039367,
        "market_id": 3,
        "selection_id": 4,
        "selection_name": "Team A",
        "team_id": 1660,
        "odd_decimal": "0.89998021",
        "odd_quota": "1.111135543747123061739324246",
        "odd_fractional": "25265/22738",
        "odd_american": -900,
        "date_create": "2021-03-22T11:03:59Z",
        "odd_origin": "PRE",
        "status": "CL"
      },
      {
        "id": 1616411039375,
        "market_id": 3,
        "selection_id": 5,
        "selection_name": "Team B",
        "team_id": 128080,
        "odd_decimal": "0.17002193",
        "odd_quota": "5.881594215522668164042132683",
        "odd_fractional": "481532/81871",
        "odd_american": 488,
        "date_create": "2021-03-22T11:03:59Z",
        "odd_origin": "PRE",
        "status": "CL"
      },
      ...
    ]
  }
}

3.2 TICKET CHANGE

Information about ticket changes

{
  "type": "TICKET_CHANGE",
  "ticket": {
    "id": 427,
    "transaction_id": "k1pu9uiy69xl",
    "uuid": "pgallego",
    "date": "2021-02-09 01:04:55.690139+00:00",
    "currency": "EUR",
    "state": "RESOLVED",
    "tips": [
      {
        "pool_id": 147,
        "pool_name": "",
        "id": 440,
        "product_type": "POOL",
        "bet_amount": 5,
        "won_amount": 10018.75,
        "status": "WIN",
        "freebet": 0,
        "bonus": 0,
        "selections": [
          {
            "status": "WIN",
            "videogame": "lol",
            "match_id": 578675,
            "match_name": "HLE vs AF",
            "match_status": "finished",
            "selection_id": 2,
            "selection_name": "Team A",
            "market_id": 2,
            "market_name": "Winner 2-Way"
          },
          ...
        ]
      }
    ]
  }
}
  • Tweet

About Pedro Gallego Torrecilla

What you can read next

Concepts
Resources
Pool

Deja una respuesta Cancelar la respuesta

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *

  • Products
  • Added Value
  • Coverage
  • Contact
  • Press
  • LOGIN
SUBIR