Locations
PUT Upsert Location /locations/upsert
Update an exisitng location if the id the provided exists already, otherwise creates a new location.
Response
| Name | Value | Description | Required |
|---|---|---|---|
id | string | Unique Id | true |
name | string | Location Name | true |
timezone | string | Timezone (moment-timezones) | false |
minimumWage | number | Minimum wage in dollars | false |
address | string | Physical Address of the Location | false |
locationEmail | string | Email Associated with Location | false |
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 newLocation = {
"id": "generated-id",
"name": "Fresno",
"timezone": "America/Los_Angeles",
"address": "123 West Ave, Fresno CA 93705, USA",
"minimumWage": 16,
"locationEmail": "fresno@test.com"
}
const rootUrl = "https://us-central1-checklist-admin-d0013.cloudfunctions.net/api/v1";
const request = axios(rootUrl+`/locations/upsert`, { headers, data: newLocation });
Body Response JSON
{
"id": "generated-id",
"timezone": "America/Los_Angeles",
"name": "San Francisco",
"minimumWage": 18,
"address": "123 Street Ave, San Francisco CA 12345, USA",
"locationEmail": "sf@example.com",
}