Public API

Using GraphQL

5min

Heads up! The remainder of this guide assumes that your team is familiar with the use of API Clients, and are able to set up a connection via a client of your choice.

All requests must be made to our public GraphQL endpoint at https://api.ezcater.com/graphql via HTTP POST with an ‘Authorization’ header using the generated token as its value.

If you have never used GraphQL before, there is a lot of good information and examples to be found at https://graphql.org/learn

GraphQL leverages a pattern called introspection, which allows you to query the endpoint for information about the schema and structures you can request. Tools like GraphQL will handle this automatically, providing an easy-to-navigate documentation that you can use to see what queries are available, what fields you can ask for and what the return values will look like.



Building a Request

Make a POST request with your Query body to https:/api.ezcater.com/graphql, using the following headers:

  • Content-Type: application/json
  • Authorization: <Your API Token>
  • Apollographql-client-name: <Your Organization Name/Identifier>
  • Apollographql-client-version: <Your Software Version>

In order for ezCater to properly track and troubleshoot requests to our API, all requests must be named. A collection of our naming convenstions for each query can be found at the bottom of this document.

Template Query

GraphQL


Query Examples

menusByCaterer
__schema
__type


Once you have your API Token and have connected to our endpoint via an API Client, you can begin setting up your integration with the Public API.