A customer address resource instance represents one of the many addresses a customer may have.
For more information about Customers, see the Customer API Documentation
The FlickRocket API lets you do the following with the CustomerAddress resource. More detailed versions of these general actions may be available:
GET /api/customers/#{token}/addresses.json
Receive a list of all CustomerAddresses
GET /api/customers/#{token}/addresses/#{token}.json
Receive a single CustomerAddress
POST /api/customers/#{token}/addresses.json
Create a new CustomerAddress
PUT /api/customers/#{token}/addresses/#{token}.json
Modify an existing CustomerAddress
DELETE /api/customers/#{token}/addresses/#{token}.json
Remove a CustomerAddress from the database
PUT /api/customers/#{token}/addresses/#{token}/default.json
Sets default address for a customer
address1 |
{"address1": "Heinrich-Hertz-Str. 2"} |
address2 |
{"address2": ""} |
city |
{"city": "Dortmund"} |
company |
{"company": ""} |
country |
{"country": "Germany"} |
country_name |
{"country_name": "Germany"} |
country_code |
{"country_code": "DE"} |
default |
{"default": true} |
first_name |
{"first_name": "John"} |
id |
{"id": 159501} |
last_name |
{"last_name": "Doe"} |
name |
{"name": "Test"} |
phone |
{"phone": "0231-12345678"} |
province |
{"province": ""} |
province_code |
{"province_code": ""} |
token |
{"token": "TCMJEOTSBEVTDLFU"} |
zip |
{"zip": "44227"} |
GET /api/customers/#{token}/addresses.json
GET /api/customers/#{token}/addresses/#{token}.json
POST /api/customers/#{token}/addresses.json
POST /api/customers/YLQCIUSBHVCTQUVN/addresses.json { "address": { "first_name": "Test_first_name", "last_name": "Test_last_name", "address1": "Markgrafenstr 92", "address2": "", "zip": "44139", "city": "Dortmund", "phone": "+49 231 976765 0", "language": "en", "country": "Germany", "country_name": "Germany", "country_code": "DE", "province_code": "NRW", "province": "NRW", "name": "Test_first_name Test_last_name" } }
PUT /api/customers/#{token}/addresses/#{token}.json { "address": { "first_name": "First", "last_name": "Last", "address1": "Markgrafenstr 92", "address2": "", "zip": "44139", "city": "Dortmund", "token": "RSEDJYBITFASLWHP", "country": "Germany", "country_name": "Germany", "country_code": "DE", "default": false, "province_code": "", "province": "" } }
DELETE /api/customers/#{token}/addresses/#{token}.json
PUT /api/customers/#{token}/addresses/#{token}/default.json