endpoints
Ginto provides two GraphQL endpoints. One for the production environment and one for the test environment.
End point for the production environment.
POST api.ginto.guide/graphql
Test environment endpoint:
POST api.dev.ginto.guide/graphql
The API is protected and can only be invoked if the request is authenticated using an API key. This must be specified as a bearer token in the authorization header with every request. Contact support@ginto.guide to get an API key for API authorization.
If you already have an interface with one of our partner organizations, for example the accommodataHub from Hotellerie Suisse, you can also obtain some information from there.
Use our Ginto test workspace in Postman to test the various queries.
Ginto provides two GraphQL endpoints. One for the production environment and one for the test environment.
End point for the production environment.
POST api.ginto.guide/graphql
Test environment endpoint:
POST api.dev.ginto.guide/graphql
The data structure is explained here: How should data from rooms, paths, icons, evaluations, etc. be used and integrated by the API?
upon
Postman ist ein bekanntes Werkzeug zur Erstellung und Verwendung von APIs. Es bietet eine gute Möglichkeit, die Ginto-GraphQL-API zu erkunden und zu testen.
Postman kann online genutzt und kostenlos heruntergeladen werden. Hier findest du eine detaillierte Anleitung zur Erstellung von GraphQL-Abfragen.
GraphQL provides a typed schema for the data. Thanks to the introspection function, documentation is integrated directly into the schema. This provides information about which queries are supported. Client libraries are available for almost all relevant programming languages. GraphQL can be used with a normal HTTP request. API development tools like Postman support GraphQL out of the box.
For performance and scale reasons, the number of entries returned per request is limited. There is a pagination mechanism that makes it possible to jump to the next batch of entries via cursor-paged pagination.
The concept is based on connections and edges, which are a quasi-standard for pagination in GraphQL. For queries that allow pagination, the arguments can First
and After
as well as a requested PageInfo
be defined. The first argument defines how many items should be returned with the request. For performance reasons, this value must not exceed 50. Die PageInfo
contains a EndCursor
who the cursor
Defined the last element on the page. This EndCursor
Can then for the After
argument of the next request can be used to add the following elements after EndCursor
to receive. The parameters for controlling page numbering are documented in the diagram.
For the first page, no After
argument can be set. The following query returns the first 50 entries along with a PageInfo
Back that the EndCursor
the page contains.
{
allEntries(first: 50) {
totalCount
pageInfo {
hasNextPage
endCursor
}
edges {
node {
id
name
}
}
}
}
To request the next 50 entries, we use the EndCursor
the previous answer and set it as follows for the after argument of the next request:
{
allEntries(first: 50, after: "NTA") {
totalCount
pageInfo {
hasNextPage
endCursor
}
edges {
node {
id
name
}
}
}
}
The default language of the returned data can be set. The languages German, French, Italian and English are currently supported.
The default language of the returned data can be set by setting the HTTP header Accept-Language
be selected. Currently, the options are de (German)
, en (English)
, fr (French)
and it (Italian)
supports.
Here you can find more information about HTTP header Accept-Language.
For texts that are available in several languages, a specific language can also be defined using the Argument field.
Retrieve all entries.
{
allEntries {
totalCount
pageInfo {
hasNextPage
endCursor
}
edges {
node {
id
sourceIds(sourceKey: "zuerst") // at the moment only available for business users
name
position {
street
housenumber
postcode
city
lat
lng
}
externalRatings(sourceKey: "zuerst") {
iconUrl
descriptionDE: description(locale: DE)
descriptionFR: description(locale: FR)
descriptionIT: description(locale: IT)
descriptionEN: description(locale: EN)
grade
}
publication {
iconUrl
iconTextDE: iconText(locale: DE)
iconTextFR: iconText(locale: FR)
iconTextIT: iconText(locale: IT)
iconTextEN: iconText(locale: EN)
linkUrl
linkTextDE: linkText(locale: DE)
linkTextFR: linkText(locale: FR)
linkTextIT: linkText(locale: IT)
linkTextEN: linkText(locale: EN)
}
}
}
}
}
Retrieve a specific entry based on the ID.
{
entry(entryId: "ee659e74-295f-4285-8c3d-d90f232efa44") {
entryId
name
externalRatings(sourceKey: "zuerst") {
iconUrl
description
grade
}
publication {
linkUrl
linkText
}
licenseInfo {
license
attribution
isOpenData
}
manualWheelchairAccessibility: accessibility(ratingProfileId: "Z2lkOi8vcmFpbHMtYXBwL1JhdGluZ1Byb2ZpbGVzOjpSYXRpbmdQcm9maWxlLzc4") {
grade
conformance
}
powerWheelchairAccessibility: accessibility(ratingProfileId: "Z2lkOi8vcmFpbHMtYXBwL1JhdGluZ1Byb2ZpbGVzOjpSYXRpbmdQcm9maWxlLzc5") {
grade
conformance
}
pushchairAccessibility: accessibility(ratingProfileId: "Z2lkOi8vcmFpbHMtYXBwL1JhdGluZ1Byb2ZpbGVzOjpSYXRpbmdQcm9maWxlLzgw") {
grade
conformance
}
}
}
Retrieve entries by coordinates and names.
{
entriesBySearch(lat: 47.4224806, lng: 9.3760095, query: "palace", within: 5) {
totalCount
pageInfo {
hasNextPage
endCursor
}
edges {
node {
id
name
position {
street
housenumber
postcode
city
lat
lng
}
publication {
iconUrl
iconTextDE: iconText(locale: DE)
iconTextFR: iconText(locale: FR)
iconTextIT: iconText(locale: IT)
iconTextEN: iconText(locale: EN)
linkUrl
linkTextDE: linkText(locale: DE)
linkTextFR: linkText(locale: FR)
linkTextIT: linkText(locale: IT)
linkTextEN: linkText(locale: EN)
}
}
}
}
}
To request the next 50 entries we take the endCursor of the previous response and set it for the after argument of the next request as follows:
The API allows entries to be queried using defined filters. Individual input filters can be dynamically configured for each user account. It can be filtered by categories, sources, quality levels, zip codes, geographical boundaries, rating profiles, or manually added listings.
{
entriesByFilter(filterId: "Z2lkOi8vcmFpbHMtYXBwL0dyb3VwaW5nOjpFbnRyeUdyb3VwL2U2Y2I1ZTU4LTE0MDQtNDk5Mi05YjY1LTlkNjc1MTJmZTRiMg", first: 50, after: "NTA") {
totalCount
pageInfo {
hasNextPage
endCursor
}
edges {
node {
id
sourceIds(sourceKey: "parks.swiss") // at the moment only available for business users
name
externalRatings(sourceKey: "zuerst") {
iconUrl
description
grade
}
publication {
iconUrl
iconText
linkUrl
linkText
}
licenseInfo {
license
attribution
isOpenData
}
wheelchairAccessibility: accessibility(ratingProfileId: "Z2lkOi8vcmFpbHMtYXBwL1JhdGluZ1Byb2ZpbGVzOjpSYXRpbmdQcm9maWxlLzc4") {
grade
conformance
}
}
}
}
}
The following example retrieves all input filters for which a user is authorized. The ID can then be used for the entriesByFilter query.
{
entryFilters {
id
name
createdAt
updatedAt
categoryKeys
sources
qualityLevels
postcodes
}
}
Liste mit Quell-ID und Piktogrammen, Name, Link gemäss Importliste
Code
So wie bei PI jetzt
profiles
{
ratingProfiles {
id
name
}
}
Outro
intro
see also email from Julian to MC from G dated October 16, 2024
Other - RichText