Create a Location
const url = 'https://api.upvio.com/v1/businesses/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/locations';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example","description":"example","instructions":"example","address":"example","lat":1,"lng":1,"timezone":"example","phone":"+15555555555","pictureId":"example","email":"[email protected]"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.upvio.com/v1/businesses/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/locations \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "description": "example", "instructions": "example", "address": "example", "lat": 1, "lng": 1, "timezone": "example", "phone": "+15555555555", "pictureId": "example", "email": "[email protected]" }'Create a new location for the business.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Business ID
Request Bodyrequired
Section titled “Request Bodyrequired”object
Name of the location.
Description of the location.
Instructions for the location.
Address of the location.
Latitude of the location.
Longitude of the location.
Timezone of the location.
Phone number for the location.
Example
+15555555555ID of the picture uploaded via file upload API.
Email address for the location.
Responses
Section titled “Responses”The created location.
object
A physical or virtual location where services can be provided
object
Unique identifier across the platform.
The name of the location
A description of the location
Instructions for finding or accessing the location
The physical address of the location
Latitude of the location
Longitude of the location
The timezone of the location
Phone number of the location
Email address of the location
URL of the location’s picture
Services offered at the location
object
Unique identifier across the platform.
Name of the service
Timestamp of when the location was created
Timestamp of when the location was last updated
Example
{ "data": { "name": "Downtown Office", "description": "Our main office in the city center", "instructions": "Enter through the main entrance and take the elevator to the 5th floor", "address": "123 Main St, New York, NY 10001", "timezone": "America/New_York" }}The location data is invalid. The title lists the validation issues as a JSON array.
object
object
The specific error that occurred.
Human-readable description of the error.
Example
{ "error": { "code": 400, "type": "BadRequestError", "title": "[\n {\n \"expected\": \"string\",\n \"code\": \"invalid_type\",\n \"path\": [\n \"name\"\n ],\n \"message\": \"Invalid input: expected string, received undefined\"\n }\n]" }}The API key is missing or invalid, or the Business cannot be accessed with it.
object
object
The specific error that occurred.
Human-readable description of the error.
Example
{ "error": { "code": 403, "type": "UnauthorizedError", "title": "Invalid API token" }}The Business does not exist.
object
object
The specific error that occurred.
Human-readable description of the error.
Example
{ "error": { "code": 404, "type": "BusinessNotFoundError", "title": "Business not found" }}