From the Integration to 1o

The 1o GraphQL API is available at https://playground.1o.io/graphql.

Authentication

In order to access non-public resources, requests must be authenticated using PASETO tokens.

When generating a token you must satisfy the following requirements:

To generate your first token, follow this guide:

A token generated as described above must be passed as a bearer token in the Authorization HTTP header when making the request:

Authorization: Bearer YOUR_GENERATED_TOKEN

When the header is correctly set you should be allowed to make authenticated GraphQL requests. Here is an example request to access an order (select the fields that you actually need):

query Example {
  order(id: "008aef35-d31b-4340-a0ee-b25a3718a672") {
    id
    lineItems {
      id
      product {
        id
        title
        price
      }
    }
  }

See also

Example: generating a PASETO token

1o ⇢ Merchant