Skip to main content
This guide gets the two latest sales orders from your space. Before you start, read the GraphQL API introduction.
1

Create an API token

In your Bonx workspace, go to Settings → API tokens and create a token. See Authentication if necessary.The same token works with the REST and GraphQL APIs.
2

Save the URL and token

The GraphQL URL for your space is provided with the token.
3

Send the request

Select the example for your environment.
The response contains the id, name, and stockAvailability fields for each matching order.
A GraphQL request can return HTTP status 200 with an errors array. Always check errors before you use data.

Next step

Read data

Learn how to filter, sort, and paginate results.

Attach a document

Upload a file and attach it to a record.