DEV

Zonos GraphQL API

Welcome to the Zonos GraphQL API reference documentation.

The API lets you build apps and integrations that extend and enhance your experience with Zonos. This page will help you get up and running with Zonos' GraphQL API.

Authentication

To access the Zonos GraphQL API, you will need an API token. The API token will be included in all API requests to the server with the header credentialToken.
YOUR CREDENTIAL TOKEN
1
credentialToken: credential_example_8978ca2a-e567-466a-91c2-f3276cc9aadc
cURL
1
2
3
4
5
curl -X POST \
https://api.zonos.com/graphql \
-H 'Content-Type: application/json' \
-H 'credentialToken: credential_example_8978ca2a-e567-466a-91c2-f3276cc9aadc' \
-d '{your_query}'

Queries

GraphQL queries are executed by sending HTTP requests to the endpoint:
posthttps://api.zonos.com/graphql
Queries begin with one of the objects listed under QueryRoot. The QueryRoot is the schema's entry-point for queries.Queries are equivalent to making a GET request in REST. The example shown is a query to get the id and description of the first 3 items.
cURL
1
2
3
4
5
6
7
curl -X POST \
https://api.zonos.com/graphql \
-H 'Content-Type: application/json' \
-H 'credentialToken: credential_example_8978ca2a-e567-466a-91c2-f3276cc9aadc' \
-d '{
    "query": "{ items(first: 3) { edges { node { id description } } } }"
  }'

Was this page helpful?