Skip to main content

Location

Version: 1.0

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.

Authenticated access scopes: com.read_shop

What you can do with Location

The Haravan API lets you do the following with the Location resource.

Properties


id : number

"id": 1206854680

A unique numeric identifier for the location.

name : string

"name": "Ottawa Store"

The name of the location.

location_type : string

"location_type":"null"

The kind of location type:

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

address1 : string

"address1":"126 york street"

The first line of the address.

address2 : string

"address2": "second and third floor"

The second line of the address.

zip : string

"zip": "7000"

The zip or postal code.

city : string

"city": "Ottawa"

The city the location is in.

province : string

"province": "Ontario"

The province the location is in.

country : string

"country": "CA"

The country the location is in.

phone : string

"phone": "18883290139"

The phone number of the location.

created_at : string

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

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

updated_at : string

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

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

Retrieves a list of locations

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

Retrieves a list of all locations for a shop.

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

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

GET
https://apis.haravan.com/com/locations/{location_id}.json

Retrieves single the location by ID.
  • GET https://apis.haravan.com/com/locations/487838322.json
Details

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"
}
}