Skip to main content

Link an Instacart account

POST /v2/fulfillment/users/{user_id}/link

Links a customer's Connect user account to their Instacart account. Requires a valid linking token. After the accounts are linked, you can get Instacart account information.

Security

NameInDescription
AuthorizationheaderThe Authorization header with the bearer token acquired during authentication.

Parameters

NameInTypeRequiredDescription
user_idpathstringRequiredThe ID of the user.

Request

FieldTypeRequiredDescription
linking_tokenstringRequiredThe linking token.

Request examples

curl --request POST \
--url 'https://connect.instacart.com/v2/fulfillment/users/{user_id}/link' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"linking_token": "string"
}'

Response

FieldTypeRequiredDescription
successbooleanRequiredWhether the request was successful.

Response examples

200 Success

{
"success": true
}

4XX Errors

Error responses return either a single error or multiple errors.

HTTP CodeCauseError MessageError CodeError Meta
400User not found"User Not Found"1001{"key":"user_id"}
400Invalid linking token"Linking token is invalid"1001{"key":"linking_token"}
400Without linking token"can't be blank"1001{"key":"linking_token"}
400Instacart User already linked"Validation failed: Common identities can only have one user per isolation context"1001{"key":"linking_token"}
403User not active"User Not Active"nullNot applicable