Get Nearby Merchants for Ad
This endpoint for retrieving nearby merchant locations within a given radius of a given latitude and longitude for a specific ad.
1 | |
Input Parameters
| Path Param | Type | Required | Description |
|---|---|---|---|
| token | string | Required | The security token for the customer |
| adId | long | Required | The ID of the ad for which we are retrieving locations |
| latitude | float | Required | Latitude of customer location. Valid values are from -85.05112878 to 85.05112878 degrees (Redis GeoAdd limits) |
| longitude | float | Required | Longitude of customer location. Valid values are from -180 to 180 degrees |
| radiusInMeters | int | Required | Distance in meters from center point to search. Default maximum value: 50,000. This value can be changed via the portal configuration |
| Query Param | Type | Required | Description |
|---|---|---|---|
| channelId | int | Required | Value from Channel list |
| locationId | int | Required | Value from Location list |
| maxMerchantLimit | int | Required | The maximum number of merchant store locations to return |
Output
This endpoint returns a JSON object with an array of MerchantLocations:
| JSON Prop | Type | Description |
|---|---|---|
| merchantLocations | MerchantLocation | An array of merchant locations |
Example
Request
1 | |
Response
1 2 3 4 5 | |
Info
This endpoint will only return merchant locations for ads which are paired with the given customer.