{
  "openapi": "3.1.0",
  "info": {
    "title": "CheckMyGames API",
    "version": "1.0.0",
    "summary": "Read and manage your video game collection.",
    "description": "Every endpoint needs an API key sent as “Authorization: Bearer gc_…”. Keys are never accepted in the query string. A key only ever sees the collection of its owner, and the write scope is required for POST, PATCH and DELETE — it is never implied by read. Errors always come back as { \"error\": { \"code\", \"message\" } } with English messages.",
    "license": {
      "name": "AGPL-3.0-or-later",
      "identifier": "AGPL-3.0-or-later"
    }
  },
  "servers": [
    {
      "url": "https://0.0.0.0:3000/api/v1",
      "description": "CheckMyGames"
    }
  ],
  "tags": [
    {
      "name": "games",
      "description": "The copies in your collection."
    },
    {
      "name": "catalogue",
      "description": "Platforms, tags and the public index."
    },
    {
      "name": "igdb",
      "description": "The cached IGDB proxy used to add games."
    },
    {
      "name": "data",
      "description": "Statistics and export."
    }
  ],
  "security": [
    {
      "apiKey": []
    }
  ],
  "paths": {
    "/games": {
      "get": {
        "operationId": "listGames",
        "tags": [
          "games"
        ],
        "summary": "List the games in your collection",
        "description": "Cursor paginated. Follow nextCursor until it comes back null; a page may be shorter than the limit and still have a next cursor. The q parameter runs the same weighted, accent-insensitive search as the showcase, over title, edition, region, tags, developer and notes.",
        "x-required-scope": "read",
        "parameters": [
          {
            "name": "platform",
            "in": "query",
            "description": "Platform slug or id. Repeat it or comma-separate for several.",
            "schema": {
              "type": "string"
            },
            "example": "snes"
          },
          {
            "name": "status",
            "in": "query",
            "description": "Ownership status.",
            "schema": {
              "type": "string",
              "enum": [
                "owned",
                "wanted",
                "sold"
              ]
            }
          },
          {
            "name": "progress",
            "in": "query",
            "description": "Play progress. Repeat it or comma-separate for several.",
            "schema": {
              "type": "string",
              "enum": [
                "backlog",
                "playing",
                "beaten",
                "campaign_done",
                "completed",
                "abandoned"
              ]
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Free text search across the copy and the game.",
            "schema": {
              "type": "string"
            },
            "example": "zelda gamecube pal"
          },
          {
            "name": "tag",
            "in": "query",
            "description": "Only copies carrying this tag.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "Opaque cursor returned as nextCursor by the previous page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Page size, 50 by default.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A page of games.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GamePage"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request: bad parameter, bad cursor, or an unknown field in the body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks the scope this endpoint requires.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. The Retry-After header says how long to wait.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createGame",
        "tags": [
          "games"
        ],
        "summary": "Add a game to your collection",
        "description": "Send igdbId to pull the canonical record from IGDB (cover art and screenshots download in the background), gameId to reuse a record this instance already has, or manualTitle when IGDB does not know the game. Unknown fields are rejected.",
        "x-required-scope": "write",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GameInput"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The copy that was created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Game"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request: bad parameter, bad cursor, or an unknown field in the body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks the scope this endpoint requires.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "That game, platform, region and edition are already in the collection.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. The Retry-After header says how long to wait.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/games/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "description": "The id of the copy.",
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "operationId": "getGame",
        "tags": [
          "games"
        ],
        "summary": "Read one copy",
        "description": "An id that belongs to another collection answers 404: the API never confirms that it exists.",
        "x-required-scope": "read",
        "responses": {
          "200": {
            "description": "The copy, with the canonical game record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Game"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request: bad parameter, bad cursor, or an unknown field in the body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks the scope this endpoint requires.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such game in this collection.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. The Retry-After header says how long to wait.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "updateGame",
        "tags": [
          "games"
        ],
        "summary": "Change a copy",
        "description": "Only the fields you send change. Server-computed fields are not accepted: campaignCompleted follows from progress, and the search index and the page cache refresh on their own.",
        "x-required-scope": "write",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GamePatch"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The copy after the change.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Game"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request: bad parameter, bad cursor, or an unknown field in the body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks the scope this endpoint requires.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such game in this collection.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. The Retry-After header says how long to wait.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteGame",
        "tags": [
          "games"
        ],
        "summary": "Remove a copy",
        "description": "Removes the copy and its tags. The canonical game record stays: other collections may share it.",
        "x-required-scope": "write",
        "responses": {
          "200": {
            "description": "The copy was removed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "deleted",
                    "id"
                  ],
                  "properties": {
                    "deleted": {
                      "type": "boolean",
                      "const": true
                    },
                    "id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request: bad parameter, bad cursor, or an unknown field in the body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks the scope this endpoint requires.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such game in this collection.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. The Retry-After header says how long to wait.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/platforms": {
      "get": {
        "operationId": "listPlatforms",
        "tags": [
          "catalogue"
        ],
        "summary": "List the platform catalogue",
        "description": "The seeded catalogue of the instance, plus how many copies you own on each platform.",
        "x-required-scope": "read",
        "responses": {
          "200": {
            "description": "The catalogue.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Platform"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request: bad parameter, bad cursor, or an unknown field in the body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks the scope this endpoint requires.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. The Retry-After header says how long to wait.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/catalogue": {
      "get": {
        "operationId": "searchCatalogue",
        "tags": [
          "igdb"
        ],
        "summary": "Search the games this instance already has",
        "description": "Try this first when adding a game: it is instant and does not count against the daily IGDB search limit. Send the gameId of a result to POST /games. If the game is not here, use /search.",
        "x-required-scope": "read",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "description": "At least two characters. English or Spanish title.",
            "schema": {
              "type": "string",
              "minLength": 2
            }
          },
          {
            "name": "platform",
            "in": "query",
            "description": "Only games released on this platform, by slug or id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 25,
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Catalogue games.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/CatalogueGame"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request: bad parameter, bad cursor, or an unknown field in the body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks the scope this endpoint requires.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. The Retry-After header says how long to wait.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/search": {
      "get": {
        "operationId": "searchIgdb",
        "tags": [
          "igdb"
        ],
        "summary": "Search IGDB for a game to add",
        "description": "This searches IGDB, not your collection — use /games?q= for that. Try /catalogue first: new searches here count against a daily limit. Take the igdbId from a result and send it to POST /games.",
        "x-required-scope": "read",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "description": "At least two characters.",
            "schema": {
              "type": "string",
              "minLength": 2
            }
          },
          {
            "name": "platform",
            "in": "query",
            "description": "Narrow the search to one platform, by slug or id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Candidate games.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SearchCandidate"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request: bad parameter, bad cursor, or an unknown field in the body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks the scope this endpoint requires.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. The Retry-After header says how long to wait.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "IGDB is not configured on this instance, or is not answering.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/games/{id}/valuation": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "operationId": "getValuation",
        "tags": [
          "games"
        ],
        "summary": "What a copy is worth",
        "description": "The estimated second-hand value of one copy in Spain: the figure, its range, the confidence and the monthly history. Identical copies share the estimate. “value” is the one that counts: a manual value overrides the estimate.",
        "x-required-scope": "read",
        "responses": {
          "200": {
            "description": "The valuation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Valuation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request: bad parameter, bad cursor, or an unknown field in the body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks the scope this endpoint requires.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No copy with that id in this collection.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. The Retry-After header says how long to wait.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "refreshValuation",
        "tags": [
          "games"
        ],
        "summary": "Refresh the valuation now",
        "description": "Works the estimate out again and waits for the result. Takes a few seconds. If the estimate is less than an hour old it is returned as is. Limited per person per day (429 when spent).",
        "x-required-scope": "write",
        "responses": {
          "200": {
            "description": "The fresh valuation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Valuation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request: bad parameter, bad cursor, or an unknown field in the body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks the scope this endpoint requires.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No copy with that id in this collection.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. The Retry-After header says how long to wait.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "setManualValuation",
        "tags": [
          "games"
        ],
        "summary": "Set the value by hand",
        "description": "Overrides the estimate everywhere. Send manualValue: null to go back to the estimate.",
        "x-required-scope": "write",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "manualValue"
                ],
                "properties": {
                  "manualValue": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "minimum": 0
                  },
                  "manualNote": {
                    "type": "string",
                    "maxLength": 500
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The valuation after the change.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Valuation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request: bad parameter, bad cursor, or an unknown field in the body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks the scope this endpoint requires.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No copy with that id in this collection.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. The Retry-After header says how long to wait.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/stats": {
      "get": {
        "operationId": "getStats",
        "tags": [
          "data"
        ],
        "summary": "Collection statistics",
        "description": "The same figures as the showcase footer, plus the breakdown per platform. Cached for ten minutes.",
        "x-required-scope": "read",
        "responses": {
          "200": {
            "description": "The statistics.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Stats"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request: bad parameter, bad cursor, or an unknown field in the body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks the scope this endpoint requires.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. The Retry-After header says how long to wait.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/tags": {
      "get": {
        "operationId": "listTags",
        "tags": [
          "catalogue"
        ],
        "summary": "List your tags",
        "description": "Every tag in your collection with how many copies carry it.",
        "x-required-scope": "read",
        "responses": {
          "200": {
            "description": "The tags.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Tag"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request: bad parameter, bad cursor, or an unknown field in the body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks the scope this endpoint requires.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. The Retry-After header says how long to wait.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/export": {
      "get": {
        "operationId": "exportCollection",
        "tags": [
          "data"
        ],
        "summary": "Export the whole collection",
        "description": "Not paginated: this is the whole collection in one file. CSV is the only response in the API that is not JSON, because a CSV wrapped in JSON opens in no spreadsheet. Errors are still JSON.",
        "x-required-scope": "read",
        "parameters": [
          {
            "name": "format",
            "in": "query",
            "description": "json by default.",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "csv"
              ],
              "default": "json"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The export.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "collection",
                    "exportedAt",
                    "count",
                    "data"
                  ],
                  "properties": {
                    "collection": {
                      "type": "string"
                    },
                    "exportedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "count": {
                      "type": "integer"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Game"
                      }
                    }
                  }
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request: bad parameter, bad cursor, or an unknown field in the body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks the scope this endpoint requires.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. The Retry-After header says how long to wait.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/collections": {
      "get": {
        "operationId": "listCollections",
        "tags": [
          "catalogue"
        ],
        "summary": "Index of the public collections on this instance",
        "description": "Public collections only. Private ones do not appear, not even as a count.",
        "x-required-scope": "read",
        "responses": {
          "200": {
            "description": "The public index.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Collection"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request: bad parameter, bad cursor, or an unknown field in the body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks the scope this endpoint requires.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. The Retry-After header says how long to wait.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/openapi.json": {
      "get": {
        "operationId": "getOpenApiDocument",
        "tags": [
          "catalogue"
        ],
        "summary": "This document",
        "description": "The only endpoint that needs no API key.",
        "security": [],
        "responses": {
          "200": {
            "description": "The OpenAPI 3.1 document.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "apiKey": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "gc_…",
        "description": "An API key created in the panel, at /panel/settings. Scopes are read and write; write is never implied by read. Limits are per person, shared by all their keys: 120 requests per minute and 5000 writes per day."
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "unauthorized",
                  "forbidden",
                  "not_found",
                  "invalid_request",
                  "unknown_field",
                  "duplicate",
                  "rate_limited",
                  "upstream_unavailable",
                  "internal_error"
                ]
              },
              "message": {
                "type": "string",
                "description": "Always in English."
              }
            }
          }
        },
        "examples": [
          {
            "error": {
              "code": "unauthorized",
              "message": "Missing Authorization header. Use “Authorization: Bearer gc_…”."
            }
          }
        ]
      },
      "GamePage": {
        "type": "object",
        "required": [
          "data",
          "limit",
          "nextCursor"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Game"
            }
          },
          "limit": {
            "type": "integer"
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass it back as ?cursor= for the next page. Null on the last page."
          }
        }
      },
      "Game": {
        "type": "object",
        "required": [
          "id",
          "game",
          "platform",
          "copy",
          "tags"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "addedAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "title": {
            "type": "string",
            "description": "The title shown for this copy: localTitle if set, else the canonical game title."
          },
          "valuation": {
            "$ref": "#/components/schemas/ValuationSummary"
          },
          "game": {
            "type": "object",
            "description": "The canonical record, shared by the whole instance.",
            "properties": {
              "id": {
                "type": "string"
              },
              "igdbId": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "title": {
                "type": "string"
              },
              "slug": {
                "type": "string"
              },
              "releaseYear": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "developers": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "genres": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "summary": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "coverUrl": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uri"
              },
              "screenshotUrls": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uri"
                }
              }
            }
          },
          "platform": {
            "$ref": "#/components/schemas/Platform"
          },
          "copy": {
            "type": "object",
            "description": "Your copy: edition, condition, where it lives and what it cost.",
            "properties": {
              "localTitle": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 200,
                "description": "The title as printed on your copy. Shown everywhere and used for the valuation. Empty: the Spanish IGDB title when the owner uses Spanish, else the original."
              },
              "edition": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 120
              },
              "region": {
                "type": "string",
                "enum": [
                  "pal",
                  "ntsc_u",
                  "ntsc_j",
                  "region_free"
                ],
                "default": "pal"
              },
              "subregion": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 80,
                "description": "PAL España, PAL UK…"
              },
              "format": {
                "type": "string",
                "enum": [
                  "physical",
                  "digital"
                ],
                "default": "physical"
              },
              "digitalStore": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "ownership": {
                "type": "string",
                "enum": [
                  "owned",
                  "wanted",
                  "sold"
                ],
                "default": "owned"
              },
              "completeness": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "sealed",
                  "cib",
                  "no_manual",
                  "loose",
                  null
                ]
              },
              "condition": {
                "type": [
                  "number",
                  "null"
                ],
                "minimum": 0,
                "maximum": 10
              },
              "location": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "protectiveCase": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "conservationNote": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "purchaseDate": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date"
              },
              "purchasePrice": {
                "type": [
                  "number",
                  "null"
                ],
                "minimum": 0
              },
              "currency": {
                "type": "string",
                "minLength": 3,
                "maxLength": 3,
                "default": "EUR"
              },
              "store": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "isGift": {
                "type": "boolean",
                "default": false
              },
              "progress": {
                "type": "string",
                "enum": [
                  "backlog",
                  "playing",
                  "beaten",
                  "campaign_done",
                  "completed",
                  "abandoned"
                ],
                "default": "backlog"
              },
              "rating": {
                "type": [
                  "integer",
                  "null"
                ],
                "minimum": 1,
                "maximum": 10
              },
              "hoursPlayed": {
                "type": [
                  "number",
                  "null"
                ],
                "minimum": 0
              },
              "favorite": {
                "type": "boolean",
                "default": false
              },
              "visibility": {
                "type": "string",
                "enum": [
                  "public",
                  "private"
                ],
                "default": "public"
              },
              "notes": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 4000
              },
              "tags": {
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 48
                },
                "maxItems": 20
              }
            }
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "GameInput": {
        "type": "object",
        "required": [
          "platformId"
        ],
        "description": "One of igdbId, gameId or manualTitle is required. Unknown fields are rejected.",
        "properties": {
          "igdbId": {
            "type": "integer",
            "minimum": 1,
            "description": "From GET /search."
          },
          "gameId": {
            "type": "string",
            "description": "A canonical record this instance already has."
          },
          "manualTitle": {
            "type": "string",
            "maxLength": 200,
            "description": "For a game IGDB does not know."
          },
          "platformId": {
            "type": "string"
          },
          "localTitle": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 200,
            "description": "The title as printed on your copy. Shown everywhere and used for the valuation. Empty: the Spanish IGDB title when the owner uses Spanish, else the original."
          },
          "edition": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 120
          },
          "region": {
            "type": "string",
            "enum": [
              "pal",
              "ntsc_u",
              "ntsc_j",
              "region_free"
            ],
            "default": "pal"
          },
          "subregion": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 80,
            "description": "PAL España, PAL UK…"
          },
          "format": {
            "type": "string",
            "enum": [
              "physical",
              "digital"
            ],
            "default": "physical"
          },
          "digitalStore": {
            "type": [
              "string",
              "null"
            ]
          },
          "ownership": {
            "type": "string",
            "enum": [
              "owned",
              "wanted",
              "sold"
            ],
            "default": "owned"
          },
          "completeness": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "sealed",
              "cib",
              "no_manual",
              "loose",
              null
            ]
          },
          "condition": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 0,
            "maximum": 10
          },
          "location": {
            "type": [
              "string",
              "null"
            ]
          },
          "protectiveCase": {
            "type": [
              "string",
              "null"
            ]
          },
          "conservationNote": {
            "type": [
              "string",
              "null"
            ]
          },
          "purchaseDate": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "purchasePrice": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 0
          },
          "currency": {
            "type": "string",
            "minLength": 3,
            "maxLength": 3,
            "default": "EUR"
          },
          "store": {
            "type": [
              "string",
              "null"
            ]
          },
          "isGift": {
            "type": "boolean",
            "default": false
          },
          "progress": {
            "type": "string",
            "enum": [
              "backlog",
              "playing",
              "beaten",
              "campaign_done",
              "completed",
              "abandoned"
            ],
            "default": "backlog"
          },
          "rating": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1,
            "maximum": 10
          },
          "hoursPlayed": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 0
          },
          "favorite": {
            "type": "boolean",
            "default": false
          },
          "visibility": {
            "type": "string",
            "enum": [
              "public",
              "private"
            ],
            "default": "public"
          },
          "notes": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 4000
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 48
            },
            "maxItems": 20
          }
        }
      },
      "GamePatch": {
        "type": "object",
        "description": "Every field is optional; send only what changes. Unknown fields are rejected.",
        "properties": {
          "platformId": {
            "type": "string"
          },
          "localTitle": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 200,
            "description": "The title as printed on your copy. Shown everywhere and used for the valuation. Empty: the Spanish IGDB title when the owner uses Spanish, else the original."
          },
          "edition": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 120
          },
          "region": {
            "type": "string",
            "enum": [
              "pal",
              "ntsc_u",
              "ntsc_j",
              "region_free"
            ],
            "default": "pal"
          },
          "subregion": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 80,
            "description": "PAL España, PAL UK…"
          },
          "format": {
            "type": "string",
            "enum": [
              "physical",
              "digital"
            ],
            "default": "physical"
          },
          "digitalStore": {
            "type": [
              "string",
              "null"
            ]
          },
          "ownership": {
            "type": "string",
            "enum": [
              "owned",
              "wanted",
              "sold"
            ],
            "default": "owned"
          },
          "completeness": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "sealed",
              "cib",
              "no_manual",
              "loose",
              null
            ]
          },
          "condition": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 0,
            "maximum": 10
          },
          "location": {
            "type": [
              "string",
              "null"
            ]
          },
          "protectiveCase": {
            "type": [
              "string",
              "null"
            ]
          },
          "conservationNote": {
            "type": [
              "string",
              "null"
            ]
          },
          "purchaseDate": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "purchasePrice": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 0
          },
          "currency": {
            "type": "string",
            "minLength": 3,
            "maxLength": 3,
            "default": "EUR"
          },
          "store": {
            "type": [
              "string",
              "null"
            ]
          },
          "isGift": {
            "type": "boolean",
            "default": false
          },
          "progress": {
            "type": "string",
            "enum": [
              "backlog",
              "playing",
              "beaten",
              "campaign_done",
              "completed",
              "abandoned"
            ],
            "default": "backlog"
          },
          "rating": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1,
            "maximum": 10
          },
          "hoursPlayed": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 0
          },
          "favorite": {
            "type": "boolean",
            "default": false
          },
          "visibility": {
            "type": "string",
            "enum": [
              "public",
              "private"
            ],
            "default": "public"
          },
          "notes": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 4000
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 48
            },
            "maxItems": 20
          }
        }
      },
      "Platform": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "slug": {
            "type": "string",
            "examples": [
              "snes"
            ]
          },
          "name": {
            "type": "string"
          },
          "shortName": {
            "type": "string"
          },
          "manufacturer": {
            "type": "string"
          },
          "family": {
            "type": [
              "string",
              "null"
            ]
          },
          "type": {
            "type": "string",
            "enum": [
              "home",
              "handheld",
              "hybrid",
              "computer",
              "arcade"
            ]
          },
          "generation": {
            "type": [
              "integer",
              "null"
            ]
          },
          "releaseYear": {
            "type": [
              "integer",
              "null"
            ]
          },
          "igdbPlatformId": {
            "type": [
              "integer",
              "null"
            ]
          },
          "itemsOwned": {
            "type": "integer"
          }
        }
      },
      "CatalogueGame": {
        "type": "object",
        "properties": {
          "gameId": {
            "type": "string"
          },
          "igdbId": {
            "type": [
              "integer",
              "null"
            ]
          },
          "title": {
            "type": "string"
          },
          "titleEs": {
            "type": [
              "string",
              "null"
            ]
          },
          "year": {
            "type": [
              "integer",
              "null"
            ]
          },
          "developer": {
            "type": [
              "string",
              "null"
            ]
          },
          "platforms": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Platform slugs."
          }
        }
      },
      "SearchCandidate": {
        "type": "object",
        "properties": {
          "igdbId": {
            "type": "integer"
          },
          "title": {
            "type": "string"
          },
          "year": {
            "type": [
              "integer",
              "null"
            ]
          },
          "developer": {
            "type": [
              "string",
              "null"
            ]
          },
          "coverImageId": {
            "type": [
              "string",
              "null"
            ]
          },
          "platforms": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "kind": {
            "type": "string",
            "enum": [
              "game",
              "extra",
              "fan"
            ],
            "description": "game: the game itself (also remakes, remasters, ports). extra: DLC, expansion, bundle, pack or edition of another game. fan: mod or fan fork."
          },
          "ratings": {
            "type": "integer",
            "description": "Number of ratings on IGDB; a rough popularity signal. Results come sorted by relevance already."
          }
        }
      },
      "ValuationSummary": {
        "type": [
          "object",
          "null"
        ],
        "description": "Present on a copy once it has been valued. “value” is the manual value if set, else the estimate.",
        "properties": {
          "value": {
            "type": [
              "number",
              "null"
            ]
          },
          "currency": {
            "type": "string"
          },
          "estimate": {
            "type": [
              "number",
              "null"
            ]
          },
          "manualValue": {
            "type": [
              "number",
              "null"
            ]
          },
          "low": {
            "type": [
              "number",
              "null"
            ]
          },
          "high": {
            "type": [
              "number",
              "null"
            ]
          },
          "listings": {
            "type": "integer",
            "description": "Listings behind the estimate."
          },
          "conditionUsed": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "sealed",
              "cib",
              "no_manual",
              "loose",
              "unknown",
              null
            ]
          },
          "source": {
            "type": "string",
            "enum": [
              "market",
              "store",
              "none"
            ]
          },
          "confidence": {
            "type": "string",
            "enum": [
              "high",
              "medium",
              "low",
              "none"
            ]
          },
          "computedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "Valuation": {
        "type": "object",
        "description": "The valuation of one copy. Identical copies share the estimate; a manual value overrides it.",
        "properties": {
          "itemId": {
            "type": "string"
          },
          "value": {
            "type": [
              "number",
              "null"
            ]
          },
          "currency": {
            "type": "string"
          },
          "estimate": {
            "type": [
              "number",
              "null"
            ]
          },
          "manualValue": {
            "type": [
              "number",
              "null"
            ]
          },
          "manualNote": {
            "type": [
              "string",
              "null"
            ]
          },
          "low": {
            "type": [
              "number",
              "null"
            ]
          },
          "high": {
            "type": [
              "number",
              "null"
            ]
          },
          "listingsCount": {
            "type": "integer",
            "description": "Listings behind the estimate."
          },
          "conditionUsed": {
            "type": [
              "string",
              "null"
            ]
          },
          "source": {
            "type": "string",
            "enum": [
              "market",
              "store",
              "none"
            ]
          },
          "confidence": {
            "type": "string",
            "enum": [
              "high",
              "medium",
              "low",
              "none"
            ]
          },
          "computedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "nextAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "history": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "month": {
                  "type": "string",
                  "format": "date"
                },
                "value": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "low": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "high": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "source": {
                  "type": "string"
                },
                "listings": {
                  "type": "integer"
                }
              }
            }
          }
        }
      },
      "Stats": {
        "type": "object",
        "properties": {
          "totals": {
            "type": "object",
            "properties": {
              "totalItems": {
                "type": "integer"
              },
              "physical": {
                "type": "integer"
              },
              "digital": {
                "type": "integer"
              },
              "cib": {
                "type": "integer"
              },
              "systems": {
                "type": "integer"
              },
              "models": {
                "type": "integer"
              },
              "completedPercent": {
                "type": "integer"
              },
              "valuationTotal": {
                "type": "number",
                "description": "Sum of the valuation of the owned copies, in EUR."
              },
              "valuedItems": {
                "type": "integer"
              },
              "valuationTotalPublic": {
                "type": "number"
              },
              "valuedItemsPublic": {
                "type": "integer"
              }
            }
          },
          "byPlatform": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "slug": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "shortName": {
                  "type": "string"
                },
                "manufacturer": {
                  "type": "string"
                },
                "items": {
                  "type": "integer"
                }
              }
            }
          }
        }
      },
      "Tag": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "color": {
            "type": [
              "string",
              "null"
            ]
          },
          "count": {
            "type": "integer"
          }
        }
      },
      "Collection": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "bio": {
            "type": [
              "string",
              "null"
            ]
          },
          "publicItems": {
            "type": "integer"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "url": {
            "type": "string"
          }
        }
      }
    }
  }
}