> For the complete documentation index, see [llms.txt](https://dupr.gitbook.io/dupr-raas/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dupr.gitbook.io/dupr-raas/integration-checklist/match-upload-and-management.md).

# Match Upload & Management

{% hint style="info" %}
**Troubleshooting:** Running into issues? See [Match Submission Errors](/dupr-raas/reference/developer-faq.md#match-submission-errors) and [Valid Match Sources](/dupr-raas/reference/developer-faq.md#valid-match-sources) in the Developer FAQ.
{% endhint %}

***

## Match Submission Requirements

To maintain data integrity, all match uploads must adhere to the following rules:

* **Authorized Submissions:** Only tournament directors, admins, or designated match owners may submit results.
* **Player Eligibility:** Every player included in the match must have the `BASIC_L1` entitlement.
* **Permissions:** For club-related matches, the submitter must have the appropriate permissions for that specific club. See [Club Integration](/dupr-raas/integration-checklist/club-integration.md) for details.

***

## Uploading a Match

Depending on your platform's needs, you can submit matches one at a time or in batches.

#### Singular Match Upload

Ideal for real-time score reporting immediately after a match concludes.

<table><thead><tr><th width="186">Environment</th><th>API</th></tr></thead><tbody><tr><td>UAT</td><td><a href="https://uat.mydupr.com/api/swagger-ui/index.html#/Match/saveMatch">UAT: Create Match</a></td></tr><tr><td>Production</td><td><a href="https://prod.mydupr.com/api/swagger-ui/index.html#/Match/saveMatch">Prod: Create Match</a></td></tr></tbody></table>

#### Bulk Match Upload

Designed for syncing large event days or historical data. You may upload up to 100 matches in a single request.

<table><thead><tr><th width="186">Environment</th><th>API</th></tr></thead><tbody><tr><td>UAT</td><td><a href="https://uat.mydupr.com/api/swagger-ui/index.html#/Match/saveMatchInBulk">UAT: Create Matches in Bulk</a></td></tr><tr><td>Production</td><td><a href="https://prod.mydupr.com/api/swagger-ui/index.html#/Match/saveMatchInBulk">Prod: Create Matches in Bulk</a></td></tr></tbody></table>

#### Example Request Object

The structure for a single match is identical across both endpoints. For Bulk Upload, simply provide an array of these objects.

```json
{
    "identifier": "unique-identifier", // identifier unique to your system
    "location": "Newport Beach, CA", // location of match
    "matchDate": "yyyy-MM-dd", // date of match
    "teamA": {
      "player1": "L8EW8W", // dupr id of player
      "player2": "O8GJV8", 
      "game1": 7, // game 1 score for this team
      "game2": 11, // omit if game is not played (and all subsequent games)
      "game3": 0,
      "game4": 0,
      "game5": 0
    },
    "teamB": {
      "player1": "L8EW8W",
      "player2": "O8GJV8",
      "game1": 7,
      "game2": 11,
      "game3": 0,
      "game4": 0,
      "game5": 0
    },
    "format": "SINGLES", // singles or doubles match
    "event": "Event name", // name of tournament or league (display purposes only)
    "bracket": "Bracket name", // name of bracket in tournament (display purposes only)
    "matchType": "SIDEOUT", // sideout or rally
    "clubId": 7614955351, // id of club, omit if not a club match
    "extras": {
      "key1": "value1",
      "key2": "value2"
    }, // optional field
    "matchSource": "CLUB" // omit if not a club match
  }
```

#### Handling the API Response

When a match is successfully created (singular or bulk), the API returns a response object containing unique identifiers. You must store these IDs in your database to manage the match lifecycle. The structure for a successful match creation is identical across both endpoints. For Bulk Upload, it is simply an array of these objects.

```json
{
    "status": "SUCCESS",
    "result": {
        "identifier": "unique-identifier", // identifier unique to your system
        "matchCode": "0123456789", // DUPR match id, SAVE THIS
        "hashedMatchCode": "9P45OZ7VR"
    }
}
```

#### **Bulk Response & Error Handling**

For bulk uploads, the response contains an array of `successes` and `errors`. If a match fails (e.g., "Match with identifier already exists"), it will be listed in the errors array with a specific reason.

***

## Managing the Match Lifecycle

Once a match is submitted, you may need to adjust it. These actions require the `matchCode` saved from the initial response.

#### Updating a Match

If a match needs to be updated, the original owner of the match or a trusted admin should have the functionality readily available on the platform.

<table><thead><tr><th width="186">Environment</th><th>API</th></tr></thead><tbody><tr><td>UAT</td><td><a href="https://uat.mydupr.com/api/swagger-ui/index.html#/Match/updateMatch">UAT: Update Match</a></td></tr><tr><td>Production</td><td><a href="https://prod.mydupr.com/api/swagger-ui/index.html#/Match/updateMatch">Prod: Update Match</a></td></tr></tbody></table>

#### Deleting a Match

If a match needs to be deleted, the original owner of the match or a trusted admin should have the functionality readily available on the platform.

<table><thead><tr><th width="186">Environment</th><th>API</th></tr></thead><tbody><tr><td>UAT</td><td><a href="https://uat.mydupr.com/api/swagger-ui/index.html#/Match/deleteMatch">UAT: Delete Match</a></td></tr><tr><td>Production</td><td><a href="https://prod.mydupr.com/api/swagger-ui/index.html#/Match/deleteMatch">Prod: Delete Match</a></td></tr></tbody></table>

{% hint style="info" %}
Building an AI / computer-vision integration? See [AI-Powered Ratings & Match Annotations](/dupr-raas/integration-guides/ai-powered-ratings-and-match-annotations.md) for the `INFORMATIONAL` match + vendor annotation flow.
{% endhint %}
