v1

latestOpenAPI 3.0.02026-07-24161215397.4 KB
Locations

Retrieve all locations.

Retrieve all locations.

Required scopes: flex.space.locations.read

get/api/v2/organizations/{orgSlug}/locations

Path parameters

orgSlugstring required

organization slug

Query parameters

_idstring
Example:603dfbc260f4054084125d39

Filter by location id.

namestring
Example:Location 1

Filter by exact name of the location.

isOpenboolean
Example:true

Filter by the open status of the location. If true, the location is operational; if false or omitted the location is not working - either not open yet, or suspended for some other reason.

isPublicboolean
Example:true

Filter by the public status of the location. If true, the location is shown in the members portal; if false or omitted the location is not displayed in the members portal.

modifiedAtstring
Example:modifiedAt[$gte]=YYYY-MM-DDTHH:mm:ssZ

Filter by the modified date. Supports date comparison filters: $gt, $gte, $lt, $lte

createdAtstring
Example:createdAt[$gte]=YYYY-MM-DDTHH:mm:ssZ

Support date comparison filters: $gt, $gte, $lt, $lte

$selectstring
Example:recipient,sender

Select fields to return

$cursorNextstring
$cursorPrevstring
$limitnumber

Response

rangeStartnumber
rangeEndnumber
cursorNextstring
cursorPrevstring

Example response

{
  "results": [
    {
      "properties": {
        "customProperty1": "value1",
        "customProperty2": "value2"
      },
      "_id": "603dfbc260f4054084125d39",
      "name": "Location 1",
      "address": {
        "formattedAddress": "123 Main St",
        "country": "United States",
        "state": "California",
        "city": "San Francisco",
        "street": "Main St",
        "zip": "94105",
        "latitude": "37.7749",
        "longitude": "-122.4194"
      },
      "timezone": "UTC",
      "isOpen": true,
      "isPublic": true,
      "image": "//example.com/image.jpg",
      "code": "LOC123",
      "targetRevenuePerPeriod": [
        {
          "startDate": "2024-01-01T00:00:00.000Z",
          "endDate": "2024-12-31T23:59:59.999Z",
          "target": 50000
        }
      ]
    }
  ]
}