Magento API

REST

About Magento API

REST API: Order Addresses

URI: /orders/:orderid/addresses

Allows you to retrieve information about billing and shipping addresses of the required order.

URL Structure: http://magentohost/api/rest/orders/:orderid/addresses
Version: 1

HTTP Method: GET

Description: Allows you to retrieve information on billing and shipping addresses from the required order.
Notes: Customers can retrieve addresses only from their orders.

Authentication: Admin, Customer
Default Format: XML
Parameters:
No Parameters

Example:

Response Body:

<?xml version="1.0"?>
<magento_api>
  <data_item>
    <region>Palau</region>
    <postcode>19103</postcode>
    <lastname>Doe</lastname>
    <street>2356 Jody Road Philadelphia
844 Jefferson Street; 4510 Willis Avenue</street>
    <city>PA</city>
    <telephone>610-634-1181</telephone>
    <country_id>US</country_id>
    <firstname>John</firstname>
    <address_type>billing</address_type>
    <prefix>Dr.</prefix>
    <middlename></middlename>
    <suffix>Jr.</suffix>
    <company></company>
  </data_item>
  <data_item>
    <region>Massachusetts</region>
    <postcode>01852</postcode>
    <lastname>Doe</lastname>
    <street>1073 Smith Street</street>
    <city>Lowell</city>
    <telephone>508-857-6870</telephone>
    <country_id>US</country_id>
    <firstname>John</firstname>
    <address_type>shipping</address_type>
    <prefix></prefix>
    <middlename></middlename>
    <suffix></suffix>
    <company></company>
  </data_item>
</magento_api>
HTTP Method: POST

Description: Not allowed.

HTTP Method: PUT

Description: Not allowed.

HTTP Method: DELETE

Description: Not allowed.

URI: /orders/:orderid/addresses/billing

HTTP Method: GET

Description: Allows you to retrieve information on the order billing address.
Notes: Customers can retrieve information on billing addresses only from their own orders.

Authentication: Admin, Customer
Default Format: XML
Parameters:
No Parameters

Example:

Response example:

<?xml version="1.0"?>
<magento_api>
  <region>Palau</region>
  <postcode>19103</postcode>
  <lastname>Doe</lastname>
  <street>2356 Jody Road Philadelphia
844 Jefferson Street; 4510 Willis Avenue</street>
  <city>PA</city>
  <telephone>610-634-1181</telephone>
  <country_id>US</country_id>
  <firstname>John</firstname>
  <address_type>billing</address_type>
  <prefix>Dr.</prefix>
  <middlename></middlename>
  <suffix>Jr.</suffix>
  <company></company>
</magento_api>
HTTP Method: POST

Description: Not allowed.

HTTP Method: PUT

Description: Not allowed.

HTTP Method: DELETE

Description: Not allowed.

URI: /orders/:orderid/addresses/shipping

HTTP Method: GET

Description: Allows you to retrieve information on the order shipping address.
Notes: Customers can retrieve information on shipping addresses only from their own orders.

Authentication: Admin, Customer
Default Format: XML
Parameters:
No Parameters

Example:

Response example:

<?xml version="1.0"?>
<magento_api>
  <region>Massachusetts</region>
  <postcode>01852</postcode>
  <lastname>Doe</lastname>
  <street>1073 Smith Street</street>
  <city>Lowell</city>
  <telephone>508-857-6870</telephone>
  <country_id>US</country_id>
  <firstname>John</firstname>
  <address_type>shipping</address_type>
  <prefix></prefix>
  <middlename></middlename>
  <suffix></suffix>
  <company></company>
</magento_api>
HTTP Method: POST

Description: Not allowed.

HTTP Method: PUT

Description: Not allowed.

HTTP Method: DELETE

Description: Not allowed.

Order Addresses Attributes

Attribute Name Attribute Description
Customer Last Name Customer last name
Customer First Name
Customer first name
Customer Middle Name
Customer middle name or initial
Customer Prefix
Customer prefix
Customer Suffix
Customer suffix
Company
Company name
Street
Street address
City
City
State
State
ZIP/Postal Code
ZIP or postal code
Country
Country name
Phone Number
Customer phone number
Address Type
Address type. Can have the following values: billing or shipping