customer_address

Description

An address saved for a customer. If using multiship, these will be all the addresses used for this customer and the address_name is the shipto value used on the items. There will also be a Default Billing Address and Default Shipping Address for each customer.

Note: some of the functionality related to customer addresses is still being developed and reorganized. Especially as it relates to the default billing and shipping addresses.

Sandbox Example

You can interact with this resource and run actions against the sandbox API via our HAL Brower.

Actions

GET
View a customer_address
PATCH
Update a customer_address (send only the properties you want to modify)
PUT
Replace a customer_address (send the entire representation)
DELETE
Delete a customer_address
HEAD
Get just the header response
OPTIONS
Get a response explaining which HTTP methods are supported

Properties

Property Description Type Constraints
address_name The name of this address. This is also the value used as the shipto entry for a multiship item. String Required. Must be unique per customer. 100 characters or less.
first_name The given name associated with this address. String 50 characters or less.
last_name The surname associated with this address. String 50 characters or less.
company The company associated with this address. String 50 characters or less.
address1 The first line of the street address. String Required. 100 characters or less.
address2 The second line of the street address. String 100 characters or less.
city The city of this address. String 50 characters or less.
region The two character code for states in the United States. Other countries may call this a province. When a two character code isn't available, use the full region name. String 2 characters if code exists, otherwise 50 characters or less. regions
postal_code The postal code of this address. String 50 characters or less.
country The country code of this address. String Two character ISO 3166-1-alpha-2 code countries
phone The phone of this address. String 50 characters or less.
is_default_billing Specifies if this address is the default billing address for the customer. Boolean Read only
is_default_shipping Specifies if this address is the default shipping address for the customer. Boolean Read only
date_created The date this resource was created. Date Read only
date_modified The date this resource was last modified. Date Read only

Example Representation

{
    "_links": {
        "curies": [
            {
                "name": "fx",
                "href": "https://api.foxycart.com/rels/{rel}",
                "templated": true
            }
        ],
        "self": {
            "href": "https://api.foxycart.com/customer_addresses/201",
            "title": "awesome"
        },
        "fx:store": {
            "href": "https://api.foxycart.com/stores/8",
            "title": "This Store"
        },
        "fx:customer": {
            "href": "https://api.foxycart.com/customers/8",
            "title": "This Customer"
        }
    },
    "address_name": "awesome",
    "first_name": "firstname",
    "last_name": "lastname",
    "company": "My company",
    "address1": "12345 Any Street",
    "address2": "",
    "city": "Any City",
    "region": "TN",
    "postal_code": "37211",
    "country": "US",
    "phone": "",
    "is_default_billing": false,
    "is_default_shipping": false,
    "date_created": "2013-08-16T14:53:46-0700",
    "date_modified": "2013-08-16T14:53:46-0700"
}
<?xml version="1.0" encoding="UTF-8"?>
<resource href="https://api.foxycart.com/customer_addresses/201" rel="https://api.foxycart.com/rels/customer_address">
  <link rel="self" href="https://api.foxycart.com/customer_addresses/201" title="awesome"/>
  <link rel="https://api.foxycart.com/rels/store" href="https://api.foxycart.com/stores/8" title="This Store"/>
  <link rel="https://api.foxycart.com/rels/customer" href="https://api.foxycart.com/customers/8" title="This Customer"/>
  <address_name>awesome</address_name>
  <first_name>firstname</first_name>
  <last_name>lastname</last_name>
  <company>My company</company>
  <address1>12345 Any Street</address1>
  <address2></address2>
  <city>Any City</city>
  <region>TN</region>
  <postal_code>37211</postal_code>
  <country>US</country>
  <phone></phone>
  <is_default_billing>false</is_default_billing>
  <is_default_shipping>false</is_default_shipping>
  <date_created>2013-08-16T14:53:46-0700</date_created>
  <date_modified>2013-08-16T14:53:46-0700</date_modified>
</resource>
{
    "class": [
        "customer_address"
    ],
    "properties": {
        "address_name": "awesome",
        "first_name": "firstname",
        "last_name": "lastname",
        "company": "My company",
        "address1": "12345 Any Street",
        "address2": "",
        "city": "Any City",
        "region": "TN",
        "postal_code": "37211",
        "country": "US",
        "phone": "",
        "is_default_billing": false,
        "is_default_shipping": false,
        "date_created": "2013-08-16T14:53:46-0700",
        "date_modified": "2013-08-16T14:53:46-0700"
    },
    "links": [
        {
            "rel": [
                "self"
            ],
            "href": "https://api.foxycart.com/customer_addresses/201"
        },
        {
            "rel": [
                "https://api.foxycart.com/rels/store"
            ],
            "href": "https://api.foxycart.com/stores/8"
        },
        {
            "rel": [
                "https://api.foxycart.com/rels/customer"
            ],
            "href": "https://api.foxycart.com/customers/8"
        }
    ]
}

Zoomable Resources

This resource has no linked resources which can be "zoomed" in on, filtered and embedded within this resource.