POST Autocomplete address
Endpoint will return addresses for the given input
Headers
- Type: stringAcceptrequired
Accept header
- Type: stringAuthorizationrequired
Authorization header
- Type: stringContent
- Type requiredContent-Type header
- Type: stringA
P I - V E R S I O N requiredAPI version
- Type: stringApplicationrequired
Application key
- Type: stringX
- Request - I D requiredUnique request identifier
- enumX
- Q B - Enabled requiredHeader which if sent with value 'true' will allow usage of the query building feature in response (through the request's query params). It is mandatory for this part of the documentation.
values- true
- false
Body
application/json
- Type: array string[]country
_codes array of Alpha-2 country codes
- Type: objectcustomer
_location - Type: stringinput
- Type: integertype
type of return suggestions - 0 = just addresses, 1 = all
Responses
- application/json
- 400
Bad Request
- 403
Forbidden
- 404
Not Found
Request Example for post/autocomplete-addresses
curl https://api-public-demo.menu.app/api/autocomplete-addresses \
--request POST \
--header 'Accept: application/json' \
--header 'Authorization: ' \
--header 'Content-Type: application/json' \
--header 'API-VERSION: ' \
--header 'Application: ' \
--header 'X-Request-ID: c10b4a70-6274-490d-80a0-03e7bb826937 ' \
--header 'X-QB-Enabled: true' \
--data '{
"input": "Železnička 7",
"type": 1,
"customer_location": {
"latitude": 45.2510104,
"longitude": 19.8418477
},
"country_codes": [
"RS"
]
}'
{
"status": "OK",
"code": 200,
"data": {
"location_provider": "Google",
"addresses": [
{
"address": {
"id": "EiDFvWVsZXpuacSNa2EgNywgTm92aSBTYWQsIFNlcmJpYSIwEi4KFAoSCatBwFFqEFtHEcRpThrOPNSTEAcqFAoSCWc21OVqEFtHEchPMI1N7qgV",
"street_name": "Železnička",
"street_number": 7,
"locality": "string",
"place": "Novi Sad",
"administrative_area": "Vojvodina",
"administrative_area_short": "Vojvodina",
"country": "Serbia",
"country_short": "RS",
"longitude": 19.8418477,
"latitude": 45.2510104,
"postcode": 21000,
"formatted_address": "Železnička 7",
"is_custom": true,
"is_number_first": true
}
}
]
}
}