MarvelRivalsAPI.com
Swagger DocsDiscord
  • Introduction
    • Documentation Overview
  • Errors
  • Rate Limits
  • Endpoints
    • Achievements
      • All Achievements
      • Achievement
    • Battlepass
    • Heroes
      • All Heroes
      • Hero
      • Hero Stats
      • Hero Leaderboard
      • Costumes
        • All Costumes
        • Costume
    • Items
      • All Items
      • Item
    • Maps
      • All Maps
    • Patch Notes
      • All Balances
        • Balance
      • All Dev Diaries
        • Dev Diray
      • All Patch Notes
        • Patch Note
      • Game Versions
      • Seasons
    • Player Stats
      • Find Player
      • Player
      • Update Player
    • Match Stats
      • Match History v1
      • Match
      • Match History v2
Powered by GitBook
On this page

Was this helpful?

  1. Endpoints
  2. Player Stats

Update Player

GET https://marvelrivalsapi.com/api/v1/player/:query/update

This endpoint triggers an update of player data identified by the uid or username. It performs the necessary updates and returns a success or failure response.

IMPORTANT

The update player endpoint is a QUEUE & TIME & USER sensitive/locked endpoint at a set time of 30 minutes what this means is it can only be used every 30 minutes on 1 specific player.

Know the do's and don'ts

Understanding how to use this endpoint is important, not only for you and your users but for our systems and others using it. When an update request is made for a user there are a few things that happen:

  1. The queried user is placed in queue

  2. When its that players turn in queue their data is then updated

This process can take up to 30 minutes for the players data to update. In most cases though its done within 0 - 5 minutes

when an update request is made a lock is put in place to prevent any future update requests for the queried player for 30 minutes.

Like you our system has flaws and in special cases users have been able to get themselves stuck in a data loop. This happens because each time an update request is made for the queried user their place in the queue starts over which results in a longer wait for their data to update if it updates at all. most cases waiting a 30 minute cycle fixes this loop but if it doesn't then the result is you having to contact support to get the user out of the data loop.

Headers

Name
Value

Content-Type

application/json

x-api-key*

YOUR API KEY

Query Parameters

Name
Type
Required
Description

query*

string

✔️

The unique identifier of the player (could be uid or username).

Example Requests

curl -X GET "https://marvelrivalsapi.com/api/v1/player/Sypeh/update"
     -H "x-api-key: YOUR_API_KEY"
const axios = require("axios");

try {
    const response = await axios.get("https://marvelrivalsapi.com/api/v1/player/Sypeh/update", {
        headers: {
            "x-api-key": "YOUR_API_KEY"
        }
    });
    console.log(response.data);
} catch (error) {
    console.error("Error fetching balances:", error.response ? error.response.data : error.message);
}
import requests

url = "https://marvelrivalsapi.com/api/v1/player/Sypeh/update"
headers = {
    "x-api-key": "YOUR_API_KEY"
}

response = requests.get(url, headers=headers)

if response.status_code == 200:
    print(response.json())
else:
    print(f"Error {response.status_code}: {response.text}")
import java.net.http.*;
import java.net.URI;
import java.io.IOException;

public class ApiClient {
    public static void main(String[] args) {
        HttpClient client = HttpClient.newHttpClient();
        HttpRequest request = HttpRequest.newBuilder()
            .uri(URI.create("https://marvelrivalsapi.com/api/v1/player/Sypeh/update"))
            .header("x-api-key", "YOUR_API_KEY")
            .GET()
            .build();

        try {
            HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
            System.out.println(response.body());
        } catch (IOException | InterruptedException e) {
            e.printStackTrace();
        }
    }
}

Response

{
    "success": true,
    "message": "Players data will be updated - 0-30m"
}
{
  "error": true,
  "message": "Player Username is required",
  "status": 400
}
{
  "error": true,
  "message": "Invalid or missing API key.",
  "status": 401
}
{
  "error": true,
  "message": "Player not found.",
  "status": 404
}
{
    "error": true,
    "message": "You can request an update in 25 minutes.",
    "status": 429
}
{
  "error": true,
  "message": "An error occurred while fetching player data.",
  "status": 500
}

Response Field Descriptions

Field
Type
Description

success

Boolean

Indicates if the request was successful (e.g., true).

message

String

A message describing the status or action (e.g., "Players data will be updated - 0-30m").

PreviousPlayerNextMatch Stats

Last updated 2 months ago

Was this helpful?