Skip to main content

Get Locations

Method GET

https://my.easyweek.io/api/public/v2/locations

Description: This endpoint is used to retrieve a list of locations for the current workspace. It provides information about each location, including its name, logo, description, opening hours, timezone, address details, and images. The primary image is always listed first in the array of images.

Example Request

curl -i -X GET \
https://my.easyweek.io/api/public/v2/locations \
-H 'Authorization: Bearer <YOUR_SECRET>' \
-H 'Workspace: <YOUR_WORKSPACE>'

Example Response

{
"data": [
{
"uuid": "123b2980-3506-4f8c-abce-97e1ab653406",
"name": "Location 1",
"images": [
"https://storage.easyweek.io/example_main_images_images_HwPbmMatZl.jpg",
"https://storage.easyweek.io/example_images_images_2qryC62Soi.jpg"
],
"description": "This is a test location description.",
"opening_hours": {
"days": {
"mon": [
{
"from": "09:00",
"to": "21:00"
}
],
"wed": [
{
"from": "08:00",
"to": "12:00"
},
{
"from": "13:00",
"to": "17:00"
}
],
"tue": null,
"thu": null,
"fri": null,
"sat": null,
"sun": null
}
},
"timezone": {
"name": "Europe/Berlin",
"short": "CET",
"offset": "+01:00"
},
"is_address_hidden": false,
"address": {
"address_1": "Musterstraße 123",
"city": "Berlin",
"postal_code": "12345",
"apt": "Wohnung 4B",
"position": {
"lat": 52.5200066,
"lng": 13.404954
}
}
}
],
"links": {
"first": "https://my.easyweek.io/api/public/v2/locations?page=1",
"last": "https://my.easyweek.io/api/public/v2/locations?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "&laquo; Previous",
"active": false
},
{
"url": "https://my.easyweek.io/api/public/v2/locations?page=1",
"label": "1",
"active": true
},
{
"url": null,
"label": "Next &raquo;",
"active": false
}
],
"path": "https://my.easyweek.io/api/public/v2/locations",
"per_page": 15,
"to": 1,
"total": 1
}
}