Skip to main content

Restaurants

DELETE Delete Restaurant /restaurants/delete

Deletes a restaurant. *NOTE that deleting a restaurant will not cascade accross all other resources that use the restaurant, be careful when deleting restaurants.

Request Body

NameValueDescriptionRequired
idstringId of Restaurant to deletetrue

Response

NameValueDescription
idstringId of Restaurant Deleted
successbooleanResult of operation

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 restaurantId = "restaurant-id";

const data = {
id: restaurantId
};

const rootUrl = "https://us-central1-checklist-admin-d0013.cloudfunctions.net/api/v1";

const request = axios(rootUrl+`/restaurants/delete`, { headers, data });

Body Response JSON

{
"id": "restaurant-id",
"success": true
}