ProphetX Auto-Fill Integration Guide

Learn how to integrate ProphetX's auto-fill betslip functionality into your application using our APIs. This guide covers authentication, integration steps, and troubleshooting.

ProphetX Auto-Fill Integration Guide

This guide explains how to integrate ProphetX's auto-fill betslip functionality into your application using our APIs.

Overview

The integration allows partners to generate URIs that automatically populate the ProphetX betslip when clicked. The process involves several steps, detailed below.

Authentication

All API requests require proper authentication. Please contact ProphetX support to obtain your API credentials and partner ID.

Integration Steps

API Environments

  • Sandbox: API_HOST: https://api-ss-sandbox.betprophet.co
  • Production: API_HOST: https://api.betprophet.co

1. Fetch Available Tournaments

Make a GET request to retrieve the list of available tournaments.

Endpoint:

GET {{API_HOST}}/affiliate/get_tournaments

Example Response:

{
  "data": {
    "tournaments": [
      {
        "category": {
          "countryCode": "N/A",
          "name": "N/A"
        },
        "id": 2568,
        "name": "French Open (M)",
        "sport": {
          "id": 5,
          "name": "Tennis"
        },
        "updated_at": 1734425801889462000
      },
      {
        "category": {
          "countryCode": "N/A",
          "name": "N/A"
        },
        "id": 2739,
        "name": "ATP Indian Wells",
        "sport": {
          "id": 5,
          "name": "Tennis"
        },
        "updated_at": 1735116943350715000
      },
      {
        "category": {
          "countryCode": "N/A",
          "name": "N/A"
        },
        "id": 4221,
        "name": "WTA Doha",
        "sport": {
          "id": 5,
          "name": "Tennis"
        },
        "updated_at": 1735116943385637000
      }
    ]
  }
}

2. Fetch Available Sports Events

Make a GET request to retrieve the list of available sports events.

Endpoint:

GET {{API_HOST}}/affiliate/get_sport_events?tournament_id={tournament_id}

Example Response:

{
  "data": {
    "sport_events": [
      {
        "competitors": [
          {
            "abbreviation": "DET",
            "display_name": "Detroit Lions",
            "id": 11,
            "name": "Detroit Lions",
            "side": "home"
          },
          {
            "abbreviation": "MIN",
            "display_name": "Minnesota Vikings",
            "id": 20,
            "name": "Minnesota Vikings",
            "side": "away"
          }
        ],
        "display_name": "Minnesota Vikings at Detroit Lions",
        "event_id": 18925,
        "live_disabled": false,
        "name": "Minnesota Vikings at Detroit Lions",
        "scheduled": "2025-01-06T01:20:00Z",
        "sport_name": "American Football",
        "status": "live",
        "tournament_id": 31,
        "tournament_name": "NFL",
        "updated_at": 1736126653111674000
      }
    ]
  }
}

3. Fetch Market Data

Using the event_id obtained from the previous step, retrieve detailed market data for the event.

Endpoint:

GET {{API_HOST}}/affiliate/get_markets?event_id={event_id}

Example Response:

{
  "data": {
    "event_id": 18925,
    "markets": [
      {
        "category_name": "Game Lines",
        "display_name": "Moneyline",
        "id": 219,
        "name": "Moneyline",
        "selections": [
          {
            "competitor_id": 11,
            "display_name": "Detroit Lions -470",
            "display_odds": "-470",
            "line": 0,
            "line_id": "90de769f4f4977a04446ed203e957351",
            "name": "Detroit Lions",
            "odds": -470,
            "outcome_id": 4,
            "stake": 100,
            "updated_at": 1736126912002271000,
            "value": 470
          },
          {
            "competitor_id": 20,
            "display_name": "Minnesota Vikings -136",
            "display_odds": "-136",
            "line": 0,
            "line_id": "7d75b0c55f5578219f534413d0bd872b",
            "name": "Minnesota Vikings",
            "odds": -136,
            "outcome_id": 5,
            "stake": 100,
            "updated_at": 1736127082575143000,
            "value": 71.06
          }
        ],
        "sub_type": "moneyline",
        "type": "moneyline"
      },
      {
        "category_name": "Game Lines",
        "display_name": "Spread",
        "id": 223,
        "line": -5.5,
        "name": "Fixed home -5.5",
        "selections": [
          {
            "competitor_id": 11,
            "display_line": "-5.5",
            "display_name": "Detroit Lions -5.5",
            "display_odds": "-112",
            "line": -5.5,
            "line_id": "b288cdeffc0f3ba7e384009a3502543f",
            "name": "Detroit Lions -5.5",
            "odds": -112,
            "outcome_id": 1714,
            "stake": 200,
            "updated_at": 1736127295209374000,
            "value": 112
          },
          {
            "competitor_id": 20,
            "display_line": "+5.5",
            "display_name": "Minnesota Vikings +5.5",
            "display_odds": "-112",
            "line": 5.5,
            "line_id": "52882b69700724c6332375283b6e7f2a",
            "name": "Minnesota Vikings +5.5",
            "odds": -112,
            "outcome_id": 1715,
            "stake": 100,
            "updated_at": 1736127190680127000,
            "value": 12
          }
        ],
        "sub_type": "spread",
        "type": "spread"
      }
    ]
  }
}

The response includes detailed market information.

4. Generate Auto-Fill URI (Mobile App)

Note: The URI won't work without the app installed.

Once a user selects a betting option, generate a URI using the line_id from the selected market.

URI Format:

prophetx://addtobetslip?line_id={line_id}&line_ids={line_ids}&partner_id={partner_id}&odds={odds}

5. Generate Auto-Fill OneLink (Mobile App)

Note: OneLink supports both cases—whether the app is installed or not. If the user hasn't installed the app, OneLink redirects them to the App Store or Google Play to download it.

Once a user selects a betting option, generate a URL using the line_id from the selected market.

URL Format:

https://prophetx.onelink.me/E5Yi/autofill?deep_link_value=addtobetslip&deep_link_sub1={partner_id}&deep_link_sub2={line_id}&deep_link_sub3={odds}

6. Generate Auto-Fill URL (Website)

Once a user selects a betting option, generate a URL using the line_id from the selected market.

URL Format:

https://www.prophetx.co/?action=addtobetslip&line_id={line_id}&line_ids={line_ids}&partner_id={partner_id}&odds={odds}

Examples

OneLink:

https://prophetx.onelink.me/E5Yi/autofill?deep_link_value=addtobetslip&deep_link_sub1=ProphetX&deep_link_sub2=7203332a11f8f1bea399fc063c67ca0d&deep_link_sub3=101
https://prophetx.onelink.me/E5Yi/autofill?deep_link_value=addtobetslip&deep_link_sub1=ProphetX&deep_link_sub2=7203332a11f8f1bea399fc063c67ca0d,308a315777a0a3d56f2a325ea6b4941b&deep_link_sub3=101

URI Schema:

prophetx://addtobetslip?line_id=0a5bc0bf30bf1a2a9dd324c77bb687a8&partner_id=ProphetX&odds=102
prophetx://addtobetslip?line_ids=7203332a11f8f1bea399fc063c67ca0d,308a315777a0a3d56f2a325ea6b4941b&partner_id=ProphetX&odds=102

Best Practices

  • Ensure all API requests are authenticated.
  • Test in the sandbox environment before moving to production.

Troubleshooting

Common issues and solutions:

  • Issue: Authentication errors.

    • Solution: Verify your API credentials and partner ID.
  • Issue: URI not working.

    • Solution: Ensure the app is installed on the user's device.