POST
/
locations
/
Create a location
curl --request POST \
  --url https://sandbox.prezio.eu/api/locations/ \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "country": "NO",
  "city": "Oslo",
  "address1": "Karl Johans gate 1",
  "postal_code": "0159",
  "latitude": 59.91,
  "longitude": 10.75,
  "external_id": "office_oslo"
}'
{
  "country": "NO",
  "city": "Oslo",
  "address1": "Karl Johans gate 1",
  "postal_code": "0159",
  "latitude": 59.91,
  "longitude": 10.75,
  "external_id": "office_oslo"
}

Authorizations

Authorization
string
header
required

Token-based authentication with required prefix "Token"

Body

Serializer for Location model.

A location must include coordinates (both latitude AND longitude). Address information (city/postal_code and optional address1/address2) is optional but address1/address2 cannot be used alone without city or postal_code.

country
string
required

Country code (e.g., 'NO', 'SE', 'DK')

latitude
number
required

Latitude coordinate (required; must be provided with longitude)

longitude
number
required

Longitude coordinate (required; must be provided with latitude)

city
string

City name

Maximum length: 255
address_display
string
Maximum length: 255
address1
string

Primary address line (must be combined with city or postal_code)

Maximum length: 255
address2
string

Secondary address line (must be combined with city or postal_code)

Maximum length: 255
postal_code
string

Postal/ZIP code

Maximum length: 20
external_id
string | null
Maximum length: 100

Response

201 - application/json

Serializer for Location model.

A location must include coordinates (both latitude AND longitude). Address information (city/postal_code and optional address1/address2) is optional but address1/address2 cannot be used alone without city or postal_code.

id
string<uuid>
required

Location ID in standard UUID format

country
string
required

Country code (e.g., 'NO', 'SE', 'DK')

latitude
number
required

Latitude coordinate (required; must be provided with longitude)

longitude
number
required

Longitude coordinate (required; must be provided with latitude)

timezone
string
required

Timezone automatically assigned based on the country's default timezone (e.g., 'Europe/Copenhagen')

created_at
string<date-time>
required
updated_at
string<date-time>
required
city
string

City name

Maximum length: 255
address_display
string
Maximum length: 255
address1
string

Primary address line (must be combined with city or postal_code)

Maximum length: 255
address2
string

Secondary address line (must be combined with city or postal_code)

Maximum length: 255
postal_code
string

Postal/ZIP code

Maximum length: 20
external_id
string | null
Maximum length: 100