Create new locations.
Rate limit: 100 requests/min (learn more about rate limits here).
To use this endpoint, select Write Routes under the Driver Workflow category when creating or editing an API token. Learn More.
Submit Feedback: Likes, dislikes, and API feature requests should be filed as feedback in our API feedback form. If you encountered an issue or noticed inaccuracies in the API documentation, please submit a case to our support team.
curl --request POST \
--url https://api.samsara.com/hub/locations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"data": [
{
"address": "123 Industrial Blvd, Los Angeles, CA 90210, US",
"customerLocationId": "LOC-123",
"driverInstructions": "sample instructions",
"hubId": "550e8400-e29b-41d4-a716-446655440000",
"isDepot": false,
"latitude": 34.0522,
"longitude": -118.2437,
"name": "Customer ABC Warehouse",
"plannerNotes": "sample note",
"serviceTimeSeconds": 1800,
"serviceWindows": [
{
"daysOfWeek": [
"monday",
"tuesday",
"wednesday",
"thursday",
"friday"
],
"endTime": "17:00:00",
"startTime": "08:00:00"
}
],
"skillsRequired": [
"650e8400-e29b-41d4-a716-446655440001"
]
}
]
}
'{
"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"
}
]
}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.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Request body for creating hub locations
An array of location objects to be created or updated
Show child attributes
OK response.
Created hub locations data
Show child attributes
curl --request POST \
--url https://api.samsara.com/hub/locations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"data": [
{
"address": "123 Industrial Blvd, Los Angeles, CA 90210, US",
"customerLocationId": "LOC-123",
"driverInstructions": "sample instructions",
"hubId": "550e8400-e29b-41d4-a716-446655440000",
"isDepot": false,
"latitude": 34.0522,
"longitude": -118.2437,
"name": "Customer ABC Warehouse",
"plannerNotes": "sample note",
"serviceTimeSeconds": 1800,
"serviceWindows": [
{
"daysOfWeek": [
"monday",
"tuesday",
"wednesday",
"thursday",
"friday"
],
"endTime": "17:00:00",
"startTime": "08:00:00"
}
],
"skillsRequired": [
"650e8400-e29b-41d4-a716-446655440001"
]
}
]
}
'{
"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"
}
]
}