/locations:
name- Location name (max 30 characters)latitude- Geographical latitude (-90 to 90)longitude- Geographical longitude (-180 to 180)address- Postal address (max 300 characters)country- ISO 3166-1 alpha-2 country code (e.g. “US”, “CA”)
languages- Languages available at this location (see below). Defaults to["en"]if omitted.inputFields- Custom input fields for the location (see below). If omitted, three default fields are created (first name, last name, phone number).openingHours- Opening hours configuration (see below). If omitted, the location defaults to 24/7 (00:00-23:59 every day).
Languages
You can configure which languages are available at a location by providing an array of ISO 639 / BCP 47 language codes:- The list must include
"en"(English) - No duplicate codes allowed
- All codes must be supported (e.g.
en,et,fr,de,zh,zh-TW,fr-CA,pt-PT) - Order is preserved — the first language is the primary display language
- If omitted, defaults to
["en"]
Input Fields
You can specify custom input fields to create with the location by providing aninputFields array. If omitted, three default fields are created: first name, last name, and phone number.
Each field uses the same schema as the standalone Creating an Input Field endpoint, with these differences:
location— must not be provided (automatically set to the created location)visibleForLines— must be omitted or empty (lines don’t exist yet at creation time)id— required (client-generated UUID)
- Must include at least one
FIRST_NAMEand oneLAST_NAMEfield - Maximum 50 fields
FIRST_NAME,LAST_NAME,EMAIL, andPHONE_NUMBERare singleton types (only one of each allowed)FIRST_NAMEandLAST_NAMEcannot haveisMandatoryBeforeAddedorisMandatoryBeforeServedset totrue- All field and option IDs must be unique within the request and globally
- If fields include translations, the referenced language codes must be declared in the
languagesfield
Opening Hours
You can set regular weekly hours and date-specific exceptions:regular can have either:
businessHours- An array of time ranges withopensandcloses(each withhours0-23 andminutes0-59)closed: true- The location is closed that day
exceptions requires a date (ISO 8601 format) and can include:
closedand optionalclosedReason- Mark the date as closedbusinessHours- Custom hours for that specific date
Error Responses
| Status | Description | Example |
|---|---|---|
| 400 | Name is blank | {"code": "parameter_invalid_blank", "message": "...", "param": "name"} |
| 400 | Name too long (>30 chars) | {"code": "parameter_invalid_size", "message": "...", "param": "name"} |
| 400 | Invalid coordinates | {"code": "parameter_too_large", "message": "...", "param": "latitude"} |
| 400 | Invalid country code | {"code": "parameter_invalid_country_code", "message": "...", "param": "country"} |
| 400 | Invalid opening hours | {"code": "parameter_invalid", "message": "...", "param": "openingHours"} |
| 400 | Languages missing “en” | {"code": "parameter_invalid", "message": "languages must include 'en'", "param": "languages"} |
| 400 | Duplicate language codes | {"code": "parameter_invalid", "message": "languages must not contain duplicates", "param": "languages"} |
| 400 | Unsupported language code | {"code": "language_code_not_supported", "message": "Language with the code 'xx' is not supported."} |
| 400 | Invalid input field | {"code": "parameter_invalid", "message": "...", "param": "inputFields"} |
| 400 | Missing FIRST_NAME or LAST_NAME | {"code": "parameter_invalid", "message": "...", "param": "inputFields"} |
| 400 | More than 50 input fields | {"code": "parameter_invalid", "message": "...", "param": "inputFields"} |
| 400 | Duplicate field or option IDs | {"code": "duplicate_items_in_request", "message": "..."} |
| 400 | Duplicate singleton type | {"code": "input_field_duplicate", "message": "..."} |
| 400 | Translation language not in languages | {"code": "parameter_invalid", "message": "...", "param": "inputFields"} |
| 409 | Field or option ID already exists | {"code": "input_field_duplicate", "message": "..."} |