The Ginto API (GraphQL)

Last update:
5/8/2025
API
app
Web
Before you start

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.

note

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.

Professional tip

Use our Ginto test workspace in Postman to test the various queries.

That's what you'll find in this guide:

Frequently asked questions

endpoints

#
0

End point for the production environment.

POST api.ginto.guide/graphql

Test environment endpoint:

POST api.dev.ginto.guide/graphql

introduction

#
0

upon

  • Integration FIRST
  • Implementation of quality levels
  • Agreement with Marc regarding accessibility evaluation (PI-Icons vs GINTO logic vs HotellerieSuisse and other criteria)

authorization

#
1

With every request, the API key must be Bearer Token The following are provided in the Authorization header:

Authorization: Bearer {token}

The API key can be requested by sending a short message to support@ginto.guide.

data schema

#
3

Division into pages (pagination)

#
4

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 EndCursorwho the cursor Defined the last element on the page. This EndCursor Can then for the Afterargument 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 Afterargument 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
            }
        }
    }
}

Set language

#
5

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

#
6
{
    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)
                }
            }
        }
    }
}

Get individual entry by ID

#
7
{
	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

#
8
{
    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:

filtering

#
9
{
  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
    }
 }‍

Einträge einer bestimmten Quelle abrufen

#
10
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5

Code

So wie bei PI jetzt

Get a list of all needs profiles

#
11
{
	ratingProfiles {
    id
    name
  }
}

Outro

Accessibility per room

#
20
  1. St

see also email from Julian to MC from G dated October 16, 2024

Other - RichText

Frequently asked questions

There are currently no frequently asked questions about this guide.

You might also be interested in this