Skip to main content
POST
/
v1
/
location
Create a location
curl --request POST \
  --url https://app.variable.global/api/v1/location \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Tokyo factory",
  "type": "factory",
  "address1": "<string>",
  "address2": "<string>",
  "postCode": "<string>",
  "city": "<string>",
  "state": "<string>",
  "country": "<string>",
  "geoLocation": {
    "uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  }
}
'
{
  "uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "Tokyo factory",
  "type": "factory",
  "owner": {
    "uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "name": "Name"
  },
  "address1": "1-1 Marunouchi",
  "address2": "<string>",
  "postCode": "100-0005",
  "city": "Tokyo",
  "state": "<string>",
  "country": "Japan",
  "geoLocation": {
    "uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "googleMapsId": "ChIJA4UGSG_xNIgRNBuiWqEV-Y0",
    "name": "Syracuse, NY, USA",
    "countryCode": "US",
    "latitude": 43.0481,
    "longitude": -76.1474,
    "locationType": "APPROXIMATE"
  }
}
Requires permission:

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
name
string
required
Example:

"Tokyo factory"

type
enum<string>
Available options:
factory,
warehouse,
office,
port,
other
Example:

"factory"

address1
string
address2
string
postCode
string
city
string
state
string
country
string
ownerCompany
object

The company to own the site. Defaults to your own company; may instead reference an unclaimed supplier of yours. Returns 400 if the company is not accessible. Set at create only — it cannot be changed afterwards.

geoLocation
object

A reference to the geolocation that anchors a site. Provide either an existing point's uuid, or a googleMapsId (resolved and persisted on your behalf, like POST /v1/geolocation).

Response

The created location

A named company site (factory / warehouse / office / port / other), optionally anchored to a geolocation for coordinates. Products, activities, and transport legs reference these internally as a physical origin / destination / location.

uuid
string<uuid>
name
string
Example:

"Tokyo factory"

type
enum<string>
Available options:
factory,
warehouse,
office,
port,
other
Example:

"factory"

owner
object

The company that owns the site — your own company, or an unclaimed supplier you registered it for.

address1
string
Example:

"1-1 Marunouchi"

address2
string
postCode
string
Example:

"100-0005"

city
string
Example:

"Tokyo"

state
string
country
string
Example:

"Japan"

geoLocation
object