Skip to content

Create a Location

POST
/businesses/{businessId}/locations
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.

businessId
required
string format: uuid

Business ID

Media typeapplication/json
Location Create Input
object
name
required

Name of the location.

string
description

Description of the location.

string
instructions

Instructions for the location.

string
address

Address of the location.

string
lat

Latitude of the location.

number format: float
lng

Longitude of the location.

number format: float
timezone

Timezone of the location.

string
phone

Phone number for the location.

string

Example

+15555555555
pictureId

ID of the picture uploaded via file upload API.

string
email

Email address for the location.

string format: email

The created location.

Media typeapplication/json
object
data
Location

A physical or virtual location where services can be provided

object
id
required

Unique identifier across the platform.

string format: uuid
name
required

The name of the location

string
description

A description of the location

string
nullable
instructions

Instructions for finding or accessing the location

string
nullable
address

The physical address of the location

string
nullable
lat

Latitude of the location

number format: float
nullable
lng

Longitude of the location

number format: float
nullable
timezone

The timezone of the location

string
phone

Phone number of the location

string
nullable
email

Email address of the location

string format: email
nullable
pictureUrl

URL of the location’s picture

string format: uri
nullable
services

Services offered at the location

Array<object>
object
id

Unique identifier across the platform.

string format: uuid
name

Name of the service

string
createdAt

Timestamp of when the location was created

string format: date-time
updatedAt

Timestamp of when the location was last updated

string format: date-time

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.

Media typeapplication/json
object
error
object
code
number
type

The specific error that occurred.

string
Allowed values: BadRequestError
title

Human-readable description of the error.

string

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.

Media typeapplication/json
object
error
object
code
number
type

The specific error that occurred.

string
Allowed values: UnauthorizedError BusinessArchivedError BusinessDisabledError
title

Human-readable description of the error.

string

Example

{
"error": {
"code": 403,
"type": "UnauthorizedError",
"title": "Invalid API token"
}
}

The Business does not exist.

Media typeapplication/json
object
error
object
code
number
type

The specific error that occurred.

string
Allowed values: NotFoundError BusinessNotFoundError
title

Human-readable description of the error.

string

Example

{
"error": {
"code": 404,
"type": "BusinessNotFoundError",
"title": "Business not found"
}
}