Crystallize
Menu

Order API

The Order API provides a way to query and create orders via GraphQL.

Using the API

The Order API is accessible on a per-tenant basis as a POST to https://api.crystallize.com/teddy-bear-shop/orders but requires authentication via Crystallize Access Tokens in order to use it.

cURL Example

Below is an example of how you can fetch an order by ID through cURL. Replace the Crystallize token id and secret with your own Crystallize Access Token, replace "teddy-bear-shop" with your own tenant identifier, and add in the ID of the order you want to retrieve.

Fetching snippet...

GraphQL Playground

The GraphQL Playground is an interactive UI where you can build and test queries and mutations you want to send to the Order API. You can access the GraphQL Playground by opening the API URL in your web browser. For our Teddy Bear Shop example, this would be https://api.crystallize.com/teddy-bear-shop/orders. You can replace the "teddy-bear-shop" identifier with your own tenant identifier.

The image below shows how you can easily write your GraphQL query in the Playground. Clicking on the play button in the middle of the screen allows you to see the the structure of the response.

Opening the "Docs" sidebar on the right hand side gives an overview of all the available queries within the Order API, the arguments you can provide them, and the structure of the returned data. You can refer to this section sidebar for an up-to-date reference of all the data fields and types belonging to an object.

Slack Community

Need further help?

Join and ask our
slack community.

Join our slack community

Looks interesting?

Create a free tier account or contact us if you have any questions.

Team up with Crystallize