latestSwagger 2.02026-08-172560124.6 KB

6863a5956792

merchants

Allows to get a merchant by id and find similar merchants

This endpoint allows to receive detailed information for a particular merchant in the system and for restaurants that are similar to this one. A merchant is similar if all the following conditions are met:

  1. Location: the recommended merchants are within 30 km radius from the main merchant
  2. The similar merchants are bookable online
  3. The similar merchants have the main cuisine in common

This merchant should be specified by their identifier merchantId, which is mandatory. The endpoint can take optional request header Accept-Language. This header is used to determine correct locale and has an effect on translation of merchant's entity fields, that may be omitted.

The expected value of the header Accept-Language should contain language and can contain country, e.g. "de_DE" or "de". Locale by default is "en_GB".

The endpoint returns status HTTP 200 if the request is successful. In a successful requests the specified merchant was found.

If the merchant has no products allowed for a web search, i.e. is not bookable, response data with HTTP 200 is returned, but the field merchant is not set. Instead, the merchant search message is set.

The endpoint will return status HTTP 404 if the merchant, specified by identifier, was not found.

Example curl:

curl  -H 'X-Quandoo-AuthToken: {INSERT_KEY_HERE}' -H 'Accept-Language: de_DE' 'https://{host}/v{X}/merchants/11/similar'

Example responses: merchant bookable

{
    "merchant": {
        "id":11,
        "name":"Test merchant",
        "phoneNumber":"+27113901837",
        "currency":"ZAR",
        "locale":"en_ZA",
        "timezone":"Africa/Johannesburg",
        "location":{
            "coordinates":{
                "latitude":33.9,
                "longitude":18.4
            },
            "address":{
                "street":"Tamerlan street",
                "number":"6A",
                "zipcode":"10787",
                "city":"Cape Town",
                "country":"ZAF"
            }
        },
        "reviewScore": "5.3",
        "tagGroups":[
            {
                "type":"CUISINE",
                "tags":[
                    {
                        "id":25,
                        "name":"Testküche Hauptkategorie"
                    },
                    {
                        "id":28,
                        "name":"Test cuisine"
                    }
                ]
            }
        ],
        "images":[
            {
                "url":"https://dci5ez2ey8tr9.cloudfront.net/8e4d1063-9171-40b1-94b7-5e9337591a90/7_sld.jpg"
            }
        ],
        "documents":[],
        "links":[
            {
                "href":"https://{host}/{path}?aid=16",
                "method":"GET",
                "rel":"DETAILS"
            },
            {
                "href":"https://{host}/{path}?aid=16&countryId=NLD",
                "method":"GET",
                "rel":"WIDGET"
            },
            {
                "href":"https://{host}/{path}/details?aid=16&countryId=NLD",
                "method":"GET",
                "rel":"WIDGET_DETAILS"
            }
        ],
        "bookable": true,
        "openingTimes": {
          "standardOpeningTimes": {
            "SATURDAY": [
              {
                "start": "09:00:00",
                "end": "20:00:00"
              }
            ],
            "SUNDAY": [
              {
                "start": "09:00:00",
                "end": "18:00:00"
              }
            ]
          }
        },
        "ccvEnabled": true,
        "chain": {
           "id": 1,
           "name": "Test chain"
        }
    },
   "recommendedMerchants": {
        "merchants": [
            {
                "id":12,
                "name":"similar merchant",
                "phoneNumber":"+27113901838",
                "currency":"ZAR",
                "locale":"en_ZA",
                "timezone":"Africa/Johannesburg",
                "location":{
                    "coordinates":{
                        "latitude":33.8,
                        "longitude":18.4
                    },
                    "address":{
                        "street":"Tamerlan street",
                        "number":"5A",
                        "zipcode":"10787",
                        "city":"Cape Town",
                        "country":"ZAF"
                    }
                },
                "reviewScore": "5.3",
                "tagGroups":[
                    {
                        "type":"CUISINE",
                        "tags":[
                            {
                                "id":25,
                                "name":"Testküche Hauptkategorie"
                            },
                            {
                                "id":28,
                                "name":"Test cuisine"
                            }
                        ]
                    }
                ],
                "images":[
                    {
                        "url":"https://dci5ez2ey8tr9.cloudfront.net/8e4d1063-9171-40b1-94b7-5e9337591a90/7_sld.jpg"
                    }
                ],
                "documents":[],
                "links":[
                    {
                        "href":"https://{host}/{path}?aid=16",
                        "method":"GET",
                        "rel":"DETAILS"
                    },
                    {
                        "href":"https://{host}/{path}?aid=16&countryId=NLD",
                        "method":"GET",
                        "rel":"WIDGET"
                    },
                    {
                        "href":"https://{host}/{path}/details?aid=16&countryId=NLD",
                        "method":"GET",
                        "rel":"WIDGET_DETAILS"
                    }
                ],
                "bookable": true,
                "openingTimes": {
                  "standardOpeningTimes": {
                    "SATURDAY": [
                      {
                        "start": "09:00:00",
                        "end": "20:00:00"
                      }
                    ],
                    "SUNDAY": [
                      {
                        "start": "09:00:00",
                        "end": "18:00:00"
                      }
                    ]
                  }
                },
                "ccvEnabled": true,
                "chain": {
                   "id": 1,
                   "name": "Test chain"
                }
            }
        ],
        "size": 1,
        "offset": 0,
        "limit": 10
    }
}

merchant not bookable

{
    "merchantSearchMessage": "MERCHANT_NOT_BOOKABLE",
    "recommendedMerchants": {
        "limit": 10,
        "merchants": [...],
        "offset": 0,
        "size": 0
    }
}
get/v1/merchants/{merchantId}/similar

Path parameters

merchantIdinteger required

merchantId

Query parameters

sort'CLOSEST'

Sort order. Default sorting will be by proximity.

limitinteger

Max number of merchant recommendations to return.

Headers

Accept-Languagestring

Locale.<br>Format:<br><language code>[_<country code>]

Response

OK

merchantSearchMessage'MERCHANT_NOT_BOOKABLE' required

Additional information about the search result: MERCHANT_NOT_BOOKABLE if the merchant exists but is not bookable