Skip to main content
POST
/
order
/
validate_address
Delivery address validation
curl --request POST \
  --url https://app.xmenu.it/api/order/validate_address \
  --header 'Content-Type: application/json' \
  --header 'X-Client-Id: <api-key>' \
  --header 'X-Client-Secret: <api-key>' \
  --data '
{
  "address": "<string>",
  "street": "<string>",
  "number": "<string>",
  "city": "<string>",
  "province": "<string>",
  "zip": "<string>",
  "country": "<string>",
  "language": "<string>"
}
'
{
"success": true,
"error": "<string>",
"message": "<string>",
"data": {
"address": {
"place_id": "<string>",
"street": "<string>",
"number": "<string>",
"city": "<string>",
"province": "<string>",
"zip": "<string>",
"country": "<string>",
"lat": 123,
"lng": 123
},
"subrestaurant_uid": "<string>",
"kms": 123,
"delivery_fee": 123
}
}
write:orders

Authorizations

X-Client-Id
string
header
required

Client ID for API Client authentication (must be used together with Client Secret)

X-Client-Secret
string
header
required

Client Secret for API Client authentication (must be used together with Client ID)

Body

application/json

The address can be provided in two alternative ways:

  • Mode 1: address field with complete address as a single string
  • Mode 2: separate fields (street, number, city, province, zip, country)

You must provide the address using one of the two modes.

address
string

[Mode 1] Complete address as a single string (alternative to separate fields)

street
string

[Mode 2] Street/avenue name

number
string

[Mode 2] Civic number

city
string

[Mode 2] Municipality

province
string

[Mode 2] Province code

zip
string

[Mode 2] Postal code

country
string

[Mode 2] Country code (e.g., IT)

language
string

ISO 639-1 language code; defaults to restaurant settings

Response

Address validation response

success
boolean
required

Operation result: true if successful, false if failed

error
string

Error code if the operation failed. Possible values:

  • INVALID_ADDRESS = invalid, incomplete or not found address
  • ADDRESS_NOT_SERVED = address outside service zone
  • DELIVERY_NOT_AVAILABLE = delivery service unavailable

See Error codes for general error codes that may occur.

message
string

Human-readable error description if the operation failed

data
object

Validated address data (present only if success = true)