Zoey REST API reference ยท Interactive version: apidocs.zoey.com
GET https://container-url.zoeysite.com/api/rest/customers2/customer_address?id=1
Allows you to retrieve an existing customer address.
The list of attributes that will be returned for customer address is configured in the Admin Panel. The Customer user type has access only to his/her own addresses. Also, Admin can add additional non-system customer address attributes by selecting Customers > Attributes > Manage Customer Address Attributes (available only in Magento Enterprise Edition). If these attributes are set as visible on frontend, they will be returned in the response.
Query parameters:
| Name | Example | Notes |
|---|---|---|
id | 1 | Address ID. |
Example response (Get), HTTP 200:
{
"entity_id": "6268",
"firstname": "Zoey",
"lastname": "Developer",
"company": "Zoey Inc.",
"city": "New York",
"country_id": "US",
"region": "New York",
"postcode": "10019",
"telephone": "(555) 555-5555",
"street": [
"123 Main St.",
"Floor 10"
],
"is_default_billing": 1,
"is_default_shipping": 1
}
GET https://container-url.zoeysite.com/api/rest/customers/:customerId/addresses
Allows you to retrieve the list of existing customer addresses.
The list of attributes that will be returned for customer addresses is configured in the Zoey Admin Panel. The Customer user type has access only to his/her own addresses. Also, Admin can add additional non-system customer address attributes by selecting Customers > Attributes > Manage Customer Address Attributes. If these attributes are set as visible on frontend, they will be returned in the response.
Example response (Get All), HTTP 200:
[
{
"entity_id": "2",
"firstname": "Zoey",
"lastname": "Dev",
"company": "Zoey Inc.",
"city": "New York",
"region": "New York",
"postcode": "10019",
"country_id": "US",
"telephone": "(555) 555-5555",
"street": [
"123 Main St."
],
"is_default_billing": 1,
"is_default_shipping": 1
}
]
POST https://container-url.zoeysite.com/api/rest/customers2/customer_address
Allows you to create a new address for the required customer.
The Customer user type can create addresses only for themselves.
Example request body:
{
"customer_id": "1",
"addressData": {
"company": "Zoey Inc.",
"firstname": "Zoey",
"lastname": "Developer",
"street": [
"123 Main St.",
"Floor 10"
],
"city": "New York",
"region": "New York",
"country_id": "US",
"postcode": "10019",
"telephone": "(555) 555-5555",
"is_default_billing": 1,
"is_default_shipping": 1
}
}
PUT https://container-url.zoeysite.com/api/rest/customers2/customer_address
Allows you to update an existing customer address.
The list of attributes that will be updated for customer address is configured in the Admin Panel. The Customer user type has access only to his/her own addresses.
Only need to append the changes to the request.
Example request body:
{
"addressId": "10",
"addressData": {
"firstname": "API TEST"
}
}
DELETE https://container-url.zoeysite.com/api/rest/customers/addresses/:addressId
Allows you to delete an existing customer address.
The Customer user type can delete only his/her own addresses.
GET https://container-url.zoeysite.com/api/rest/address/countries
Used to set the different address types to the cart.
Types
billing - Required to be added on all carts.shipping - Only required if the cart isn't virtual. Virtual carts are carts with only Downloadable or Virtual product types that do not require shipment.Use the example requests to configure the addresses as needed.
Example request body:
{
"cartId": "287",
"customerAddressData": [
{
"mode": "billing",
"address_id": "1"
},
{
"mode": "shipping",
"address_id": "1"
}
]
}
GET https://container-url.zoeysite.com/api/rest/address/countries/:country_id
Used to set the different address types to the cart.
Types
billing - Required to be added on all carts.shipping - Only required if the cart isn't virtual. Virtual carts are carts with only Downloadable or Virtual product types that do not require shipment.Use the example requests to configure the addresses as needed.
Example request body:
{
"cartId": "287",
"customerAddressData": [
{
"mode": "billing",
"address_id": "1"
},
{
"mode": "shipping",
"address_id": "1"
}
]
}