Shipping Address API v2

REST API for a User's shipping addresses. OAuth must be setup before making these API calls. See the OAuth 2.0 page for more details.

This REST API supports JSON format.

Request format


Ruby example using OAuth2 and HTTParty.

  # Retrieve access token from session.  You may have saved it in the DB.
  access_token = session[:access_token]

  api_url = "http://localhost:1111/api/v2/shipping_addresses?access_token=" + access_token.to_s
  addresses = HTTParty.get(api_url, :options => { :headers => { 'Content-Type' => 'application/json' } }).to_json

REST Actions

Action Description Method URL Parameters
Index Get all shipping addresses of the user GET
  • access_token
Show Get a single shipping address of the user GET
  • access_token
  • shipping_address_id
Create Create a new wishlist POST
  • access_token
  • shipping address object
Update Update an existing wishlist PUT
  • access_token
  • shipping address
Delete Delete a shipping address DELETE
  • access_token
  • shipping_address_id

Request parameters

Parameter Type Description


URL Param Access token provided through the OAuth service.


URL Param The id of the product you are looking for.
shipping_address[address_1] Data Param

Address line 1 of the shipping address. cURL example:

curl '' -d 'shipping_address[address_1]=123 Fake Street' -d 'shipping_address[address_2]=Apt 1'

shipping_address[address_2] Data Param Address line 2 of the shipping address.
shipping_address[address_type] Data Param Address type of the shipping address (residential, business, etc..).
shipping_address[alias] Data Param Alias or nickname of the shipping address.
shipping_address[city] Data Param City of the shipping address.
shipping_address[country] Data Param Country of the shipping address.
shipping_address[state] Data Param U.S. State of the shipping address (two letter abbreviation).
shipping_address[email] Data Param Email of the shipping address.
shipping_address[first_name] Data Param First name of recipient at the shipping address.
shipping_address[last_name] Data Param Last name of recipient at the shipping address.
shipping_address[phone] Data Param Phone number of the shipping address.
shipping_address[security_code] Data Param Security/buzzer code at the shipping address.
shipping_address[zip] Data Param Zipcode of the shipping address.

Example response

All the shipping addresses of the current user.

    "address_1":"123 Fake Street",
    "alias":"MY CASTLE",
    "city":"New York",