# Addresses
Addresses are the location information of your customers.
# The Address Object
# Sample
{
"id": "8d92cc27",
"name": "Work",
"description": "15688 Kohler Ceceliaville, RI 90603",
"latitude": "-26.295234",
"longitude": "4.076668",
"created_at": "2019-04-30 09:24:58",
"updated_at": "2019-05-28 09:35:02",
"deleted_at": null,
"customer": {
"id": "8d831d65"
},
"delivery_zone": {
"id": "8d86ac81"
}
}
# Attributes
| Field | Type | Rule | Description |
|---|---|---|---|
id | string | Unique identifier for the address. | |
name | string | updatable | Name of the address. |
description | string | updatable | Description of the address. |
latitude | string | nullable updatable | Latitude of the address. |
longitude | string | nullable updatable | longitude of the address. |
customer | object | includable updatable | The Customer object attached to the address. |
delivery_zone | object | nullable includable updatable | The Delivery Zone object attached to the address. |
created_at | string | sortable | Time YYYY-MM-DD HH-MM-SS in UTC at which the address was created. |
updated_at | string | sortable | Time YYYY-MM-DD HH-MM-SS in UTC at which the address was updated. |
deleted_at | string | nullable | Time YYYY-MM-DD HH-MM-SS in UTC at which the address was deleted. |
# List Addresses
GET /addresses
# Scope
customers.list
# Filters
customer_idupdated_afteris_deleted
# Response
{
"data": [
{
"id": "8d92cc27",
"name": "Work",
"description": "15688 Kohler Ceceliaville, RI 90603",
"latitude": "-26.295234",
"longitude": "4.076668",
"created_at": "2019-04-30 09:24:58",
"updated_at": "2019-05-28 09:35:02",
"deleted_at": null,
"customer": {
"id": "8d831d65"
},
"delivery_zone": {
"id": "8d86ac81"
}
}
]
}
# Get Address
GET /addresses/{addressId}
# Scope
customers.get
# Response
{
"data": {
"id": "8d92cc27",
"name": "Work",
"description": "15688 Kohler Ceceliaville, RI 90603",
"latitude": "-26.295234",
"longitude": "4.076668",
"created_at": "2019-04-30 09:24:58",
"updated_at": "2019-05-28 09:35:02",
"deleted_at": null,
"customer": {
"id": "8d831d65"
},
"delivery_zone": {
"id": "8d86ac81"
}
}
}
# Create Address
POST /addresses
# Scope
customers.write
# Request
{
"name": "Home",
"description": "15688 Kohler Ceceliaville, RI 90603",
"latitude": "-46.295234",
"longitude": "4.076668",
"customer_id": "8d06aaa0",
"delivery_zone_id": "8d06aaa0"
}
# Response
{
"data": {
"id": "8d92cc27",
"name": "Work",
"description": "15688 Kohler Ceceliaville, RI 90603",
"latitude": "-26.295234",
"longitude": "4.076668",
"created_at": "2019-04-30 09:24:58",
"updated_at": "2019-05-28 09:35:02",
"deleted_at": null,
"customer": {
"id": "8d831d65"
},
"delivery_zone": {
"id": "8d86ac81"
}
}
}
# Update Address
PUT /addresses/{addressId}
# Scope
customers.write
# Request
{
"name": "Home",
"description": "15688 Kohler Ceceliaville, RI 90603",
"latitude": "-46.295234",
"longitude": "4.076668",
"customer_id": "8d06aaa0",
"delivery_zone_id": "8d06aaa0"
}
# Response
{
"data": {
"id": "8d92cc27",
"name": "Work",
"description": "15688 Kohler Ceceliaville, RI 90603",
"latitude": "-26.295234",
"longitude": "4.076668",
"created_at": "2019-04-30 09:24:58",
"updated_at": "2019-05-28 09:35:02",
"deleted_at": null,
"customer": {
"id": "8d831d65"
},
"delivery_zone": {
"id": "8d86ac81"
}
}
}
# Delete Address
DELETE /addresses/{addressId}
# Scope
customers.write