Show

Retrieve details about a particular address:

GET /api/addresses/1

Response

Status: 200 OK
{
  "id": 1,
  "firstname": "Spree",
  "lastname": "Commerce",
  "address1": "1 Someplace Lane",
  "address2": "Suite 1",
  "city": "Bethesda",
  "zipcode": "16804",
  "phone": "123.4567.890",
  "company": null,
  "alternative_phone": null,
  "country_id": 1,
  "state_id": 1,
  "state_name": null,
  "country": {
    "id": 1,
    "iso_name": "UNITED STATES",
    "iso": "US",
    "iso3": "USA",
    "name": "United States",
    "numcode": 1
  },
  "state": {
    "abbr": "NY",
    "country_id": 1,
    "id": 1,
    "name": "New York"
  }
}

Update

To update an address, make a request like this:

PUT /api/addresses/1?address[firstname]=Ryan

This request will update the firstname field for an address to the value of "Ryan"

Valid address fields are:

  • firstname
  • lastname
  • company
  • address1
  • address2
  • city
  • zipcode
  • phone
  • alternative_phone
  • country_id
  • state_id