/**
* Samsara API
* # Overview Something new! Welcome Samsara\'s new and improved API. Check out our FAQ [here](https://developers.samsara.com/docs/introducing-our-next-generation-api) to see what\'s changed and learn how to get started.
Want to access the legacy API docs? You can find them [here](https://www.samsara.com/api-legacy).
*Note: Because this is a new set of APIs, we have not transitioned all endpoints over to this standard. Endpoints that still use the legacy standards are indicated in the reference documentation. If you can\'t find an API that you\'re looking for, we encourage you to look for it in our [legacy API docs](https://www.samsara.com/api-legacy) as we continue to transition all endpoints over. Check back here for updates!*
Submit your feedback [here](https://forms.gle/r4bs6HQshQAvBuwv6)! Samsara provides API endpoints so that you can build powerful applications and custom solutions with sensor data. Samsara has endpoints available to track and analyze sensors, vehicles, and entire fleets. The Samsara API is a [RESTful API](https://en.wikipedia.org/wiki/Representational_state_transfer). It uses standard [HTTP](https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol) authentication, verbs, and response codes, and it returns [JSON](http://www.json.org/) response bodies. If you\'re familiar with what you can build with a REST API, then this will be your go-to API reference. Visit [developers.samsara.com](https://developers.samsara.com) to find getting started guides and an API overview. If you have any questions, please visit https://samsara.com/help. ## Endpoints All our APIs can be accessed through HTTP requests to URLs like: ``` https://api.samsara.com/ ``` For EU customers, this URL will be: ``` https://api.eu.samsara.com/ ``` Note Legacy endpoints will have the URL: `https://api.samsara.com/v1/` or `https://api.eu.samsara.com/v1/` ## Authentication To authenticate your API request you will need to include your secret token. You can manage your API tokens in the [Dashboard](https://cloud.samsara.com). They are visible under `Settings->Organization->API Tokens`. Your API tokens carry many privileges, so be sure to keep them secure. Do not share your secret API tokens in publicly accessible areas such as GitHub, client-side code, and so on. Authentication to the API is performed via Bearer Token in the HTTP Authorization header. Provide your API token as the `access_token` value in an `Authorization: Bearer` header. You do not need to provide a password: ```curl Authorization: Bearer {access_token} ``` All API requests must be made over [HTTPS](https://en.wikipedia.org/wiki/HTTPS). Calls made over plain HTTP or without authentication will fail. ### OAuth2 If building an application for our marketplace, our API is accessible via. OAuth2 as well. | Type | Value | | ------------- |:-------------:| | Security scheme | OAuth2 | | OAuth2 Flow | accessCode | | Authorization URL | https://api.samsara.com/oauth2/authorize | | Token URL | https://api.samsara.com/oauth2/token | ## Common Patterns You can find more info about request methods, response codes, error codes, versioning, pagination, timestamps, and mini-objects [here](https://developers.samsara.com/docs/common-structures).
*
* The version of the OpenAPI document: 2024-11-18
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import type { Configuration } from '../configuration';
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
import { RequestArgs, BaseAPI } from '../base';
import { InlineObject } from '../samsara-models';
import { RoutesCreateRouteRequestBody } from '../samsara-models';
import { RoutesCreateRouteResponseBody } from '../samsara-models';
import { RoutesFetchRouteResponseBody } from '../samsara-models';
import { RoutesFetchRoutesResponseBody } from '../samsara-models';
import { RoutesGetRoutesFeedResponseBody } from '../samsara-models';
import { RoutesPatchRouteRequestBody } from '../samsara-models';
import { RoutesPatchRouteResponseBody } from '../samsara-models';
/**
* RoutesApi - axios parameter creator
* @export
*/
export declare const RoutesApiAxiosParamCreator: (configuration?: Configuration) => {
/**
* Create a route. The legacy version of this endpoint can be found at [samsara.com/api-legacy](https://www.samsara.com/api-legacy#operation/createDispatchRoute). 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.
* @summary Create a route
* @param {RoutesCreateRouteRequestBody} createRouteRequestBody
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createRoute: (createRouteRequestBody: RoutesCreateRouteRequestBody, options?: RawAxiosRequestConfig) => Promise;
/**
* Delete a dispatch route and its associated stops. 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.
* @summary Delete a route.
* @param {string} id ID of the route. This can either be the Samsara-specified ID, or an external ID. External IDs are customer specified key-value pairs created in the POST or PATCH requests of this resource. To specify an external ID as part of a path parameter, use the following format: `key:value`. For example, `payrollId:ABFS18600`
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteRoute: (id: string, options?: RawAxiosRequestConfig) => Promise;
/**
* Returns a single route. The legacy version of this endpoint can be found at [samsara.com/api-legacy](https://www.samsara.com/api-legacy#operation/getDispatchRouteById). Rate limit: 25 requests/sec (learn more about rate limits here). To use this endpoint, select **Read 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.
* @summary Fetch a route
* @param {string} id ID of the route. This can either be the Samsara-specified ID, or an external ID. External IDs are customer specified key-value pairs created in the POST or PATCH requests of this resource. To specify an external ID as part of a path parameter, use the following format: `key:value`. For example, `payrollId:ABFS18600`
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
fetchRoute: (id: string, options?: RawAxiosRequestConfig) => Promise;
/**
* Returns multiple routes. The legacy version of this endpoint can be found at [samsara.com/api-legacy](https://www.samsara.com/api-legacy#operation/fetchAllDispatchRoutes). Rate limit: 5 requests/sec (learn more about rate limits here). To use this endpoint, select **Read 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.
* @summary Fetch all routes
* @param {string} startTime A start time in RFC 3339 format. Defaults to now if not provided. Millisecond precision and timezones are supported. (Examples: 2019-06-13T19:08:25Z, 2019-06-13T19:08:25.455Z, OR 2015-09-15T14:00:12-04:00).
* @param {string} endTime An end time in RFC 3339 format. Defaults to now if not provided. Millisecond precision and timezones are supported. (Examples: 2019-06-13T19:08:25Z, 2019-06-13T19:08:25.455Z, OR 2015-09-15T14:00:12-04:00).
* @param {number} [limit] The limit for how many objects will be in the response. Default and max for this value is 512 objects.
* @param {string} [after] If specified, this should be the endCursor value 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.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
fetchRoutes: (startTime: string, endTime: string, limit?: number, after?: string, options?: RawAxiosRequestConfig) => Promise;
/**
* Subscribes to a feed of immutable, append-only updates for routes. The initial request to this feed endpoint returns a cursor, which can be used on the next request to fetch updated routes that have had state changes since that request. The legacy version of this endpoint can be found at [samsara.com/api-legacy](https://www.samsara.com/api-legacy#operation/fetchAllRouteJobUpdates). Rate limit: 5 requests/sec (learn more about rate limits here). To use this endpoint, select **Read 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.
* @summary Get route updates
* @param {string} [after] If specified, this should be the endCursor value 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.
* @param {GetRoutesFeedExpandEnum} [expand] Expands the specified value(s) in the response object. Expansion populates additional fields in an object, if supported. Unsupported fields are ignored. To expand multiple fields, input a comma-separated list. Valid value: `route` Valid values: `route`
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getRoutesFeed: (after?: string, expand?: GetRoutesFeedExpandEnum, options?: RawAxiosRequestConfig) => Promise;
/**
* Update a route. **Note** this implementation of patch uses [the JSON merge patch](https://tools.ietf.org/html/rfc7396) proposed standard. This means that any fields included in the patch request will _overwrite_ fields which exist on the target resource. For arrays, this means any array included in the request will _replace_ the array that exists at the specified path, it will not _add_ to the existing array. The legacy version of this endpoint (which uses PUT instead of PATCH) can be found at [samsara.com/api-legacy](https://www.samsara.com/api-legacy#operation/updateDispatchRouteById). 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.
* @summary Update a route
* @param {string} id ID of the route. This can either be the Samsara-specified ID, or an external ID. External IDs are customer specified key-value pairs created in the POST or PATCH requests of this resource. To specify an external ID as part of a path parameter, use the following format: `key:value`. For example, `payrollId:ABFS18600`
* @param {RoutesPatchRouteRequestBody} patchRouteRequestBody
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
patchRoute: (id: string, patchRouteRequestBody: RoutesPatchRouteRequestBody, options?: RawAxiosRequestConfig) => Promise;
/**
* This endpoint is still on our legacy API. Delete a dispatch route and its associated jobs. **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. To use this endpoint, select **Write Routes** under the Driver Workflow category when creating or editing an API token. Learn More.
* @summary Delete a route
* @param {string} routeIdOrExternalId ID of the route. This can either be the Samsara-specified ID, or an external ID. External IDs are customer specified key-value pairs created in the POST or PATCH requests of this resource. To specify an external ID as part of a path parameter, use the following format: `key:value`. For example, `payrollId:ABFS18600`
* @param {InlineObject} [applyToFutureRoutes]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
v1deleteDispatchRouteById: (routeIdOrExternalId: string, applyToFutureRoutes?: InlineObject, options?: RawAxiosRequestConfig) => Promise;
};
/**
* RoutesApi - functional programming interface
* @export
*/
export declare const RoutesApiFp: (configuration?: Configuration) => {
/**
* Create a route. The legacy version of this endpoint can be found at [samsara.com/api-legacy](https://www.samsara.com/api-legacy#operation/createDispatchRoute). 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.
* @summary Create a route
* @param {RoutesCreateRouteRequestBody} createRouteRequestBody
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createRoute(createRouteRequestBody: RoutesCreateRouteRequestBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>;
/**
* Delete a dispatch route and its associated stops. 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.
* @summary Delete a route.
* @param {string} id ID of the route. This can either be the Samsara-specified ID, or an external ID. External IDs are customer specified key-value pairs created in the POST or PATCH requests of this resource. To specify an external ID as part of a path parameter, use the following format: `key:value`. For example, `payrollId:ABFS18600`
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteRoute(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>;
/**
* Returns a single route. The legacy version of this endpoint can be found at [samsara.com/api-legacy](https://www.samsara.com/api-legacy#operation/getDispatchRouteById). Rate limit: 25 requests/sec (learn more about rate limits here). To use this endpoint, select **Read 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.
* @summary Fetch a route
* @param {string} id ID of the route. This can either be the Samsara-specified ID, or an external ID. External IDs are customer specified key-value pairs created in the POST or PATCH requests of this resource. To specify an external ID as part of a path parameter, use the following format: `key:value`. For example, `payrollId:ABFS18600`
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
fetchRoute(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>;
/**
* Returns multiple routes. The legacy version of this endpoint can be found at [samsara.com/api-legacy](https://www.samsara.com/api-legacy#operation/fetchAllDispatchRoutes). Rate limit: 5 requests/sec (learn more about rate limits here). To use this endpoint, select **Read 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.
* @summary Fetch all routes
* @param {string} startTime A start time in RFC 3339 format. Defaults to now if not provided. Millisecond precision and timezones are supported. (Examples: 2019-06-13T19:08:25Z, 2019-06-13T19:08:25.455Z, OR 2015-09-15T14:00:12-04:00).
* @param {string} endTime An end time in RFC 3339 format. Defaults to now if not provided. Millisecond precision and timezones are supported. (Examples: 2019-06-13T19:08:25Z, 2019-06-13T19:08:25.455Z, OR 2015-09-15T14:00:12-04:00).
* @param {number} [limit] The limit for how many objects will be in the response. Default and max for this value is 512 objects.
* @param {string} [after] If specified, this should be the endCursor value 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.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
fetchRoutes(startTime: string, endTime: string, limit?: number, after?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>;
/**
* Subscribes to a feed of immutable, append-only updates for routes. The initial request to this feed endpoint returns a cursor, which can be used on the next request to fetch updated routes that have had state changes since that request. The legacy version of this endpoint can be found at [samsara.com/api-legacy](https://www.samsara.com/api-legacy#operation/fetchAllRouteJobUpdates). Rate limit: 5 requests/sec (learn more about rate limits here). To use this endpoint, select **Read 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.
* @summary Get route updates
* @param {string} [after] If specified, this should be the endCursor value 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.
* @param {GetRoutesFeedExpandEnum} [expand] Expands the specified value(s) in the response object. Expansion populates additional fields in an object, if supported. Unsupported fields are ignored. To expand multiple fields, input a comma-separated list. Valid value: `route` Valid values: `route`
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getRoutesFeed(after?: string, expand?: GetRoutesFeedExpandEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>;
/**
* Update a route. **Note** this implementation of patch uses [the JSON merge patch](https://tools.ietf.org/html/rfc7396) proposed standard. This means that any fields included in the patch request will _overwrite_ fields which exist on the target resource. For arrays, this means any array included in the request will _replace_ the array that exists at the specified path, it will not _add_ to the existing array. The legacy version of this endpoint (which uses PUT instead of PATCH) can be found at [samsara.com/api-legacy](https://www.samsara.com/api-legacy#operation/updateDispatchRouteById). 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.
* @summary Update a route
* @param {string} id ID of the route. This can either be the Samsara-specified ID, or an external ID. External IDs are customer specified key-value pairs created in the POST or PATCH requests of this resource. To specify an external ID as part of a path parameter, use the following format: `key:value`. For example, `payrollId:ABFS18600`
* @param {RoutesPatchRouteRequestBody} patchRouteRequestBody
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
patchRoute(id: string, patchRouteRequestBody: RoutesPatchRouteRequestBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>;
/**
* This endpoint is still on our legacy API. Delete a dispatch route and its associated jobs. **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. To use this endpoint, select **Write Routes** under the Driver Workflow category when creating or editing an API token. Learn More.
* @summary Delete a route
* @param {string} routeIdOrExternalId ID of the route. This can either be the Samsara-specified ID, or an external ID. External IDs are customer specified key-value pairs created in the POST or PATCH requests of this resource. To specify an external ID as part of a path parameter, use the following format: `key:value`. For example, `payrollId:ABFS18600`
* @param {InlineObject} [applyToFutureRoutes]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
v1deleteDispatchRouteById(routeIdOrExternalId: string, applyToFutureRoutes?: InlineObject, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>;
};
/**
* RoutesApi - factory interface
* @export
*/
export declare const RoutesApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
/**
* Create a route. The legacy version of this endpoint can be found at [samsara.com/api-legacy](https://www.samsara.com/api-legacy#operation/createDispatchRoute). 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.
* @summary Create a route
* @param {RoutesApiCreateRouteRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createRoute(requestParameters: RoutesApiCreateRouteRequest, options?: RawAxiosRequestConfig): AxiosPromise;
/**
* Delete a dispatch route and its associated stops. 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.
* @summary Delete a route.
* @param {RoutesApiDeleteRouteRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteRoute(requestParameters: RoutesApiDeleteRouteRequest, options?: RawAxiosRequestConfig): AxiosPromise;
/**
* Returns a single route. The legacy version of this endpoint can be found at [samsara.com/api-legacy](https://www.samsara.com/api-legacy#operation/getDispatchRouteById). Rate limit: 25 requests/sec (learn more about rate limits here). To use this endpoint, select **Read 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.
* @summary Fetch a route
* @param {RoutesApiFetchRouteRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
fetchRoute(requestParameters: RoutesApiFetchRouteRequest, options?: RawAxiosRequestConfig): AxiosPromise;
/**
* Returns multiple routes. The legacy version of this endpoint can be found at [samsara.com/api-legacy](https://www.samsara.com/api-legacy#operation/fetchAllDispatchRoutes). Rate limit: 5 requests/sec (learn more about rate limits here). To use this endpoint, select **Read 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.
* @summary Fetch all routes
* @param {RoutesApiFetchRoutesRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
fetchRoutes(requestParameters: RoutesApiFetchRoutesRequest, options?: RawAxiosRequestConfig): AxiosPromise;
/**
* Subscribes to a feed of immutable, append-only updates for routes. The initial request to this feed endpoint returns a cursor, which can be used on the next request to fetch updated routes that have had state changes since that request. The legacy version of this endpoint can be found at [samsara.com/api-legacy](https://www.samsara.com/api-legacy#operation/fetchAllRouteJobUpdates). Rate limit: 5 requests/sec (learn more about rate limits here). To use this endpoint, select **Read 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.
* @summary Get route updates
* @param {RoutesApiGetRoutesFeedRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getRoutesFeed(requestParameters?: RoutesApiGetRoutesFeedRequest, options?: RawAxiosRequestConfig): AxiosPromise;
/**
* Update a route. **Note** this implementation of patch uses [the JSON merge patch](https://tools.ietf.org/html/rfc7396) proposed standard. This means that any fields included in the patch request will _overwrite_ fields which exist on the target resource. For arrays, this means any array included in the request will _replace_ the array that exists at the specified path, it will not _add_ to the existing array. The legacy version of this endpoint (which uses PUT instead of PATCH) can be found at [samsara.com/api-legacy](https://www.samsara.com/api-legacy#operation/updateDispatchRouteById). 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.
* @summary Update a route
* @param {RoutesApiPatchRouteRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
patchRoute(requestParameters: RoutesApiPatchRouteRequest, options?: RawAxiosRequestConfig): AxiosPromise;
/**
* This endpoint is still on our legacy API. Delete a dispatch route and its associated jobs. **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. To use this endpoint, select **Write Routes** under the Driver Workflow category when creating or editing an API token. Learn More.
* @summary Delete a route
* @param {RoutesApiV1deleteDispatchRouteByIdRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
v1deleteDispatchRouteById(requestParameters: RoutesApiV1deleteDispatchRouteByIdRequest, options?: RawAxiosRequestConfig): AxiosPromise;
};
/**
* Request parameters for createRoute operation in RoutesApi.
* @export
* @interface RoutesApiCreateRouteRequest
*/
export interface RoutesApiCreateRouteRequest {
/**
*
* @type {RoutesCreateRouteRequestBody}
* @memberof RoutesApiCreateRoute
*/
readonly createRouteRequestBody: RoutesCreateRouteRequestBody;
}
/**
* Request parameters for deleteRoute operation in RoutesApi.
* @export
* @interface RoutesApiDeleteRouteRequest
*/
export interface RoutesApiDeleteRouteRequest {
/**
* ID of the route. This can either be the Samsara-specified ID, or an external ID. External IDs are customer specified key-value pairs created in the POST or PATCH requests of this resource. To specify an external ID as part of a path parameter, use the following format: `key:value`. For example, `payrollId:ABFS18600`
* @type {string}
* @memberof RoutesApiDeleteRoute
*/
readonly id: string;
}
/**
* Request parameters for fetchRoute operation in RoutesApi.
* @export
* @interface RoutesApiFetchRouteRequest
*/
export interface RoutesApiFetchRouteRequest {
/**
* ID of the route. This can either be the Samsara-specified ID, or an external ID. External IDs are customer specified key-value pairs created in the POST or PATCH requests of this resource. To specify an external ID as part of a path parameter, use the following format: `key:value`. For example, `payrollId:ABFS18600`
* @type {string}
* @memberof RoutesApiFetchRoute
*/
readonly id: string;
}
/**
* Request parameters for fetchRoutes operation in RoutesApi.
* @export
* @interface RoutesApiFetchRoutesRequest
*/
export interface RoutesApiFetchRoutesRequest {
/**
* A start time in RFC 3339 format. Defaults to now if not provided. Millisecond precision and timezones are supported. (Examples: 2019-06-13T19:08:25Z, 2019-06-13T19:08:25.455Z, OR 2015-09-15T14:00:12-04:00).
* @type {string}
* @memberof RoutesApiFetchRoutes
*/
readonly startTime: string;
/**
* An end time in RFC 3339 format. Defaults to now if not provided. Millisecond precision and timezones are supported. (Examples: 2019-06-13T19:08:25Z, 2019-06-13T19:08:25.455Z, OR 2015-09-15T14:00:12-04:00).
* @type {string}
* @memberof RoutesApiFetchRoutes
*/
readonly endTime: string;
/**
* The limit for how many objects will be in the response. Default and max for this value is 512 objects.
* @type {number}
* @memberof RoutesApiFetchRoutes
*/
readonly limit?: number;
/**
* If specified, this should be the endCursor value 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.
* @type {string}
* @memberof RoutesApiFetchRoutes
*/
readonly after?: string;
}
/**
* Request parameters for getRoutesFeed operation in RoutesApi.
* @export
* @interface RoutesApiGetRoutesFeedRequest
*/
export interface RoutesApiGetRoutesFeedRequest {
/**
* If specified, this should be the endCursor value 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.
* @type {string}
* @memberof RoutesApiGetRoutesFeed
*/
readonly after?: string;
/**
* Expands the specified value(s) in the response object. Expansion populates additional fields in an object, if supported. Unsupported fields are ignored. To expand multiple fields, input a comma-separated list. Valid value: `route` Valid values: `route`
* @type {'route'}
* @memberof RoutesApiGetRoutesFeed
*/
readonly expand?: GetRoutesFeedExpandEnum;
}
/**
* Request parameters for patchRoute operation in RoutesApi.
* @export
* @interface RoutesApiPatchRouteRequest
*/
export interface RoutesApiPatchRouteRequest {
/**
* ID of the route. This can either be the Samsara-specified ID, or an external ID. External IDs are customer specified key-value pairs created in the POST or PATCH requests of this resource. To specify an external ID as part of a path parameter, use the following format: `key:value`. For example, `payrollId:ABFS18600`
* @type {string}
* @memberof RoutesApiPatchRoute
*/
readonly id: string;
/**
*
* @type {RoutesPatchRouteRequestBody}
* @memberof RoutesApiPatchRoute
*/
readonly patchRouteRequestBody: RoutesPatchRouteRequestBody;
}
/**
* Request parameters for v1deleteDispatchRouteById operation in RoutesApi.
* @export
* @interface RoutesApiV1deleteDispatchRouteByIdRequest
*/
export interface RoutesApiV1deleteDispatchRouteByIdRequest {
/**
* ID of the route. This can either be the Samsara-specified ID, or an external ID. External IDs are customer specified key-value pairs created in the POST or PATCH requests of this resource. To specify an external ID as part of a path parameter, use the following format: `key:value`. For example, `payrollId:ABFS18600`
* @type {string}
* @memberof RoutesApiV1deleteDispatchRouteById
*/
readonly routeIdOrExternalId: string;
/**
*
* @type {InlineObject}
* @memberof RoutesApiV1deleteDispatchRouteById
*/
readonly applyToFutureRoutes?: InlineObject;
}
/**
* RoutesApi - object-oriented interface
* @export
* @class RoutesApi
* @extends {BaseAPI}
*/
export declare class RoutesApi extends BaseAPI {
/**
* Create a route. The legacy version of this endpoint can be found at [samsara.com/api-legacy](https://www.samsara.com/api-legacy#operation/createDispatchRoute). 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.
* @summary Create a route
* @param {RoutesApiCreateRouteRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof RoutesApi
*/
createRoute(requestParameters: RoutesApiCreateRouteRequest, options?: RawAxiosRequestConfig): Promise>;
/**
* Delete a dispatch route and its associated stops. 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.
* @summary Delete a route.
* @param {RoutesApiDeleteRouteRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof RoutesApi
*/
deleteRoute(requestParameters: RoutesApiDeleteRouteRequest, options?: RawAxiosRequestConfig): Promise>;
/**
* Returns a single route. The legacy version of this endpoint can be found at [samsara.com/api-legacy](https://www.samsara.com/api-legacy#operation/getDispatchRouteById). Rate limit: 25 requests/sec (learn more about rate limits here). To use this endpoint, select **Read 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.
* @summary Fetch a route
* @param {RoutesApiFetchRouteRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof RoutesApi
*/
fetchRoute(requestParameters: RoutesApiFetchRouteRequest, options?: RawAxiosRequestConfig): Promise>;
/**
* Returns multiple routes. The legacy version of this endpoint can be found at [samsara.com/api-legacy](https://www.samsara.com/api-legacy#operation/fetchAllDispatchRoutes). Rate limit: 5 requests/sec (learn more about rate limits here). To use this endpoint, select **Read 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.
* @summary Fetch all routes
* @param {RoutesApiFetchRoutesRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof RoutesApi
*/
fetchRoutes(requestParameters: RoutesApiFetchRoutesRequest, options?: RawAxiosRequestConfig): Promise>;
/**
* Subscribes to a feed of immutable, append-only updates for routes. The initial request to this feed endpoint returns a cursor, which can be used on the next request to fetch updated routes that have had state changes since that request. The legacy version of this endpoint can be found at [samsara.com/api-legacy](https://www.samsara.com/api-legacy#operation/fetchAllRouteJobUpdates). Rate limit: 5 requests/sec (learn more about rate limits here). To use this endpoint, select **Read 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.
* @summary Get route updates
* @param {RoutesApiGetRoutesFeedRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof RoutesApi
*/
getRoutesFeed(requestParameters?: RoutesApiGetRoutesFeedRequest, options?: RawAxiosRequestConfig): Promise>;
/**
* Update a route. **Note** this implementation of patch uses [the JSON merge patch](https://tools.ietf.org/html/rfc7396) proposed standard. This means that any fields included in the patch request will _overwrite_ fields which exist on the target resource. For arrays, this means any array included in the request will _replace_ the array that exists at the specified path, it will not _add_ to the existing array. The legacy version of this endpoint (which uses PUT instead of PATCH) can be found at [samsara.com/api-legacy](https://www.samsara.com/api-legacy#operation/updateDispatchRouteById). 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.
* @summary Update a route
* @param {RoutesApiPatchRouteRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof RoutesApi
*/
patchRoute(requestParameters: RoutesApiPatchRouteRequest, options?: RawAxiosRequestConfig): Promise>;
/**
* This endpoint is still on our legacy API. Delete a dispatch route and its associated jobs. **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. To use this endpoint, select **Write Routes** under the Driver Workflow category when creating or editing an API token. Learn More.
* @summary Delete a route
* @param {RoutesApiV1deleteDispatchRouteByIdRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof RoutesApi
*/
v1deleteDispatchRouteById(requestParameters: RoutesApiV1deleteDispatchRouteByIdRequest, options?: RawAxiosRequestConfig): Promise>;
}
/**
* @export
*/
export declare const GetRoutesFeedExpandEnum: {
readonly Route: "route";
};
export type GetRoutesFeedExpandEnum = typeof GetRoutesFeedExpandEnum[keyof typeof GetRoutesFeedExpandEnum];