POST Autocomplete address

Endpoint will return addresses for the given input

Headers
  • Accept
    Type: string
    required

    Accept header

  • Authorization
    Type: string
    required

    Authorization header

  • Content-Type
    Type: string
    required

    Content-Type header

  • API-VERSION
    Type: string
    required

    API version

  • Application
    Type: string
    required

    Application key

  • X-Request-ID
    Type: string
    required

    Unique request identifier

  • X-QB-Enabled
    enum
    required

    Header 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
  • country_codes
    Type: array string[]

    array of Alpha-2 country codes

  • customer_location
    Type: object
  • input
    Type: string
  • type
    Type: integer

    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
        }
      }
    ]
  }
}