Addresses

Physical address and shipping address shapes — the address primitives used across Decal's API.

Decal uses two address shapes that build on each other:

  • PhysicalAddress — the base shape: street, city, state/region, postal code, country. Used for billing addresses, merchant locations, and any context that doesn't need contact details.
  • ShippingAddress — extends PhysicalAddress with first name, last name, and phone. Required for shipments since carriers need a recipient and a contact number.

Think of ShippingAddress as PhysicalAddress plus the contact details a shipping carrier needs.

PhysicalAddress

FieldTypeRequiredDescription
address1stringyesStreet address line 1.
address2stringnoStreet address line 2 (apartment, suite, etc.).
citystringyesCity.
statestringvariesState or province. Required or optional by country's standard.
postalCodestringyesZIP or postal code.
countrystringyesISO 3166-1 alpha-2 country code (e.g. US).
{
  "address1": "123 Main St",
  "address2": "Suite 400",
  "city": "Brooklyn",
  "state": "NY",
  "postalCode": "11215",
  "country": "US"
}

ShippingAddress

ShippingAddress is PhysicalAddress plus a recipient name and contact phone.

FieldTypeRequiredDescription
firstNamestringyesRecipient first name.
lastNamestringyesRecipient last name.
address1stringyesStreet address line 1.
address2stringnoStreet address line 2.
citystringyesCity.
statestringvariesState or province. Required or optional by country's standard.
postalCodestringyesZIP or postal code.
countrystringyesISO 3166-1 alpha-2 country code.
phonestringyesContact phone number for the shipment.
{
  "firstName": "Alice",
  "lastName": "Chen",
  "address1": "123 Main St",
  "city": "Brooklyn",
  "state": "NY",
  "postalCode": "11215",
  "country": "US",
  "phone": "+15551234567"
}