Overview
Automate your bet settlement pipeline with a single endpoint that supports all common market types.
Authentication
Pass your API key as a query parameter on every request. Do not expose your key in client-side code.
GET https://w7api.com/sports/settle/result?apikey=YOUR_API_KEY&id=GAME_ID&lid=LEAGUE_ID
Base URL
| Component | Value | Description |
|---|---|---|
Protocol | HTTPS | TLS 1.2+ required |
Host | w7api.com | Primary production host |
Prefix | /sports | Sports data namespace |
Directory | /settle | Settlement sub-directory |
Full path | https://w7api.com/sports/settle/result | Settlement endpoint |
How Settlement Works
/resultByEvent endpoint or a webhook.apikey, id (game ID), and lid (league ID) in the query string.result field — Won, Lost, Refund, or Pending — plus the raw data string for audit trails.id in the response to update bet statuses in your system. Safe to retry if a network failure occurs.Endpoint
Settle one or more bet selections by submitting a JSON body with the data array. Each object in the array represents one selection. Query parameters identify the game and league context.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
apikey |
string | Required | Your Bet365Soft authentication key |
id |
string | Required | Game / Event ID from your sportsbook data |
lid |
string | Required | League ID associated with the game |
id returns an identical response — safe for retry logic.
Full POST request with JSON body — all 4 selections example:
Successful 200 response — each selection contains a result and audit data string:
Visual breakdown of the example response above:
| id | bid | mid | Bet Type | Selected Value | Outcome Data | Result |
|---|---|---|---|---|---|---|
| 1 | 1 | 1 | Result | Aston Villa | Winner Team - Aston Villa | Won |
| 2 | 2 | 7 | Handicap | Freiburg @ 1 | Winner value - 0 - 3 | Lost |
| 3 | 19 | 180 | Both Teams To Score | Yes | Winner value - 0 - 3 | Lost |
| 4 | 17 | 9 | Total | Over 0.5 | Winner value - 3 | Won |
Request Body Fields
The request body must be a JSON object with a single data key whose value is an array of selection objects. Each object must contain:
| Field | Type | Required | Description |
|---|---|---|---|
id |
integer | Required | Your internal selection row ID — returned unchanged for mapping |
bid |
integer | Required | Bet market ID — identifies the market category (e.g. 1 = Result, 2 = Handicap) |
mid |
integer | Required | Market outcome ID — specific outcome within the market |
name |
string | Required | Human-readable market name — e.g. "Result", "Handicap", "Total" |
value |
string | Required | The bettor's selected value — e.g. "Aston Villa", "Over 0.5", "Yes" |
422 validation error.
Response Object Fields
| Field | Type | Source | Description |
|---|---|---|---|
success |
boolean | Response | true if settlement processed, false on error |
id |
string | Response | Unique idempotency token for this settlement request |
data[].id |
integer | Echoed | Your original selection id — unchanged for easy mapping |
data[].bid |
integer | Echoed | Market ID echoed from request |
data[].mid |
integer | Echoed | Outcome ID echoed from request |
data[].bet |
string | Response | Market name (maps to name field in request) |
data[].value |
string | Echoed | Selected value echoed from request |
data[].data |
string | Response | Human-readable audit string — actual outcome data for the market |
data[].result |
string | Response | Won | Lost | Refund | Pending |
Supported Market Types
| bid | Market | Example Value |
|---|---|---|
| 1 | Match Result (1X2) | "Aston Villa" / "Draw" |
| 2 | Asian Handicap | "Freiburg @ 1" |
| 9 | Total Goals O/U | "Over 0.5" |
| 17 | Total (lines) | "Over 2.5" |
| 19 | Both Teams Score | "Yes" / "No" |
| 52 | Double Chance | "1 or X" |
| bid | Market | Example Value |
|---|---|---|
| 60 | 1st Half Result | "Home Win" |
| 61 | 1st Half Total | "Under 1.5" |
| 62 | 2nd Half Result | "Away Win" |
| 180 | Race To (half) | "1 Goal" |
| 200 | Correct Score | "2-1" |
| 210 | First Goalscorer | "O. Watkins" |
| 210 | Total Even/Odd | "Odd" |
value format strings is available in your dashboard under Market Reference once you log in.
Try It Live
Error Handling
All errors return a JSON body with success: false and a descriptive error message.
| HTTP Code | Error | Cause | Resolution |
|---|---|---|---|
| 400 | Bad Request | Missing or malformed JSON body | Ensure Content-Type: application/json and valid JSON |
| 401 | Unauthorized | Invalid or missing apikey |
Check your API key in the dashboard |
| 404 | Not Found | Game ID or League ID not found | Verify id and lid against your sportsbook data |
| 422 | Unprocessable | Validation failed on selection fields | Check all required fields: id, bid, mid, name, value |
| 429 | Rate Limited | Too many requests | Implement exponential backoff; check plan limits |
| 500 | Server Error | Internal processing failure | Retry with backoff; contact support if persistent |
Code Examples
Ready to start settling bets?
Sign up for free and get your API key in under 2 minutes.