Skip to main content
GET
/
hub
/
locations
List locations for a specific hub
curl --request GET \
  --url https://api.samsara.com/hub/locations \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "address": "123 Industrial Blvd, Los Angeles, CA 90210, US",
      "createdAt": "2024-01-15T10:30:00Z",
      "customerLocationId": "LOC-123",
      "driverInstructions": "sample instructions",
      "hubId": "550e8400-e29b-41d4-a716-446655440000",
      "id": "750e8400-e29b-41d4-a716-446655440002",
      "isDepot": false,
      "latitude": 34.0522,
      "longitude": -118.2437,
      "name": "Customer ABC Warehouse",
      "plannerNotes": "sample note",
      "serviceTimeSeconds": 1800,
      "serviceWindows": [
        {
          "daysOfWeek": [
            "monday",
            "monday",
            "monday",
            "monday"
          ],
          "endTime": "17:00:00",
          "startTime": "08:00:00"
        }
      ],
      "skillsRequired": [
        {
          "id": "650e8400-e29b-41d4-a716-446655440001",
          "name": "Heavy Lifting"
        }
      ],
      "updatedAt": "2024-01-15T10:30:00Z"
    }
  ],
  "pagination": {
    "hasNextPage": false,
    "endCursor": "YXJyYXljb25uZWN0aW9uOjEwMA=="
  }
}

Documentation Index

Fetch the complete documentation index at: https://samsara-showcase.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

hubId
string
required

The hub identifier

locationIds
string

A comma-separated list of location IDs that can be used for filtering

customerLocationIds
string

A comma-separated list of customer provided location IDs that can be used for filtering

startTime
string<date-time>

Time filter of when the location was updated, in RFC 3339 format

endTime
string<date-time>

Time filter of when the location was updated, in RFC 3339 format

after
string

If specified, should be the endCursor from the previous page of results. When present, this request will return the next page of results that occur immediately after the previous page of results.

limit
integer
default:100

Maximum number of objects to return. Default and maximum is 100

Required range: x <= 100

Response

OK response.

data
object[]
required

Hub locations data

pagination
object
required

Pagination information