Get nearby retailers
GET /idp/v1/retailers
Get a list of nearby retailers based on the specified postal code and country code.
Authorization
Name | In | Description |
---|---|---|
Authorization | header | The Authorization header with the bearer token acquired during authentication. |
URL parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
postal_code | query | string | ![]() | The US postal code. Used to find retailers in the vicinity of the postal code. |
Request body
None.Request examples
- cURL
- Java
- Python
- Go
curl --request GET \
--url 'https://connect.instacart.com/idp/v1/retailers?postal_code=string' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <token>'
HttpResponse<String> response = Unirest.get("https://connect.instacart.com/idp/v1/retailers?postal_code=string")
.header("Accept", "application/json")
.header("Authorization", "Bearer <token>")
.asString();
import http.client
conn = http.client.HTTPSConnection("connect.instacart.com")
headers = {
'Accept': "application/json",
'Authorization': "Bearer <token>"
}
conn.request("GET", "/idp/v1/retailers?postal_code=string", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://connect.instacart.com/idp/v1/retailers?postal_code=string"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
Response
Field | Type | Required | Description |
---|---|---|---|
retailers | Array(Retailer) | ![]() | The returned nearby retailers. |
Retailer Object
Field | Type | Required | Description |
---|---|---|---|
id | integer | ![]() | The unique identifier that represents a retailer as a whole organization, rather than individual stores or locations. |
name | string | ![]() | The retailer name. |
retailer_logo_url | string | ![]() | The retailer logo URL. |
Response examples
200 Success
200
Get nearby retailers successfully with valid postal_code
{
"retailers": [
{
"id": 123,
"name": "Test Retailer",
"retailer_logo_url": "www.logoUrl.com"
}
]
}