Asynchronous Snap to Roads Status
Purpose
This endpoint lets clients check the status of a job they submitted.
Run this endpoint
You can easily run this and other endpoints. Go to the TomTom API Explorer page and follow the directions.
Request data
HTTPS method: GET
For ease of viewing and identification:
- Constants and parameters enclosed in curly brackets { } must be replaced with their values.
- Please see the following Request parameters section with the required and optional parameters tables for their values. The generic request format is as follows.
https://{baseURL}/snapToRoads/batch/{versionNumber}/{batchID}/status?key={Your_API_Key}
https://api.tomtom.com/snapToRoads/batch/1/b4086eb3-dead-beef-afbf-cc521fe1d9d8/status?key={Your_API_Key}
curl -X GET 'https://api.tomtom.com/snapToRoads/batch/1/b4086eb3-dead-beef-afbf-cc521fe1d9d8/status?key={Your_API_Key}'
Request parameters
The following table describes the parameters that can be used in a request.
- Required parameters must be used or the call will fail.
- Parameters and values are case-sensitive.
- Optional parameters may be used.
Note: There are no optional parameters in this endpoint.
Required parameters | Description |
---|---|
| The base URL for calling TomTom services. |
| The version of the service to call. |
| A unique batch id is available inside the body of a successful Asynchronous Snap To Roads Status response. |
| The authorization key for access to the API. |
HTTP request headers
The following table lists HTTP request headers of particular interest to clients of the Asynchronous Snap to Roads Status endpoint.
Note: There are no required headers in this endpoint.
Optional headers | Description |
---|---|
Contains the content encoding (usually a compression algorithm), that
the client is able to understand. | |
Tracking-ID | Specifies an identifier for the request.
Value: |
Response data
Snap To Roads Status response schema
Exclamation mark !
means that the field is not nullable. For example:
String!
- is non-nullable[String!]
- list of non-null objects[String]!
- list cannot be null, but it can contain null values
1type BatchResponse {2 state: BatchStatus3 statistics: BatchStatusStatistics!4}56enum BatchStatus {7 Submitted8 Completed9}1011type BatchStatistics {12 successes: Int!13 totalCount: Int!14}
Response field structure
The following tables describe JSON element fields that can appear in a response.
Structure of the BatchResponse object | |
---|---|
Field | Description |
| Indicates the current status of the Asynchronous Snap To Roads Status request. |
| Contains statistics of the Asynchronous Snap To Roads Status request. |
Structure of the BatchStatus object | |
---|---|
Field | Description |
| Indicates that processing is not complete. |
| Indicates that processing is complete. |
Structure of the BatchStatusStatistics object | |
---|---|
Field | Description |
| Number of successfully processed queries. |
| Number of submitted queries. |
Successful response
For a valid Asynchronous Snap To Roads Status request, the endpoint returns its response body in JSON format.
1{2"state": "Completed",3 "statistics": {4 "totalCount": 1,5 "successes": 16}7}
Error response
The Asynchronous Snap to Roads Status endpoint, for an invalid single request, returns a response body in JSON format.
1{2 "detailedError": {3 "code": "INVALID_REQUEST",4 "message": "Batch not found."5 }6}
Field | Description |
---|---|
| Main |
| One of a server-defined set of error codes. |
| A human-readable description of the error code. |
HTTP response codes
Code | Meaning & possible causes |
---|---|
| OK |
| Bad request |
| Forbidden: The supplied API Key is not valid for this request. |
| Method Not Allowed: The provided HTTP request method is known by the server, but is not supported by the target resource. |
| Too Many Requests: Too many requests were sent in a given amount of time for the supplied API Key. |
| Internal Server Error |
| Service currently unavailable: The service is currently unavailable. |
| Service Not Found: Unknown version of the service. |
HTTP response headers
The following data table lists HTTP response headers of particular interest to clients of the Asynchronous Snap to Roads Status endpoint.
Header | Description |
---|---|
Indicates that cross-origin resource sharing (CORS) is allowed. | |
Lists the set of supported HTTP methods. The header is sent in case a
| |
Indicates which encodings were applied to the response body. | |
Contains information about the size of the response body. | |
Indicates the media type of the resource returned. | |
Contains the date and time at which the message was originated. For
details check
RFC 7231. | |
Tracking-ID | An identifier for the request.
Value: |