Skip to main content

Create a user and validate an address

POST /v2/fulfillment/lastmile/validate_address

Creates a Connect user account and validates the address provided in the request. The user ID is generated by your site and can be any unique identifier, such as a login name, loyalty ID, or email address. For more information about users, see create a user.

If a user account with the given user_id already exists, the address is validated and associated with the existing user. The response contains the existing user's ID and the validated street address and postal code.

When you create an order with this user_id, ensure that you use the validated address.

tip

Alternatively, you can create a user and validate an address as separate calls.

Security#

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

Parameters#

Request#

FieldTypeRequiredDescription
address_line_1stringโœ…The first address line.
address_line_2stringThe second address line.
address_typestringThe type of address, e.g., "residential".
postal_codestringโœ…The postal/zip code of the address.
user_idstringโœ…Unique user ID to use for this user.

Request Examples#

curl --request POST \  --url https://connect.instacart.com/v2/fulfillment/lastmile/validate_address \  --header 'Accept: application/json' \  --header 'Authorization: Bearer <token>' \  --header 'Content-Type: application/json' \  --data '{  "address_line_1": "string",  "address_line_2": "string",  "address_type": "string",  "postal_code": "string",  "user_id": "string"}'

Response#

FieldTypeRequiredDescription
addressAddressThe address used for validation.
user_idstringThe ID of the user.

Address Object#

FieldTypeRequiredDescription
address_line_1stringโœ…The first address line.
postal_codestringโœ…The postal/zip code of the address.

Response Examples#

{  "address": {    "address_line_1": "499 Gainsville",    "postal_code": "81910"  },  "user_id": "roberteospeedwagon"}