Skip to content

Get Ticket by ID

A call to API_GetTicketData in this manner will retrieve ticket metadata information about a single achievement ticket, targeted by its ticket ID.

HTTP Request

GET

https://retroachievements.org/API/API_GetTicketData?i=12345

Query Parameters

NameRequired?Description
zYesYour username.
yYesYour web API key.
iYesThe target ticket ID.

Client Library

ts
import { buildAuthorization, getTicketData } from "@retroachievements/api";

// First, build your authorization object.
const username = "<your username on RA>";
const webApiKey = "<your web API key>";

const authorization = buildAuthorization({ username, webApiKey });

// Then, make the API call.
const ticket = await getTicketData(authorization, { ticketId: 12345 });
kotlin
val credentials = RetroCredentials("<username>", "<web api key>")
val api: RetroInterface = RetroClient(credentials).api

val response: NetworkResponse<GetTicketData.Response, ErrorResponse> = api.getTicket(
    ticketId = 12345
)

if (response is NetworkResponse.Success) {
    // handle the data
    val ticket: GetTicketData.Response = response.body

} else if (response is NetworkResponse.Error) {
    // if the server returns an error it be found here
    val errorResponse: ErrorResponse? = response.body

    // if the api (locally) had an internal error, it'll be found here
    val internalError: Throwable? = response.error
}

Response

json
{
  "id": 12345,
  "achievementId": 11843,
  "achievementTitle": "A good Beginning 2",
  "achievementDesc": "Your Partner Pokemon reaches Level 10.",
  "achievementType": null,
  "points": 3,
  "badgeName": "309094",
  "achievementAuthor": "tuteur51",
  "gameId": 2816,
  "consoleName": "Game Boy Advance",
  "gameTitle": "Pokemon Mystery Dungeon: Red Rescue Team",
  "gameIcon": "/Images/050264.png",
  "reportedAt": "2018-04-11 08:15:55",
  "reportType": 1,
  "reportState": 2,
  "hardcore": null,
  "reportNotes": "Right before going to Thunderwave Cave, all three of these triggered at the same time.<br/>MD5: 9837da1fdfe900c52f2109d9718d4e85",
  "reportedBy": "ThatOneEnderMan",
  "resolvedAt": "2018-04-16 08:03:31",
  "resolvedBy": "tuteur51",
  "reportStateDescription": "Resolved",
  "reportTypeDescription": "Triggered at the wrong time",
  "url": "https://retroachievements.org/ticketmanager.php?i=12345"
}
json
{
  "id": 12345,
  "achievementId": 11843,
  "achievementTitle": "A good Beginning 2",
  "achievementDesc": "Your Partner Pokemon reaches Level 10.",
  "points": 3,
  "badgeName": "309094",
  "achievementAuthor": "tuteur51",
  "gameId": 2816,
  "consoleName": "Game Boy Advance",
  "gameTitle": "Pokemon Mystery Dungeon: Red Rescue Team",
  "gameIcon": "/Images/050264.png",
  "reportedAt": "2018-04-11 08:15:55",
  "reportType": 1,
  "reportState": 2,
  "hardcore": null,
  "reportNotes": "Right before going to Thunderwave Cave, all three of these triggered at the same time.<br/>MD5: 9837da1fdfe900c52f2109d9718d4e85",
  "reportedBy": "ThatOneEnderMan",
  "resolvedAt": "2018-04-16 08:03:31",
  "resolvedBy": "tuteur51",
  "reportStateDescription": "Resolved",
  "reportTypeDescription": "Triggered at the wrong time",
  "url": "https://retroachievements.org/ticketmanager.php?i=12345"
}

Source

RepoURL
RAWebhttps://github.com/RetroAchievements/RAWeb/blob/master/public/API/API_GetTicketData.php
api-jshttps://github.com/RetroAchievements/api-js/blob/main/src/ticket/getTicketData.ts
api-kotlinhttps://github.com/RetroAchievements/api-kotlin/blob/main/src/main/kotlin/org/retroachivements/api/RetroInterface.kt

Released under the MIT license.