Skip to content

Marketing Feed

INFO

In order to use Service-to-Service API you need to request access from your account manager and provide a list of your backend's public IPs.

Marketing Feed API responds with a list of the events in live and/or prematch state and a list of their winner markets with outcomes for the main period. Each event will contain an URL that routes to the corresponding event page on the partner's web-site.

POST https://{S2S_API_URL}/content/marketing

Headers

INFO

NOTE: This request requires you to generate a sign and pass it as x-sign-jws header. Please read request signing section for more details about the topic.

Content-Type: application/json
x-sign-jws: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..UXwjHxU3tFlrzPMupG04zROiEcHFQpCg3l7J4Axr1fE

Request parameters

Request payload example:

json
{ "cid": "example", "baseUrl": "https://example.com" }

With list of disciplines:

json
{
  "cid": "example",
  "baseUrl": "https://example.com",
  "disciplineIds": ["dota2", "csgo"]
}
ParameterTypeDescription
cidstringPartner API Key.
baseUrlstringA destination page url with iframe where the user should land.
It can be 'https://example.com' or even '/'. Depending on where the banner will be shown.
type (Optional)'live' | 'prematch'Event type to return — live or prematch. If omitted — any type will be returned.
disciplineIds (Optional)string[]List of disciplines to return
eventIds (Optional)string[]Get data only for specific event ids
tournamentIds (Optional)string[]Get data only for specific tournament ids
pageSize (Optional)numberPage size.
When both pageSize and pageNumber not specified all items will be returned in single request
pageNumber (Optional)numberPage number.
When both pageSize and pageNumber not specified all items will be returned in single request

Response format

typescript
interface Response {
  data: Event[];
  meta: {
    totalRows: number;
  };
}

interface Event {
  id: string;
  type: 'live' | 'prematch';
  disciplineId: string;

  /**
   * Event start time
   *
   * @example '2023-05-09T09:36:33.435Z'
   */
  startTime: string;

  /**
   * @example 'http://foo.bar?setIframePath=/event/slug/bets'
   */
  url: string;
  team1: Team;
  team2: Team;
  tournament: Tournament;
  markets: Market[];
}

interface Team {
  id: string;
  name: string;
  logoUrl: string | null;
}

interface Tournament {
  id: string;
  name: string;
  logoUrl: string | null;
}

interface Market {
  id: string;
  name: string;

  /**
   * Human readable market period name, e.g. MainTime
   */
  period: string;
  outcomes: Outcome[];
}

interface Outcome {
  id: string;
  name: string;

  /**
   * Numeric id to distinguish multiple outcomes
   */
  type: number;
  odd: number;
}

Example:

json
{
  "data": [
    {
      "id": "18693551",
      "type": "live",
      "disciplineId": "football",
      "startTime": "2024-01-09T15:35:00.000Z",
      "url": "https://example.com?setIframePath=%2Ffootball%2Fjeddah-club-vs-al-jndal-18693551%2Fbets",
      "team1": {
        "id": "5e41e96d010aa176c5f41c1d",
        "name": "Jeddah Club",
        "logoUrl": "https://cdn-example.com/icons/100/68522.png"
      },
      "team2": {
        "id": "6155978aea12960dc1ca789c",
        "name": "Al-Jndal",
        "logoUrl": null
      },
      "tournament": {
        "id": "1115",
        "name": "Championship of Saudi Arabia. Division 1",
        "logoUrl": "https://cdn-example.com/icons/tournament/100/1115.png"
      },
      "markets": [
        {
          "id": "65942715f281a183e13cce32",
          "name": "Match Winner",
          "period": "MainTime",
          "outcomes": [
            {
              "id": "65942715f281a1228d3cce2f",
              "type": 101,
              "odd": 2.2,
              "name": "Jeddah Club"
            },
            {
              "id": "65942715f281a1aeaf3cce30",
              "type": 103,
              "odd": 4.35,
              "name": "Al-Jndal"
            },
            {
              "id": "65942715f281a1adc13cce31",
              "type": 102,
              "odd": 2.3,
              "name": "Draw"
            }
          ]
        },
        {
          "id": "659d66f1bee54b45dc5e8e0c",
          "name": "Winner. 2-nd half",
          "period": "Half2",
          "outcomes": [
            {
              "id": "659d66f1bee54b8e7a5e8e09",
              "type": 101,
              "odd": 2.2,
              "name": "Jeddah Club"
            },
            {
              "id": "659d66f1bee54b33365e8e0a",
              "type": 103,
              "odd": 4.35,
              "name": "Al-Jndal"
            },
            {
              "id": "659d66f1bee54b4f8c5e8e0b",
              "type": 102,
              "odd": 2.3,
              "name": "Draw"
            }
          ]
        },
        {
          "id": "65941c3cf281a1c54a3378ac",
          "name": "Draw no bet",
          "period": "MainTime",
          "outcomes": [
            {
              "id": "65941c3cf281a1cd4d3378aa",
              "type": 101,
              "odd": 1.43,
              "name": "Jeddah Club"
            },
            {
              "id": "65941c3cf281a1537a3378ab",
              "type": 103,
              "odd": 2.62,
              "name": "Al-Jndal"
            }
          ]
        },
        {
          "id": "65941c3cf281a163cc33789f",
          "name": "Match Winner",
          "period": "MainTime",
          "outcomes": [
            {
              "id": "65941c3cf281a152cc33789c",
              "type": 101,
              "odd": 2.3,
              "name": "Jeddah Club"
            },
            {
              "id": "65941c3cf281a1c12f33789d",
              "type": 102,
              "odd": 2.4,
              "name": "Draw"
            },
            {
              "id": "65941c3cf281a1643c33789e",
              "type": 103,
              "odd": 4.3,
              "name": "Al-Jndal"
            }
          ]
        }
      ]
    }
  ],
  "meta": {
    "totalRows": 1
  }
}