Get Instacart account information
GET /v2/fulfillment/users/{user_id}/link
Retrieves information about the Instacart account that is linked to the specified Connect user account. The response contains the status of the Instacart+ membership. If true, the response also reports the expiration date of the membership.
Security
Name | In | Description |
---|---|---|
Authorization | header | The Authorization header with the bearer token acquired during authentication. |
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
user_id | path | string | The ID of the user. |
Request
None.Request examples
- cURL
- Java
- Python
- Go
curl --request GET \
--url 'https://connect.instacart.com/v2/fulfillment/users/{user_id}/link' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <token>'
HttpResponse<String> response = Unirest.get("https://connect.instacart.com/v2/fulfillment/users/{user_id}/link")
.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", "/v2/fulfillment/users/{user_id}/link", 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/v2/fulfillment/users/{user_id}/link"
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 |
---|---|---|---|
express_member | boolean | Deprecated. Use 'instacartplus_member' instead. | |
instacartplus_member | boolean | Indicates whether the linked user is an Instacart+ member. | |
expired_at | string | The time of expiration of current Instacart+ subscription, if exists. |
Response examples
200 Success
200
User link returned
{
"express_member": true,
"instacartplus_member": true,
"expired_at": "2021-06-30T04:00:00Z"
}
4XX Errors
Error responses return either a single error or multiple errors.
HTTP Code | Cause | Error Message | Error Code | Error Meta |
---|---|---|---|---|
400 | User not found | "User Not Found" | 1001 | {"key":"user_id"} |
400 | User not linked | "User Not Linked" | 1001 | {"key":"user_id"} |
403 | User not active | "User Not Active" | null | Not applicable |