GraphQL queries can be sent as standard POST requests via HTTP. The query specifies which data should be returned in the response.
Requests are sent as JSON with the following structure in the request body:
{
"query": "{ allEntries(first: 10) { nodes { id name } } }",
"variables": {}
}
The request must be sent to the endpoint URL https://api.ginto.guide/graphql and must include the following information:
Content-Type: application/json (Header)Accept: application/graphql-response+json, application/json (Header)Authorization: Bearer {apiKey} (Header with your API key)Accept-Language (Header to select the desired language: de, en, fr or it)If the operation is successful, the server responds with a JSON object containing the data object. If an error occurs, the response may contain an errors array. In this case, the data object is either ZERO or only partially present.
Example with cURL:
curl -X POST https://api.ginto.guide/graphql \
-H "Content-Type: application/json" \
-H "Accept: application/graphql-response+json, application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept-Language: de" \
-d '{"query":"{ allEntries(first: 10) { nodes { id name } } }","variables":{}}'
Replace YOUR_API_KEY with your actual API key. The Accept-Language header is optional. Remove it or change de (German) to en (English), fr (French) or it (Italian) if necessary.
