Suggest a correction to a game
const url = 'https://api.thebgdb.org/v1/games/5c9b0f43-7a39-4f0c-8a4e-2f2d2b1d9a77/corrections';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"changes":[{"type":"field","field":"yearPublished","old":1994,"new":1995,"source":"https://www.catan.com/about-us"},{"type":"credit","action":"add","kind":"artist","name":"Michael Menzel"}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.thebgdb.org/v1/games/5c9b0f43-7a39-4f0c-8a4e-2f2d2b1d9a77/corrections \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "changes": [ { "type": "field", "field": "yearPublished", "old": 1994, "new": 1995, "source": "https://www.catan.com/about-us" }, { "type": "credit", "action": "add", "kind": "artist", "name": "Michael Menzel" } ] }'One proposal holds 1 to 20 changes to one game: a fact, a credit to add or remove, an alternate name. Nothing changes until a moderator accepts it; an accepted correction is kept against later imports and credited in the game’s history. The member’s email address must be confirmed. A member can suggest 20 corrections a day. A member verified as representing one of the game’s publishers has their correction marked as coming from the publisher; it is reviewed like any other.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The game’s id, as returned in every game object. The game’s slug is accepted too.
Example
5c9b0f43-7a39-4f0c-8a4e-2f2d2b1d9a77Request Bodyrequired
Section titled “Request Bodyrequired”object
object
The value the game showed when you wrote the correction. The correction is refused when the game no longer says this.
The value you propose, held to the rules of the field: yearPublished -3500 to 2100, players 1 to 999, playing time in minutes, minAge 0 to 99, tagline one line of 160 characters, description the description, plain text of 2,500 characters (paragraphs separated by a blank line and lists whose lines start with “- “, in the order: what the game is, premise, core, a turn, components, end, variants, editions; no links, HTML or other marks), officialUrl an http(s) address, ean a valid EAN-13 (a 12-digit UPC is accepted), kind one of game, expansion, accessory. Null says the fact is unknown; name and kind cannot be null.
Where you read it. Optional.
Optional.
object
The slug of an existing entry. Required to remove a credit.
To add someone or something the catalog does not list yet.
Where you read it. Optional.
Optional.
object
A language code such as “fr” or “pt-br”.
Where you read it. Optional.
Optional.
Must be true when a description is proposed: you wrote the text, or it is free to reuse.
Example
{ "changes": [ { "type": "field", "field": "yearPublished", "old": 1994, "new": 1995, "source": "https://www.catan.com/about-us" }, { "type": "credit", "action": "add", "kind": "artist", "name": "Michael Menzel" } ]}Responses
Section titled “Responses”The correction waits for a moderator.
object
object
The publisher the member verifiably represents, when the game is credited to it.
object
The value the game showed when you wrote the correction. The correction is refused when the game no longer says this.
The value you propose, held to the rules of the field: yearPublished -3500 to 2100, players 1 to 999, playing time in minutes, minAge 0 to 99, tagline one line of 160 characters, description the description, plain text of 2,500 characters (paragraphs separated by a blank line and lists whose lines start with “- “, in the order: what the game is, premise, core, a turn, components, end, variants, editions; no links, HTML or other marks), officialUrl an http(s) address, ean a valid EAN-13 (a 12-digit UPC is accepted), kind one of game, expansion, accessory. Null says the fact is unknown; name and kind cannot be null.
Where you read it. Optional.
Optional.
object
The slug of an existing entry. Required to remove a credit.
To add someone or something the catalog does not list yet.
Where you read it. Optional.
Optional.
object
A language code such as “fr” or “pt-br”.
Where you read it. Optional.
Optional.
Example
{ "data": { "status": "pending", "changes": [ { "type": "field", "field": "name" } ] }}A change is not valid; the message says which and why.
object
What went wrong, in plain English words. The wording may change: act on code.
A stable name for this refusal, for programs and for showing the message in another language. A code is never renamed; new ones may be added.
The numbers the sentence names, when it names any: for example { "max": 20 } with daily_photo_limit.
object
Example
{ "error": "Game not found", "code": "game_not_found"}The request has no valid session token.
object
What went wrong, in plain English words. The wording may change: act on code.
A stable name for this refusal, for programs and for showing the message in another language. A code is never renamed; new ones may be added.
The numbers the sentence names, when it names any: for example { "max": 20 } with daily_photo_limit.
object
Example
{ "error": "Game not found", "code": "game_not_found"}The member has not confirmed their email address.
object
What went wrong, in plain English words. The wording may change: act on code.
A stable name for this refusal, for programs and for showing the message in another language. A code is never renamed; new ones may be added.
The numbers the sentence names, when it names any: for example { "max": 20 } with daily_photo_limit.
object
Example
{ "error": "Game not found", "code": "game_not_found"}No game has this id.
object
What went wrong, in plain English words. The wording may change: act on code.
A stable name for this refusal, for programs and for showing the message in another language. A code is never renamed; new ones may be added.
The numbers the sentence names, when it names any: for example { "max": 20 } with daily_photo_limit.
object
Example
{ "error": "Game not found", "code": "game_not_found"}The game no longer says what old states, or already is as proposed.
object
What went wrong, in plain English words. The wording may change: act on code.
A stable name for this refusal, for programs and for showing the message in another language. A code is never renamed; new ones may be added.
The numbers the sentence names, when it names any: for example { "max": 20 } with daily_photo_limit.
object
Example
{ "error": "Game not found", "code": "game_not_found"}Rate limited, or the member already suggested 20 corrections today.
object
What went wrong, in plain English words. The wording may change: act on code.
A stable name for this refusal, for programs and for showing the message in another language. A code is never renamed; new ones may be added.
The numbers the sentence names, when it names any: for example { "max": 20 } with daily_photo_limit.
object
Example
{ "error": "Game not found", "code": "game_not_found"}