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.

Location properties

id

"id": 1206854680

A unique numeric identifier for the location.

name

"name": "Ottawa Store"

The name of the location.

location_type

"location_type": "null"

The kind of location type:

  • default: default warehouse.
  • ontheroad: transit warehouse.

address1

"address1": "126 york street"

The first line of the address.

address2

"address2":"second and third floor"

The second line of the address.

zip

"zip" : "7000" 

The zip or postal code.

city

"city": "Ottawa"

The city the location is in.

province

"province":"Ontario"

The province the location is in.

country

"country":"CA"

The country the location is in.

phone

"phone": 18883290139"

The phone number of the location.

created_at

"created_at": "2021-05-13T07:29:20.1Z"

The date and time (ISO 8601 format) when the location was created.

updated_at

"created_at":"2021-05-13T07:29:20.808Z"

The date and time (ISO 8601 format) when the location was last updated.

Endpoints

GET https://apis.haravan.com/com/locations.json

Retrieves a list of all locations for a shop.

Retrieves a list of all locations for a shop.

GET https://apis.haravan.com/com/locations.json

View response

HTTP/1.1 200 OK

{ "locations": [ { "id": 991324, "name": "Địa điểm mặc định", "location_type": null, "email": null, "address1": "123 Nguyễn Dình Chiểu", "address2": null, "zip": "700000", "city": null, "province": "Hồ Chí Minh", "country": "Vietnam", "phone": "0332456789", "country_code": "VN", "country_name": "Vietnam", "province_code": "HC", "district": "Quận Phú Nhuận", "district_code": "HC481", "ward": "Phường 03", "ward_code": "27055", "created_at": "2020-10-22T03:35:39.461Z", "updated_at": "2021-05-24T03:17:54.555Z", "is_primary": true, "is_unavailable_quantity": false, "type": "default" } ] }

Retrieves single the location by ID.

GET https://apis.haravan.com/com/locations/487838322.json

View response

HTTP/1.1 200 OK

{ "location": { "id": 991324, "name": "Địa điểm mặc định", "location_type": null, "email": null, "address1": "123 Nguyễn Dình Chiểu", "address2": null, "zip": "700000", "city": null, "province": "Hồ Chí Minh", "country": "Vietnam", "phone": "0332456789", "country_code": "VN", "country_name": "Vietnam", "province_code": "HC", "district": "Quận Phú Nhuận", "district_code": "HC481", "ward": "Phường 03", "ward_code": "27055", "created_at": "2020-10-22T03:35:39.461Z", "updated_at": "2021-05-24T03:17:54.555Z", "is_primary": true, "is_unavailable_quantity": false, "type": "default" } }