Addresses

Overview

Addresses store shipping and billing information for customers. Each address can be marked as default and associated with subscriptions for fulfillment.


How It Works

  1. Create an address - Add a shipping or billing address for a customer
  2. Set as default - Mark an address as the customer's default
  3. Use for fulfillment - Associate addresses with subscriptions for shipping

Example: A customer adds their home address for magazine delivery. Later, they add a work address and set it as default for future subscriptions.


API Endpoints

MethodEndpointDescription
GET/api/v1/core/addressesList all addresses
POST/api/v1/core/addressesCreate an address
GET/api/v1/core/addresses/{id}Get an address
PUT/api/v1/core/addresses/{id}Update an address
DELETE/api/v1/core/addresses/{id}Delete an address

Important Behaviors

  • Soft delete: Addresses are soft-deleted, not permanently removed.
  • String cleansing: Address fields are automatically cleaned — patterns removed, whitespace trimmed, trailing commas stripped, empty values nullified.
  • Subscription update: When an address is updated, a background job can update the default shipping address on the customer's subscriptions.
  • AvaTax validation: If the AvaTax integration is enabled, address validation is available via a feature flag.

Address Types

TypeDescription
shippingDelivery address for physical products
billingAddress used for invoicing and payments
account_primaryPrimary account address

Address Object

AttributeTypeDescription
idintegerUnique identifier for the address
user_idintegerID of the customer (expandable)
typestringAddress type: shipping, billing, or account_primary
is_defaultbooleanWhether this is the default address
first_namestringRecipient's first name
last_namestringRecipient's last name
salutationstringTitle/salutation (Mr., Mrs., etc.)
titlestringProfessional title
companystringCompany name
departmentstringDepartment within company
line1stringStreet address line 1
line2stringStreet address line 2 (apt, suite, etc.)
citystringCity name
statestringState/province/region
postal_codestringZIP or postal code
countrystringTwo-letter ISO country code
phonestringPhone number
vendor_idintegerAssociated vendor ID
delivery_instructionsstringDelivery instructions
delivery_sequence_numberintegerDelivery sequence number
old_provider_idstringExternal system reference ID
created_atintegerUnix timestamp of creation
updated_atintegerUnix timestamp of last update