Each address is accessed via /api/address
and has the following properties.
Complete details in AddressProperties.
The unique id for this address. It will never change.
address
.
A date when the address was created.
A date when the address was last updated.
The unique id of a User that this address belongs to.
The name of the person you're shipping this order to.
Optional. The name of the company located at this address if any.
The first part of the street address.
Optional. The second part of the street address.
A city name.
A state or province. If a US State, the two letter code should be used. See the address options for details.
A zip code or other postal code.
A two character country code. See the address options for details.
A number that can be called at the address if any problems occur.
Provides a list of the options that can be used to fill out various fields when creating or updating an address.
GET /api/address/_options
Returns:
{ "country" : [...], "_country" : {...}, "state" : [...], "_state" : {...} }
NOTE: You can also get this data by adding _include_options=1
to the parameter list when fetching an address.
The methods used to fetch and manipulate addreses.
POST /api/address
Required. The unique session id provided by a Session method.
Required.
Required.
Optional.
Required.
Optional.
Required.
Required. May be set to N/A
when country is not US
.
Required.
Required.
Required.
Returns:
{ "id" : "xxx", "name" : "Andy Dufresne", "company" : "Shawshank Prison", "address1" : "1600 Heartbreak Ln", "address2" : "Room: Prison Library", "state" : "ME", "postal_code" : "04093", "country" : "US", "phone_number" : "207-555-1111" ... }
PUT /api/address/xxx
See Create Address for details.
NOTE: Updating addresses is only allowed by admins.
DELETE /api/address/xxx
Required. The unique session id provided by a Session method.
Returns:
{ "success" : 1 }
GET /api/address/xxx
Optional. The unique session id provided by a Session method.
Optional. See "Relationships" in Intro and Address Relationships above for details.
Returns:
{ "id" : "xxx", "image_id" : "xxx", ... }
GET /api/address/countries
Returns:
{ "US" : "United States", "GB" : "United Kingdom", "CA" : "Canada", ... }
GET /api/address/states
Returns:
{ "WI" : "Wisconsin", "IL" : "Illinois", "CA" : "California", ... }