Subscriptions can have addresses like "Shipping Address" associated with them. This is apart from the billing address as part of credit card information.

Sample address [ JSON ]

{ "label": "shipping_address", "first_name": "Benjamin", "last_name": "Ross", "company": "Acme Inc", "phone": "+1 (614) 226-4809", "addr": "345, Redington Av", "extended_addr": "Suite 1200", "city": "Los Angeles", "state_code": "CA", "state": "California", "country": "US", "validation_status": "not_validated", "object": "address", "subscription_id": "8avVGOkx8U1MX" }
label
Label to identify the address. This is unique for all the address for a subscription.
string, max chars=50
first_name
First name.
optional, string, max chars=150
last_name
Last name.
optional, string, max chars=150
email
Email.
optional, string, max chars=70
company
Company name.
optional, string, max chars=250
phone
Phone number.
optional, string, max chars=50
addr
Address line 1.
optional, string, max chars=150
extended_addr
Address line 2.
optional, string, max chars=150
extended_addr2
Address line 3.
optional, string, max chars=150
city
City.
optional, string, max chars=50
state_code
The ISO 3166-2 state/province code. Supported only for countries US,Canada and India.
optional, string, max chars=50
state
State or Province.
optional, string, max chars=50
country
2-letter ISO 3166 alpha-2 country code.
optional, string, max chars=50
zip
Zip or Postal code.
optional, string, max chars=20
validation_status
The address verification status.
optional, enumerated string, default=not_validated
Possible values are
not_validatedAddress is not yet validated.validAddress was validated successfully.partially_validAddress is verified but only partially.invalidAddress is invalid.
subscription_id
A unique identifier to identify the subscription. You will use this to perform all operations on this subscription.
string, max chars=50
Retrieves an address resource for a subscription and the specified label.
Sample Request
curl  https://{site}.chargebee.com/api/v2/addresses \
     -G  \
     -u {site_api_key}: \
     --data-urlencode subscription_id="8avVGOkx8U1MX" \
     --data-urlencode label="shipping_address"
copy
curl  https://{site}.chargebee.com/api/v2/addresses \
     -G  \
     -u {site_api_key}: \
     --data-urlencode subscription_id="8avVGOkx8U1MX" \
     --data-urlencode label="shipping_address"

Sample Response [ JSON ]

{"address": { "label": "shipping_address", "first_name": "Benjamin", "last_name": "Ross", "company": "Acme Inc", "phone": "+1 (614) 226-4809", "addr": "345, Redington Av", "extended_addr": "Suite 1200", "city": "Los Angeles", "state_code": "CA", "state": "California", "country": "US", "validation_status": "not_validated", "object": "address", "subscription_id": "8avVGOkx8U1MX" }}

URL Format GET

https://{site}.chargebee.com/api/v2/addresses
subscription_id
A unique identifier to identify the subscription. You will use this to perform all operations on this subscription.
required, string, max chars=50
label
Label to identify the address. This is unique for all the address for a subscription.
required, string, max chars=50
Resource object representing address.
always returned
Adds or replaces the address for a subscription. If an address is already present for the specified label, it will be replaced otherwise new address is added with that label.
Sample Request
curl  https://{site}.chargebee.com/api/v2/addresses \
     -u {site_api_key}: \
     -d subscription_id="8avVGOkx8U1MX" \
     -d label="shipping_address" \
     -d first_name="Benjamin" \
     -d last_name="Ross" \
     -d addr="PO Box 9999" \
     -d city="Walnut" \
     -d state="California" \
     -d zip="91789" \
     -d country="US"
copy
curl  https://{site}.chargebee.com/api/v2/addresses \
     -u {site_api_key}: \
     -d subscription_id="8avVGOkx8U1MX" \
     -d label="shipping_address" \
     -d first_name="Benjamin" \
     -d last_name="Ross" \
     -d addr="PO Box 9999" \
     -d city="Walnut" \
     -d state="California" \
     -d zip="91789" \
     -d country="US"

Sample Response [ JSON ]

{"address": { "label": "shipping_address", "first_name": "Benjamin", "last_name": "Ross", "addr": "PO Box 9999", "city": "Walnut", "state_code": "CA", "state": "California", "country": "US", "zip": "91789", "validation_status": "not_validated", "object": "address", "subscription_id": "8avVGOkx8U1MX" }}

URL Format POST

https://{site}.chargebee.com/api/v2/addresses
subscription_id
A unique identifier to identify the subscription. You will use this to perform all operations on this subscription.
required, string, max chars=50
label
Label to identify the address. This is unique for all the address for a subscription.
required, string, max chars=50
first_name
First name.
optional, string, max chars=150
last_name
Last name.
optional, string, max chars=150
email
Email.
optional, string, max chars=70
company
Company name.
optional, string, max chars=250
phone
Phone number.
optional, string, max chars=50
addr
Address line 1.
optional, string, max chars=150
extended_addr
Address line 2.
optional, string, max chars=150
extended_addr2
Address line 3.
optional, string, max chars=150
city
City.
optional, string, max chars=50
state_code
The ISO 3166-2 state/province code. The recommended way of passing the state/province information. Supported for US, Canada and India now. Further if this is specified, 'state' attribute should not be specified as it will be set automatically.
optional, string, max chars=50
state
The state/province name. Use this to pass the state/province information for cases where 'state_code' is not supported or cannot be passed.
optional, string, max chars=50
zip
Zip or Postal code.
optional, string, max chars=20
country
2-letter ISO 3166 alpha-2 country code.
optional, string, max chars=50
validation_status
The address verification status.
optional, enumerated string
Possible values are
not_validatedAddress is not yet validated.validAddress was validated successfully.partially_validAddress is verified but only partially.invalidAddress is invalid.
Resource object representing address.
always returned