Skip to main content

AIRICA API

The AIRICA API uses a GraphQL endpoint to query and mutate data of your AIRICA account. JSON is used as the data interchange format.

Getting Started#

Before you can start using the API you must make sure to create an access token. You can find a step-by-step guide in the section Authorization.

GraphQL#

The AIRICA API uses GraphQL queries and mutations. It allows clients to define the structure of the data required, and the same structure of the data is returned from the server, therefore preventing excessively large amounts of data from being returned.

If you are unfamiliar with GraphQL we suggest that you familiarize yourself with "Introduction to GraphQL" at https://graphql.org/learn/.

Making your first request#

AIRICA uses HTTPS as client-server protocol. Any web framework or tool that can make web requests can use the AIRICA API. The following minimal request returns the name of the company.

Request#

Make sure to replace the placeholder <token> with the token you created through the airica application

curl --request POST \  --url https://app.airica.com/api/graphql \  --header 'Authorization: Bearer <token>' \  --header 'Accept: application/json' \  --header 'Content-Type: application/json' \  --data '{ "query": "{ client { name } }" }'

Response#

{   "data":{      "client":{         "name":"AIRICA AG"      }   }}

More examples#

You can find more advanced examples in the tutorials section.