API documentation for getType -> mints.id is incorrect

4 posts • viewed 57 times

This message aims at: reporting a bug

Status: Started
Upvotes: 1
Downvotes: 0

Hello,

The API documentation for the getType response specifies the mints.id field as an integer, but it's being returned as a string:

 

$ curl -X GET "https://api.numista.com/v3/types/99700" -H "Numista-API-Key: <APIKEY>" | jq

{
 "id": 99700,
 "url": "https://en.numista.com/99700",
 "title": "¼ Dollar "Washington Quarter" (George Rogers Clark National Historical Park, Indiana)",
  …
  "mints": [
   {
     "id": "10",
     "name": "United States Mint of Denver"
   },
   {
     "id": "11",
     "name": "United States Mint of Philadelphia"
   },
   {
     "id": "12",
     "name": "United States Mint of San Francisco"
   }
 ]
}

Compare it to the id field of the response which is being returned as an integer, consistent with the documentation.

Similar for https://api.numista.com/v3/mints/{mint_id}

the id in the response is a string.
 


Request{method=GET url=https://api.numista.com/v3/mints/1}
Response body: {"id":"1","place":"Munich (Mu00fcnchen), Germany","country":{"code":"allemagne","name":"Germany, Federal Republic of"},"start_year":1158,"end_year":9999,"nomisma_id":"munich","wikidata_id":"Q812404"}

Whereas for https://api.numista.com/v3/mints – the id in the response is an integer.

 

Request{method=GET url=https://api.numista.com/v3/mints}
Response body: {"count":4679,"mints":[{"id":1,"place":"Munich (Mu00fcnchen), Germany","country":{"code":"allemagne","name":"Germany, Federal Republic of"},"start_year":1158,"end_year":9999,"nomisma_id":"munich","wikidata_id":"Q812404"},{"id":2,…

 

Ideally the ID type would be consistent across API calls

And for https://api.numista.com/v3/publications/{id}

the fields year, contributors.id, and publishers.id are also defined as integers but returned as strings.

Status changed to Started (dzmitry.huletski, 7 Ara 2025, 22:03)

» Forum policy

Used time zone is UTC+2:00.
Current time is 22:39.