Address

Add, update, and assign a delivery vendor to customer addresses.

Overview

Addresses store a customer’s shipping and billing information, used for fulfillment and tax. These endpoints add and update the authenticated customer’s addresses, and assign a delivery vendor to a shipping address. All require a bearer token.


How It Works

  1. Create - Add a shipping or billing address for the customer.
  2. Use - Associate the address with subscriptions and orders for fulfillment.
  3. Update - Correct or change details on an existing address.
  4. Assign a vendor - Match one of the account's delivery vendors (by its delivery service area) to a customer's shipping address, so future deliveries to that address route to that vendor.

Example: A customer adds a home shipping address at checkout, then later updates the postal code.


API Endpoints

MethodEndpointDescription
POST/api/v1/sdk/addressCreate address
PUT/api/v1/sdk/address/{address_id}Update address
POST/api/v1/sdk/address/{address_id}/assign-vendorAssign vendor to address

Important Behaviors

  • Authentication: All endpoints require a bearer token.
  • Response shape: All return the shared customer resource (with data.addresses) plus a meta block (account_id, site_id, features).
  • Type is immutable on update: The address type cannot be changed once set.
  • Ownership: Acting on an address the customer does not own returns 404.
  • Assign vendor: only shipping addresses are supported (else 400); the call is idempotent and returns 200 with the address's vendor_id left null when no delivery vendor matches.