curl --request POST \
--url https://api.henrylabs.ai/v0/checkout/guest/addresses \
--header 'Content-Type: application/json' \
--header 'x-access-token: <api-key>' \
--header 'x-api-key: <api-key>' \
--data '
{
"fullName": "John Doe",
"email": "john.doe@example.com",
"phoneNumber": "+1234567890",
"addressLine1": "350 5th Ave",
"countryCode": "US",
"city": "New York",
"stateOrProvince": "New York",
"postalCode": "10001",
"addressLine2": "Apt 1",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"isDefault": true
}
'{
"fullName": "John Doe",
"email": "john.doe@example.com",
"phoneNumber": "+1234567890",
"addressLine1": "350 5th Ave",
"countryCode": "US",
"city": "New York",
"stateOrProvince": "New York",
"postalCode": "10001",
"addressLine2": "Apt 1",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"isDefault": true
}Creates a new guest shipping address and marks it as the default for the session.
curl --request POST \
--url https://api.henrylabs.ai/v0/checkout/guest/addresses \
--header 'Content-Type: application/json' \
--header 'x-access-token: <api-key>' \
--header 'x-api-key: <api-key>' \
--data '
{
"fullName": "John Doe",
"email": "john.doe@example.com",
"phoneNumber": "+1234567890",
"addressLine1": "350 5th Ave",
"countryCode": "US",
"city": "New York",
"stateOrProvince": "New York",
"postalCode": "10001",
"addressLine2": "Apt 1",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"isDefault": true
}
'{
"fullName": "John Doe",
"email": "john.doe@example.com",
"phoneNumber": "+1234567890",
"addressLine1": "350 5th Ave",
"countryCode": "US",
"city": "New York",
"stateOrProvince": "New York",
"postalCode": "10001",
"addressLine2": "Apt 1",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"isDefault": true
}Supabase access token for authentication.
Required when authenticating with API key
Full name
1"John Doe"
^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$"john.doe@example.com"
Phone number
1"+1234567890"
Address line 1
1"350 5th Ave"
ISO 3166-1 alpha-2 country code (e.g., 'us', 'uk', 'ca')
2"US"
City
1"New York"
State or province
1"New York"
Postal code
1"10001"
Street address line 2 (apartment, suite, etc.)
"Apt 1"
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"123e4567-e89b-12d3-a456-426614174000"
true
Guest address created successfully
Full name
1"John Doe"
^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$"john.doe@example.com"
Phone number
1"+1234567890"
Address line 1
1"350 5th Ave"
ISO 3166-1 alpha-2 country code (e.g., 'us', 'uk', 'ca')
2"US"
City
1"New York"
State or province
1"New York"
Postal code
1"10001"
Street address line 2 (apartment, suite, etc.)
"Apt 1"
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"123e4567-e89b-12d3-a456-426614174000"
true
Was this page helpful?