Location
A Location represents a geographical location where your stores, headquarters, and/or pop-up shops exist. These locations can be used to track sales and to help haravan configure the tax rates to charge when selling products.
What can you do with Location?
The haravan API lets you do the following with the Location resource. More detailed versions of these general actions may be available:
- GET /com/locations.json Receive a list of all Locations
- GET /com/locations/#{id}.json Receive a single Location
Location Properties
id |
A unique numeric identifier for the location. |
name |
The name of the location |
location_type |
The location type |
address1 |
The first line of the address |
address2 |
The second line of the address |
zip |
The zip or postal code |
city |
The city the location is in |
province |
The province the location is in |
country |
The country the location is in |
phone |
The phone number of the location, can contain special chars like - and + |
created_at |
The date and time when the location was created. The API returns this value in ISO 8601 format. |
updated_at |
The date and time when the location was last updated. The API returns this value in ISO 8601 format. |
Endpoints
GET/com/locations.json
Get a list of all locations for a shop
Get a list of all locations for a shop
GET /com/locations.jsonView Response
HTTP/1.1 200 OK { "locations": [ { "address1": null, "address2": null, "city": null, "country": "US", "created_at": "2015-03-28T13:29:45-04:00", "deleted_at": null, "id": 487838322, "location_type": "storefront", "name": "Fifth Avenue AppleStore", "phone": null, "province": null, "updated_at": "2015-03-28T13:29:45-04:00", "zip": null, "country_code": "US", "country_name": "United States", "province_code": null }, { "address1": null, "address2": null, "city": null, "country": "DE", "created_at": "2015-03-28T13:29:45-04:00", "deleted_at": null, "id": 1034478814, "location_type": "storefront", "name": "Berlin Store", "phone": null, "province": null, "updated_at": "2015-03-28T13:29:45-04:00", "zip": null, "country_code": "DE", "country_name": "Germany", "province_code": null } ] }
GET/com/locations/487838322.json
Get a single location by its ID
Get a single location
GET /com/locations/#{id}.jsonView Response
HTTP/1.1 200 OK { "location": { "address1": null, "address2": null, "city": null, "country": "US", "created_at": "2015-03-28T13:29:45-04:00", "deleted_at": null, "id": 487838322, "location_type": "storefront", "name": "Fifth Avenue AppleStore", "phone": null, "province": null, "updated_at": "2015-03-28T13:29:45-04:00", "zip": null, "country_code": "US", "country_name": "United States", "province_code": null } }