Getting Started

This guide will walk you through the basic steps to be able to run and acces the Operations API. For a more detailed guide, please refer to:

  1. Github repository for the project

  2. Toast POS API

  3. Google Cloud Platform

Prerequisites

List of other technologies used in the project:

Github Repository Access

The Github repository is hosted at the url embededded here: GitHub. The project is private and you will not be able to view it until you have access due to privacy concerns.

To request access, please send a message on Github to the repository owner.

Note

It is necessary to have access to the repository in order to view the code and documentation.

Once you have access, follow the steps explained here to get started: Github

Toast API Credentials

You will need to get the following credentials from Toast once you have access to RSBBQ’s Toast account. All of which can be found once you are able to login to Toast’s web portal.

Toast->Integrations->API Access->Manage credentials->Create new credentials->Standard API

Note

If the option to generate your own credentials is not available, you will need to request them from the Toast Account Manager.

  • CLIENT_ID

  • CLIENT_SECRET

  • TOAST_ACCESS_TOKEN

Once you have the credentials, you can add them to the .env file in the root of the project. If you clone the repository the .env file will not be present. You must manually create the file and add the credentials. An example .env file will be provided as the naming convention of the variables must match across all services. Save the credentials is a .json file that you can access for reference later in this format:

{
    "CLIENT_ID": "your-client-id",
    "CLIENT_SECRET": "your-client-secret",
    "TOAST_ACCESS_TOKEN": "your-access-token"
}

To ensure the credentials are working, you can run the following curl command via terminal:

curl -X POST -H "Content-Type: application/json" -d @file-containing-credentials.json https://[toast-api-hostname]/authentication/v1/authentication/login

The response should be a JSON object with a Bearer token:

{
    "tokenType": "Bearer",
    "accessToken": "your-access-token",
}

Note

Response may include additional fields not shown here.

If you get a 401 Unauthorized error, it means the credentials are incorrect. If you get a 200 OK response, you can use the accessToken in the response to make requests to the Toast API. You won’t need the accessToken that is generated by this request as the api will handle the authentication for you, it just requires the CLIENT_ID and CLIENT_SECRET.

Quick references to the API endpoints listed for TOAST API: Code Examples

Google Cloud Platform

Warning

Ensure to download Google Cloud SDK to your local machine. Google Cloud SDK

To get started with Google Cloud Platform, you will first need your .rsbbqinc.com email to be added to the project. This can be done by sending a message to the project owner.

Name

Email

Role

Project(s)

Contributor(s)

Chavez, Michael

michael.chavez@rsbbqinc.com

Project Owner

stock-checker, eod-email, daily-sales, annual-sales, docs

Huerta, David

david.huerta@rsbbqinc.com

Project Owner

RSBBQ-Data

Chavez, Michael