Search for addresses.
Method | URI | Description |
---|---|---|
GET | /users/{user_id}/addresses |
Search user owned addresses |
GET | /teams/{team_id}/addresses |
Search team owned addresses |
GET | /contacts/{contact_id}/addresses |
Search contact owned addresses |
{
"data": [
{
"id": 1,
"street": "500 Main St. Suite H",
"street_2": null,
"city": "Safety Harbor",
"state": "FL",
"country_id": 1,
"country_name": "United States",
"country": {
"id": 1,
"name": "United States",
"code": "US"
},
"postal_code": "33763",
"latitude": null,
"longitude": null,
"is_primary": true,
"type": "Business",
"created_at": "2020-01-01T00:00:00Z",
"updated_at": "2020-01-01T00:00:00Z",
"deleted_at": null
}
],
"links": {
"first": "https://api.happygrasshopper.com/v3/contacts/11882201/addresses?page=1",
"last": "https://api.happygrasshopper.com/v3/contacts/11882201/addresses?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": null,
"last_page": 1,
"path": "https://api.happygrasshopper.com/v3/contacts/11882201/addresses",
"per_page": 15,
"to": null,
"total": 1
}
}
Create an address.
Method | URI | Description |
---|---|---|
POST | /users/{user_id}/addresses |
Create a user owned address |
POST | /teams/{team_id}/addresses |
Create a team owned address |
POST | /contacts/{contact_id}/addresses |
Create a contact owned address |
{
"street": "500 Main St. Suite H",
"street_2": null,
"city": "Safety Harbor",
"state": "FL",
"country": "United States",
"postal_code": "33763",
"is_primary": true,
"type": "Other"
}
{
"id": 1,
"street": "500 Main St. Suite H",
"street_2": null,
"city": "Safety Harbor",
"state": "FL",
"country_id": 1,
"country_name": "United States",
"country": {
"id": 1,
"name": "United States",
"code": "US"
},
"postal_code": "33763",
"latitude": null,
"longitude": null,
"is_primary": true,
"type": "Other",
"created_at": "2020-07-06T00:48:59Z",
"updated_at": "2020-07-06T00:48:59Z",
"deleted_at": null
}
Retrieve an address.
Method | URI | Description |
---|---|---|
GET | /addresses/{address_id} |
Retrieve an address by it's id |
{
"id": 1,
"street": "500 Main St. Suite H",
"street_2": null,
"city": "Safety Harbor",
"state": "FL",
"country_id": 1,
"country_name": "United States",
"country": {
"id": 1,
"name": "United States",
"code": "US"
},
"postal_code": "33763",
"latitude": null,
"longitude": null,
"is_primary": true,
"type": "Other",
"created_at": "2020-07-06T00:48:59Z",
"updated_at": "2020-07-06T00:48:59Z",
"deleted_at": null
}
Update an address.
Method | URI | Description |
---|---|---|
PUT | /addresses/{address_id} |
Update an address |
{
"street": "500 Main St. Suite H",
"street_2": null,
"city": "Safety Harbor",
"state": "FL",
"country": "United States",
"postal_code": "33763",
"is_primary": true,
"type": "Other"
}
{
"id": 1,
"street": "500 Main St. Suite H",
"street_2": null,
"city": "Safety Harbor",
"state": "FL",
"country_id": 1,
"country_name": "United States",
"country": {
"id": 1,
"name": "United States",
"code": "US"
},
"postal_code": "33763",
"latitude": null,
"longitude": null,
"is_primary": true,
"type": "Other",
"created_at": "2020-07-06T00:48:59Z",
"updated_at": "2020-07-06T00:48:59Z",
"deleted_at": null
}
Delete an address.
Method | URI | Description |
---|---|---|
DELETE | /addresses/{address_id} |
Delete an address by it's id |
{
"success": true
}