CAKE offers solutions for the entire dining experience. From mobile marketing and waitlist management to point of sale and payment processing, the CAKE restaurant management system helps you grow your business. CAKE developer portal allows you to try out our in-house APIs with just a few clicks. CAKE APIs are well documented with OpenAPI specifications which alleviate the integration effort for developers. In order to use any of the functionalities provided by the CAKE APIs, the first thing you need to do is to register and be logged in. For that, please go to the registration page and create a developer account in our portal.
Upon successful registration, you will receive API credentials via an email. These credentials are only allowed to invoke sandbox APIs. In order to consume CAKE API endpoints, it is necessary to identify how authentication works. The CAKE Platform Auth service is based on Oauth2 and for third-party integrations the “client credentials” grant type should be used. If you’re using swagger UI to invoke these APIs, fill in the client ID and client secret as shown below. This will authenticate the client internally and provide a bearer token to invoke the APIs.
The OAuth token endpoint given below should be called to get the bearer token which should be used to trigger the rest of the API endpoints.
``` --header 'Accept: application/json' ```
``` --header 'Authorization: Basic <Base64Encoded(clientid:secret)>' ```
``` --header 'Content-Type: application/x-www-form-urlencoded' ```
``` --data-urlencode 'grant_type=client_credentials' ```
<br/>
### Making a Request
<br/>
Once you have obtained the access token, you can invoke APIs using this access token as a bearer token. Following is a sample curl which shows how you can invoke Labour API.
``` curl --location --request GET 'https://sandbox-api.cake.net/labor/v1/accounts/123456/employees' ```
```--header 'X-Correlation-Id: 37a9e5e5-1234-4567-abf4-4avd4fd60abf8' ```
```--header 'X-Integrator-Id: <integrationId>' ```
```--header 'Authorization: Bearer <Access Token>'```
<br/>
### API Versioning
<br/>
APIs will evolve to bring new features and improvements to your application. The APIs are versioned to insulate your application from the changes while improving the APIs. The difference between each version will be listed in the API changelog. When an API is deprecated, it will be informed via [HTTP deprecation headers](https://tools.ietf.org/id/draft-dalal-deprecation-header-01.html).
The third-party integrations API can have multiple revisions deployed at a given time. In order to consume a specific version, the relevant version number should be used in the URI. For example, to consume version “v1”, the URI should include “v1” as shown in the following samples.
<br/>
2. https://<<host url>>/labor/v1/accounts/{accountId}/shifts
3. https://<<host url>>/sales/v1/accounts/{accountId}/sales
If you are willing to integrate CAKE APIs to build awesome applications, fill up the developer key request form and send it to us. Once the request is processed from our end, you will receive the production API credentials. Do you have questions for our sales team? Get in touch and we’ll be happy to help.