Restaurants
PUT Upsert Restaurant /restaurants/upsert
Update an exisitng restaurant if the id the provided exists already, otherwise creates a new restaurant.
Response
| Name | Value | Description | Required |
|---|---|---|---|
id | string | Unique Id | true |
name | string | Restaurant Name | true |
Authorization Bearer Token
Token API_Key
Headers
Content-Type application/json
Example
import axios from "axios";
const headers = {
"Authorization": `Bearer ${your_api_key}`,
"Content-Type": "application/json"
};
const newRestaurant = {
"id": "generated-id",
"name": "Fresno Wings & Fries",
}
const rootUrl = "https://us-central1-checklist-admin-d0013.cloudfunctions.net/api/v1";
const request = axios(rootUrl+`/restaurants/upsert`, { headers, data: newRestaurant });
Body Response JSON
{
"id": "generated-id",
"name": "Fresno Wings & Fries",
}