# Get match prediction

Read one match prediction by ID, with its current status and version and, once settled, its settlement totals.

- Endpoint: `GET https://api.returning.ai/v1/match-predictions/{matchPredictionId}`
- Section: Gamification / Match predictions
- Authentication: `Authorization: Bearer <API_KEY>` (Community API key)
- Permission: `matchPredictions` (Shown in the dashboard as "Match Prediction")
- Retries: Read-only; exact retries are safe
- Guide: hand-written
- Verified: code, 2026-09-27
- Last updated: 26 Sep 2026
- Web page: https://docs.returning.ai/api-reference/gamification-match-predictions/get-match-prediction

## When to use this

- Read the current `version` before you patch a match.
- Check a match has kicked off and isn't already settled or voided before you settle it.
- Show how many traders won and what was paid out after settlement.

**Instead:** Use [Get settlement results](https://docs.returning.ai/api-reference/gamification-match-predictions/get-settlement-results.md) instead to see each trader's prediction and payout.

**Availability:** api.returning.ai doesn't serve this route yet: requests return an empty `404`. Ask Returning.AI before you build on it.

## Authentication

- Header: `Authorization: Bearer <API_KEY>`
- Permission: `matchPredictions`

Use a Community API key with `matchPredictions`, shown in the dashboard as Match Prediction, and keep it on your server. The key decides the community: you only see and change match predictions in that community, and an ID from another community returns `404`, the same as an unknown ID. Personal API keys are rejected with `403`.

## Behaviour

api.returning.ai doesn't serve this route yet: requests return an empty `404`. Ask Returning.AI before you build on it.

This read changes nothing. `status` is worked out from the clock when you ask: a published match is `scheduled` before `predictionStartAt`, `open` until `lockAt`, then `locked` until you settle or void it.

## Request

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `matchPredictionId` | `string` | Yes | The match prediction ID from Create match prediction or List match predictions. (`mp_` and 24 hex characters) |

### Headers

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Authorization` | `string` | Yes | Community API key with `matchPredictions`. (`Bearer <API_KEY>`) |
| `X-Request-Id` | `string` | No | Your own ID for this request, returned in `meta.requestId`. Without it, a `req_...` ID is generated. |

### Example request

```bash
curl --request GET \
  --url https://api.returning.ai/v1/match-predictions/mp_66f000000000000000000801 \
  --header 'Authorization: Bearer <API_KEY>'
```

## Response

A `200` returns the match prediction. `settlement` holds the totals once `status` is `settled`, and is `null` in every other status. For each trader's result, use Get settlement results.

### Response fields

| Field | Type | Presence | Description |
| --- | --- | --- | --- |
| `meta` | `object` | always | Result details. |
| `meta.status` | `string` | always | Result of the request. (`success`) |
| `meta.statusCode` | `integer` | always | The HTTP status, repeated. |
| `meta.code` | `string` | always | Machine-readable result code. (`MATCH_PREDICTION_RETRIEVED`) |
| `meta.requestId` | `string` | always | Your `X-Request-Id` if you sent one, otherwise a generated `req_...` ID. Quote it when you contact support. |
| `message` | `string` | always | Human-readable summary. Do not branch on it. |
| `data` | `object` | always | The match prediction. |
| `data.id` | `string` | always | The match prediction ID. Use it in every other call. (`mp_` and 24 hex characters) |
| `data.externalReference` | `string` | - | Your own fixture ID. Left out when not set. |
| `data.title` | `string` | always | The match title traders see. |
| `data.description` | `string` | - | Longer text for traders. Left out when not set. |
| `data.teamA` | `object` | always | The first team. |
| `data.teamA.name` | `string` | always | Team name. |
| `data.teamA.imageUrl` | `string` | - | Team logo URL. Left out when not set. |
| `data.teamB` | `object` | always | The second team. |
| `data.teamB.name` | `string` | always | Team name. |
| `data.teamB.imageUrl` | `string` | - | Team logo URL. Left out when not set. |
| `data.predictionStartAt` | `string` | always | When traders can start predicting, in UTC. Milliseconds always read `.000`. |
| `data.lockAt` | `string` | always | When predictions close, in UTC. |
| `data.kickoffAt` | `string` | always | When the match starts, in UTC. |
| `data.scoreBasis` | `string` | always | Which score you settle on. Settlement uses the score you send either way. (`regulation` or `extra_time`) |
| `data.viewPermission` | `object` | always | Who can see the match once it is published. |
| `data.viewPermission.roleIds` | `string[]` | always | Role IDs. Traders with any of these roles can see it. |
| `data.viewPermission.userIds` | `string[]` | always | Platform user IDs, as strings, of traders who can see it. |
| `data.rewards` | `object` | always | What winners earn. |
| `data.rewards.correctResult` | `object` | always | Paid for picking the right result: team A, team B or a draw. |
| `data.rewards.correctResult.coins` | `integer` | always | Coins. |
| `data.rewards.correctResult.xp` | `integer` | always | XP. |
| `data.rewards.exactScoreBonus` | `object` | always | Paid on top of `correctResult` when the called score is also exact. |
| `data.rewards.exactScoreBonus.coins` | `integer` | always | Coins. |
| `data.rewards.exactScoreBonus.xp` | `integer` | always | XP. |
| `data.entryCost` | `object` | always | What a trader pays to predict. |
| `data.entryCost.enabled` | `boolean` | always | `true` when predicting costs coins. |
| `data.entryCost.coins` | `integer` | always | Coins per prediction. `0` when `enabled` is `false`. |
| `data.status` | `string` | always | `draft` until published. Then `scheduled` before `predictionStartAt`, `open` while traders can predict and `locked` from `lockAt`, all worked out from the clock. The rest follow a settle or void. (`draft`, `scheduled`, `open`, `locked`, `settlement_in_progress`, `settled`, `settlement_failed`, `void_in_progress`, `voided` or `void_failed`) |
| `data.isPublished` | `boolean` | always | `true` once published. |
| `data.acceptingPredictions` | `boolean` | always | `true` while the match is `open` and the time is between `predictionStartAt` and `lockAt`. |
| `data.attemptCount` | `integer` | always | Predictions traders have submitted. |
| `data.settlement` | `object` | always | Totals from the settlement once `status` is `settled`; otherwise `null`. |
| `data.settlement.fullTimeScore` | `object` | - | The score you settled with. |
| `data.settlement.fullTimeScore.teamA` | `integer` | - | Team A goals. |
| `data.settlement.fullTimeScore.teamB` | `integer` | - | Team B goals. |
| `data.settlement.predictionsTotal` | `integer` | - | Predictions on this match. |
| `data.settlement.winnerCount` | `integer` | - | Predictions with the right result, exact or not. |
| `data.settlement.correctResultCount` | `integer` | - | Right result, wrong score. |
| `data.settlement.exactScoreCount` | `integer` | - | Right result and exact score. |
| `data.settlement.missedCount` | `integer` | - | Wrong result. |
| `data.settlement.coinsPaid` | `integer` | - | Coins paid to winners, including their entry cost returned. |
| `data.settlement.xpPaid` | `integer` | - | XP paid to winners. |
| `data.settlement.entryCoinsReturned` | `integer` | - | Always `0`. Returned entry costs are counted in `coinsPaid`. |
| `data.settlement.payoutFailureCount` | `integer` | - | Payouts that could not be made. |
| `data.settlement.settledAt` | `string` | - | When the match last changed, normally when settlement finished. |
| `data.settlement.operationId` | `string` | - | The settlement ID (`mps_...`). |
| `data.version` | `integer` | always | The current version. Send it with Patch match prediction. It goes up with every change, including publish, settle and void. |
| `data.createdAt` | `string` | always | When the match prediction was created. |
| `data.updatedAt` | `string` | always | When it last changed. |

### Example response (200)

```json
{
  "meta": {
    "status": "success",
    "statusCode": 200,
    "code": "MATCH_PREDICTION_RETRIEVED",
    "requestId": "req_66f00000000000000000000000000811"
  },
  "message": "Match prediction retrieved.",
  "data": {
    "id": "mp_66f000000000000000000801",
    "title": "Australia vs New Zealand",
    "teamA": {
      "name": "Australia",
      "imageUrl": "https://cdn.example.com/teams/australia.png"
    },
    "teamB": {
      "name": "New Zealand",
      "imageUrl": "https://cdn.example.com/teams/new-zealand.png"
    },
    "predictionStartAt": "2026-10-01T08:00:00.000Z",
    "lockAt": "2026-10-10T18:55:00.000Z",
    "kickoffAt": "2026-10-10T19:00:00.000Z",
    "scoreBasis": "regulation",
    "viewPermission": {
      "roleIds": ["66f000000000000000000806"],
      "userIds": []
    },
    "rewards": {
      "correctResult": {
        "coins": 100,
        "xp": 50
      },
      "exactScoreBonus": {
        "coins": 200,
        "xp": 100
      }
    },
    "entryCost": {
      "enabled": false,
      "coins": 0
    },
    "status": "settled",
    "isPublished": true,
    "acceptingPredictions": false,
    "attemptCount": 120,
    "settlement": {
      "fullTimeScore": {
        "teamA": 2,
        "teamB": 1
      },
      "predictionsTotal": 120,
      "winnerCount": 48,
      "correctResultCount": 40,
      "exactScoreCount": 8,
      "missedCount": 72,
      "coinsPaid": 5600,
      "xpPaid": 2800,
      "entryCoinsReturned": 0,
      "payoutFailureCount": 0,
      "settledAt": "2026-10-10T21:05:00.000Z",
      "operationId": "mps_66f00000000000000000000000000803"
    },
    "version": 5,
    "createdAt": "2026-09-27T09:00:00.000Z",
    "updatedAt": "2026-10-10T21:05:00.000Z",
    "externalReference": "provider-fixture-123",
    "description": "Predict the final score."
  }
}
```

## Errors

Every error carries its code in `meta.code` and the request's ID in `meta.requestId`. Validation errors list each problem in `details`, with a `field`, `code` and `message`. The API key checks (`401`, `403`, `404 COMMUNITY_NOT_FOUND` and `500 AUTHENTICATION_FAILED`) return `detail` and `solution` instead. A `404` with an empty body means the route isn't available on api.returning.ai yet. An ID in the wrong format returns `404 MATCH_PREDICTION_NOT_FOUND`, the same as an unknown ID.

### Fix the request

| Status | Code | What to do |
| --- | --- | --- |
| 404 | - | The body is empty: api.returning.ai doesn't serve this route yet. Ask Returning.AI before you build on it. |
| 401 | `AUTHENTICATION_REQUIRED` | The key is missing, invalid or expired. Send `Authorization: Bearer <API_KEY>` with a current Community API key. |
| 403 | `API_KEY_PERMISSION_DENIED` | The key lacks `matchPredictions`, or it is a personal key. Use a Community API key and add Match Prediction in Settings > Integration > API Keys. |

### Fix the data

| Status | Code | What to do |
| --- | --- | --- |
| 404 | `MATCH_PREDICTION_NOT_FOUND` | No match prediction in your community has this ID, or the ID isn't `mp_` and 24 hex characters. Check the ID with List match predictions. |
| 404 | `COMMUNITY_NOT_FOUND` | The community this key belongs to no longer exists. Contact Returning.AI support. |

### Retry with backoff

| Status | Code | What to do |
| --- | --- | --- |
| 429 | `RATE_LIMITED` | Your community is over its [rate limit](https://docs.returning.ai/how-it-works.md#rate-limits). Wait for the seconds in `Retry-After`, then retry. |
| 500 | `INTERNAL_ERROR` | The match could not be read. Retry with exponential backoff. |
| 500 | `AUTHENTICATION_FAILED` | The key could not be checked. Retry with backoff; nothing changed. |
| 503 | `MATCH_PREDICTION_FROZEN` | Returning.AI has paused match prediction requests. Nothing changed. Retry later with backoff. |

**Retries:** This endpoint is read-only, so retrying the exact request is safe after a network error or a `500`. Use bounded exponential backoff. Don't retry a `404` without changing the ID. Returning.AI can set a request limit for your community on these endpoints, counted per community and calling IP address. Over it, requests return `429 RATE_LIMITED` with a `Retry-After` header in seconds; wait that long, then retry.

## Next step

- [Patch match prediction](https://docs.returning.ai/api-reference/gamification-match-predictions/patch-match-prediction.md): `PATCH /v1/match-predictions/{matchPredictionId}`. Change the match, sending the `version` you just read.
- [See each trader's payout with Get settlement results](https://docs.returning.ai/api-reference/gamification-match-predictions/get-settlement-results.md): `GET /v1/match-predictions/{matchPredictionId}/results`.
