Public API
Overview
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 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 we recommend using a tool like graphiql for viewing all the fields that can be queried from the public api this section will give a brief overview of our top level queries template query query \<nameofquery> { menus { nodes { id name startdate enddate } } } query examples menusbycaterer query menusbycaterer { menus { nodes { id name startdate enddate } } } schema query fullschema { schema { types { name kind description fields { name } } } } type query { type(name "menu" ) { name kind description fields { name } } } 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