for owner
GET /api/v1/addresses
Parameters
| Name |
Description |
|
id
|
id
|
|
line_one
|
Address line one
|
|
line_two
|
Address line two
|
|
postal_code
|
Zip code/postal code
|
|
country
|
Country
|
|
region
|
Region/state
|
|
phone_number
|
Telephone Number
|
|
city
|
City
|
Request
Headers
Route
GET /api/v1/addresses?id=1&line_one=158+powers&line_two=%231&postal_code=11211&country=US®ion=NY&phone_number=5555555555&city=New+York
Query Parameters
id: 1
line_one: 158 powers
line_two: #1
postal_code: 11211
country: US
region: NY
phone_number: 5555555555
city: New York
cURL
curl "http://localhost:3000/api/v1/addresses?id=1&line_one=158+powers&line_two=%231&postal_code=11211&country=US®ion=NY&phone_number=5555555555&city=New+York" -X GET \
-H "Accept: application/json" \
-H "X-Api-Token: Yx-y9SH2UMAS1PFgJDfhNwN7wMBJJPyHwQ" \
-H "X-Api-Email: user-371@example.com" \
-H "Content-Type: application/json" \
-H "Host: school.worksonmy.computer"
Response
Headers
Status
200 OK
Body
{
"addresses": [
{
"created_at": "2019-10-31T22:10:37Z",
"line_one": "158 powers",
"line_two": "#1",
"postal_code": "11211",
"country": "US",
"region": "NY",
"phone_number": "7135178333",
"id": 1,
"city": "Brooklyn",
"meta": {
"class": "address",
"url": null,
"name": "1",
"description": "",
"image_url": null
}
}
],
"meta": {
"total": 1,
"page": 1,
"from": 1,
"to": 1,
"per": 25,
"number_of_pages": 1,
"query": {
}
}
}