openapi: 3.2.0 info: title: Pavement Conditions Logistics API version: 2.0.2 description: "The Pavement Conditions API v2 offers users pavement temperature and condition details for road segments in a specified area with enhanced GeoJSON support and pagination. DTN supplies road data on segments across North America and Europe, allowing users to request data for a geographic area or specific roadway within the database.\n\n**What's New in v2.0.2:**\n- Route Generation \n \n — A new `GET /v2/directions` endpoint generates route geometry via the Mapbox Directions API.\n\n- Query Pavement Conditions Along a Route or Route-Based Filtering (RB Filter)\n\n - Pavement data can be filtered using either `startPoint` and `endPoint` coordinates or a GeoJSON geometry provided in the request body.\n - When `startPoint` and `endPoint` are supplied to the `v2/logistics` or `v2/pavement/conditions` endpoints, a route is automatically generated internally via the Mapbox API.\n - Pagination is determined by the number of route `segments` when RB Filter is active.\n - Each paginated response includes a `statistics` object summarizing covered, uncovered, and total segment counts.\n - Results may be optionally narrowed by a weather `parameter` filter.\n - Results may also be optionally narrowed by Estimated Time of Arrival (`etaFilter`).\n\n- Added pavementValidEndTime in returned data\n\n**Authentication**: This API uses Bearer token authentication. When obtaining your access token, use the following audience values:\n- **Production**: `https://pavement-condition.prd.wx.zones.dtn.com`\n- **Staging**: `https://pavement-condition.stg.wx.zones.dtn.com`" contact: name: Ben Hershey url: https://pavement-condition.prd.wx.zones.dtn.com email: ben.hershey@dtn.com servers: - url: https://pavement-condition.prd.wx.zones.dtn.com/v2 description: Production server - url: https://pavement-condition.stg.wx.zones.dtn.com/v2 description: Staging server tags: - name: Logistics description: Logistics-focused pavement data endpoints paths: /logistics: get: tags: - Logistics summary: Get Logistics Data description: "Retrieves logistics-focused pavement data in GeoJSON FeatureCollection format. Returns up to 1000 records by default.\nData is grouped by segment ID with pagination metadata included in the response.\n\n**Query modes:**\n- By bounding box (`bbox`) — returns all segments within the area\n- By route (`startPoint` + `endPoint`) — uses Mapbox Directions API to generate a route, then returns segments along it\n\n**Filtering options:**\n- Pavement data can be filtered using either `startPoint` and `endPoint` coordinates or a bounding box (`bbox`).\n - Results may be optionally narrowed by a weather `parameter` filter.\n - Results may also be optionally narrowed by Estimated Time of Arrival (`etaFilter`).\n\n**Return Data:**\n\n| Field Name | Description | Imperial Unit | Metric Unit |\n| ---------- | ----------- | ------------- | ----------- |\n| id | Database table primary key ID | N/A | N/A |\n| segmentId | Road segment identifier (string) | N/A | N/A |\n| lat | Latitude for center point of road segment | Degrees | Degrees |\n| lon | Longitude for center point of road segment | Degrees | Degrees |\n| timestamp | Date/time for when the output variables are valid (UTC) | N/A | N/A |\n| pavementCreationTime | Date/time when the pavement model was run (UTC) | N/A | N/A |\n| pavementValidTime | Date/time for when the output variables are valid (UTC) | N/A | N/A |\n| pavementValidEndTime | Date/time for when the pavement forecast validity period ends (UTC) | N/A | N/A |\n| airTemp | Air temperature | Fahrenheit | Celsius |\n| visibility | Visibility distance | mi | km |\n| windDirection | Wind direction relative to true North (range from 0 to 360) | Degrees | Degrees |\n| windGust | Wind gust speed | mi/hr | km/hr |\n| windSpeed | Wind speed | mi/hr | km/hr |\n| iceRate | Ice precipitation rate | in/hr | mm/hr |\n| liquidRate | Liquid precipitation rate | in/hr | mm/hr |\n| snowRate | Snow precipitation rate | in/hr | mm/hr |\n| pavementTemperature | Temperature of the road surface | Fahrenheit | Celsius |\n| pavementCondition | Classification of the road condition. Possible conditions are dry, slush, chemical_wet, damp, wet, frost, ice, snow, compacted_snow | N/A | N/A |\n| crashRiskIndex | Crash risk factor compared to average conditions (ex: 2.0 means the risk of crash is two times the average) | N/A | N/A |\n| crashRiskUncertainty | One standard deviation on the crash risk factor (statistical error) | N/A | N/A |\n| roadName | Name of the road or highway | N/A | N/A |\n| osmClass | OpenStreetMap road classification (e.g., motorway, trunk, primary) | N/A | N/A |\n| geometry | GeoJSON geometry representing the road segment (LineString or MultiLineString) | N/A | N/A |\n| createdAt | Record creation timestamp | N/A | N/A |\n| updatedAt | Record last update timestamp | N/A | N/A |\n\n**Sample Requests:**\n\n1. **Get default data (1000 records):**\n ```\n GET /v2/logistics\n ```\n\n2. **Get data for specific geographic area (US):**\n ```\n GET /v2/logistics?bbox=-156.1317111,19.6270521,-155.9317111,19.8270521\n ```\n\n3. **Get data for European area:**\n ```\n GET /v2/logistics?bbox=3.555,49.470,6.262,50.849\n ```\n\n3. **Get specific page:**\n ```\n GET /v2/logistics?bbox=-156.1317111,19.6270521,-155.9317111,19.8270521&limit=1000&page=2\n ```\n\n4. **Filter by time range:**\n ```\n GET /v2/logistics?bbox=-156.1317111,19.6270521,-155.9317111,19.8270521&startTime=2025-12-04T20:00:00.000Z&endTime=2025-12-05T20:00:00.000Z\n ```\n\n5. **Get data in metric units:**\n ```\n GET /v2/logistics?units=metric\n ```\n\n6. **Route-based filtering with departure time:**\n ```\n GET /v2/logistics?startPoint=-93.3905,45.1310&endPoint=-93.2695,45.1420&departAt=2026-03-13T15:00:00.000Z\n ```\n\n7. **Route-based filtering with arrival time:**\n ```\n GET /v2/logistics?startPoint=-93.3905,45.1310&endPoint=-93.2695,45.1420&arriveAt=2026-03-13T16:00:00.000Z\n ```\n\n8. **Route-based with ETA filter (single forecast per segment):**\n ```\n GET /v2/logistics?startPoint=-93.3905,45.1310&endPoint=-93.2695,45.1420&departAt=2026-03-13T15:00:00.000Z&etaFilter=true\n ```\n\n9. **Route-based with parameter filter:**\n ```\n GET /v2/logistics?startPoint=-93.3905,45.1310&endPoint=-93.2695,45.1420&departAt=2026-03-13T15:00:00.000Z¶meter=crashRiskIndex,mobilityIndex\n ```\n" operationId: getLogisticsV2 parameters: - name: bbox in: query description: 'Bounding box coordinates to filter results by geographic area. Format: `minLongitude,minLatitude,maxLongitude,maxLatitude` ' required: false schema: type: string example: -156.1317111,19.6270521,-155.9317111,19.8270521 - name: limit in: query description: Maximum number of records to return. Default is 1000. required: false schema: type: integer default: 1000 example: 1000 - name: page in: query description: Page number for pagination. Default is 1. required: false schema: type: integer default: 1 example: 1 - name: startTime in: query description: 'Filter records with timestamp greater than or equal to this value. Format: ISO 8601 (YYYY-MM-DDTHH:mm:ss.sssZ) ' required: false schema: type: string format: date-time example: '2025-12-04T20:00:00.000Z' - name: endTime in: query description: 'Filter records with timestamp less than or equal to this value. Format: ISO 8601 (YYYY-MM-DDTHH:mm:ss.sssZ) ' required: false schema: type: string format: date-time example: '2025-12-05T20:00:00.000Z' - name: units in: query description: Unit system for response values. Default is imperial. required: false schema: type: string enum: - metric - imperial default: imperial - name: startPoint in: query description: 'Starting point coordinates for Mapbox route generation. Format: `longitude,latitude` ' required: false schema: type: string example: -93.3905,45.1310 - name: endPoint in: query description: 'Ending point coordinates for Mapbox route generation. Format: `longitude,latitude` ' required: false schema: type: string example: -93.2695,45.1420 - name: departAt in: query description: 'Departure time for the route. Mutually exclusive with `arriveAt`. When provided, the response includes per-feature `arrivalTime` and top-level `properties.arrivalTimeUTC`. Format: ISO 8601 (YYYY-MM-DDTHH:mm:ss.sssZ) ' required: false schema: type: string format: date-time example: '2026-03-13T15:00:00.000Z' - name: arriveAt in: query description: 'Desired arrival time at the destination. Mutually exclusive with `departAt`. When provided, the response includes per-feature `departureTime` and top-level `properties.departureTimeUTC`. Format: ISO 8601 (YYYY-MM-DDTHH:mm:ss.sssZ) ' required: false schema: type: string format: date-time example: '2026-03-13T16:00:00.000Z' - name: bufferMeters in: query description: Buffer distance in meters around the route for spatial query. Default is 5. required: false schema: type: integer default: 5 example: 5 - name: etaFilter in: query description: 'When true, filters condition data to only return the record matching the segment''s arrival time window. Requires `departAt` and either `startPoint`/`endPoint` or duration in body. ' required: false schema: type: boolean default: false example: true - name: parameter in: query description: 'Comma-separated list of field names to include in the response data. When provided, only the specified fields are returned per condition record. Use the /v2/parameters endpoint to see valid options. ' required: false schema: type: string example: crashRiskIndex,mobilityIndex responses: '200': description: Successful response with GeoJSON FeatureCollection and pagination metadata. content: application/json: schema: $ref: '#/components/schemas/LogisticsResponse' '400': description: Bad Request - Invalid units parameter content: application/json: schema: type: object properties: error: type: string example: error: Invalid unit. Allowed values are "metric" or "imperial". '401': $ref: '#/components/responses/UnauthorizedResponse' '403': $ref: '#/components/responses/ForbiddenResponse' '503': description: Service Unavailable - Data partition temporarily unavailable for the requested region. content: application/problem+json: schema: $ref: '#/components/schemas/Error' example: type: service-unavailable title: Backend or Database Unavailable status: 503 detail: 'No active partition available for domain: EuropeV2. No metadata entry found for key=active_folder_EuropeV2' instance: urn:dtn:one-transport-api:/v2/logistics:requestId:b0d7ac21-459c-45a5-ab6f-e09cea96cf9e error: No metadata entry found for key=active_folder_EuropeV2 security: - clientCredentials: [] post: tags: - Logistics summary: Get Logistics Data by Route description: "Retrieves logistics-focused pavement data along a route in GeoJSON FeatureCollection format.\nSupports two modes:\n\n**Option 1 - Mapbox waypoints (query params):**\nProvide `startPoint` and `endPoint` to automatically generate a route via Mapbox Directions API.\nOptionally provide `departAt` or `arriveAt` (mutually exclusive) for per-segment timing.\n\n**Option 2 - Direct route (body):**\nProvide a GeoJSON LineString or FeatureCollection in the request body.\n\n**Filtering options:**\n- Pavement data can be filtered using either `startPoint` and `endPoint` coordinates or a GeoJSON geometry provided in the request body.\n - Results may be optionally narrowed by a weather `parameter` filter.\n - Results may also be optionally narrowed by Estimated Time of Arrival (`etaFilter`).\n\nQuery parameters take priority over the request body when both are provided.\n\n**Timing behavior:**\n- When `departAt` is provided: each feature includes `arrivalTime` and the response includes `properties.arrivalTimeUTC` (departAt + route duration)\n- When `arriveAt` is provided: each feature includes `departureTime` and the response includes `properties.departureTimeUTC` (arriveAt - route duration)\n\n**Sample Requests:**\n\n1. **Route via Mapbox with departure time:**\n ```\n POST /v2/logistics?startPoint=-93.3905,45.1310&endPoint=-93.2695,45.1420&departAt=2026-03-13T15:00:00.000Z\n ```\n\n2. **Route via Mapbox with arrival time:**\n ```\n POST /v2/logistics?startPoint=-93.3905,45.1310&endPoint=-93.2695,45.1420&arriveAt=2026-03-13T16:00:00.000Z\n ```\n\n3. **Direct route via body:**\n ```\n POST /v2/logistics\n Body: { \"type\": \"LineString\", \"coordinates\": [[-93.39, 45.13], [-93.27, 45.14]] }\n ```\n" operationId: getLogisticsByRoute parameters: - name: departAt in: query description: 'Departure time for the route. Mutually exclusive with `arriveAt`. When provided, the response includes per-feature `arrivalTime` and top-level `properties.arrivalTimeUTC`. Format: ISO 8601 (YYYY-MM-DDTHH:mm:ss.sssZ) ' required: false schema: type: string format: date-time example: '2026-03-13T15:00:00.000Z' - name: arriveAt in: query description: 'Desired arrival time at the destination. Mutually exclusive with `departAt`. When provided, the response includes per-feature `departureTime` and top-level `properties.departureTimeUTC`. Format: ISO 8601 (YYYY-MM-DDTHH:mm:ss.sssZ) ' required: false schema: type: string format: date-time example: '2026-03-13T16:00:00.000Z' - name: bufferMeters in: query description: Buffer distance in meters around the route for spatial query. Default is 5. required: false schema: type: integer default: 5 example: 5 - name: limit in: query description: Maximum number of records to return. Default is 1000. required: false schema: type: integer default: 1000 example: 1000 - name: page in: query description: Page number for pagination. Default is 1. required: false schema: type: integer default: 1 example: 1 - name: startTime in: query description: 'Filter records with timestamp greater than or equal to this value. Format: ISO 8601 (YYYY-MM-DDTHH:mm:ss.sssZ) ' required: false schema: type: string format: date-time example: '2025-12-04T20:00:00.000Z' - name: endTime in: query description: 'Filter records with timestamp less than or equal to this value. Format: ISO 8601 (YYYY-MM-DDTHH:mm:ss.sssZ) ' required: false schema: type: string format: date-time example: '2025-12-05T20:00:00.000Z' - name: units in: query description: Unit system for response values. Default is imperial. required: false schema: type: string enum: - metric - imperial default: imperial - name: etaFilter in: query description: 'When true, filters condition data to only return the record matching the segment''s arrival time window. Requires `departAt` and either `startPoint`/`endPoint` or duration in body. ' required: false schema: type: boolean default: false example: true - name: parameter in: query description: 'Comma-separated list of field names to include in the response data. When provided, only the specified fields are returned per condition record. Use the /v2/parameters endpoint to see valid options. ' required: false schema: type: string example: crashRiskIndex,mobilityIndex requestBody: description: 'GeoJSON route geometry. Required when `startPoint`/`endPoint` query params are not provided. Accepts a LineString or FeatureCollection with LineString features. ' required: false content: application/json: schema: oneOf: - $ref: '#/components/schemas/LineStringRoute' - $ref: '#/components/schemas/FeatureCollectionRoute' responses: '200': description: Successful response with GeoJSON FeatureCollection, pagination metadata, and route timing properties. content: application/json: schema: $ref: '#/components/schemas/RouteLogisticsResponse' examples: departAtResponse: summary: Response with departAt (shows arrivalTimeUTC) value: pagination: total: 50 limit: 1000 nextOffset: 50 geojson: type: FeatureCollection features: - type: Feature id: 40341366 geometry: type: LineString coordinates: - - -93.3905 - 45.131 - - -93.35 - 45.135 properties: routeId: 40341366 roadName: I-94 osmClass: motorway arrivalTime: '2026-03-13T15:05:00.000Z' data: - id: 1001 lat: 45.131 lon: -93.3905 timestamp: '2026-03-13T15:00:00.000Z' airTemp: 32.5 pavementCondition: wet properties: arrivalTimeUTC: '2026-03-13T15:30:00.000Z' '400': description: Bad Request - Invalid parameters content: application/json: schema: type: object properties: error: type: string examples: mutuallyExclusive: value: error: Cannot use both departAt and arriveAt '401': $ref: '#/components/responses/UnauthorizedResponse' '403': $ref: '#/components/responses/ForbiddenResponse' '404': description: No conditions found along the route content: application/json: schema: type: object properties: error: type: string example: error: No conditions found along route(s) '502': description: Bad Gateway - External service (Mapbox) failure or unreachable content: application/problem+json: schema: $ref: '#/components/schemas/Error' '503': description: Service Unavailable - Data partition temporarily unavailable content: application/problem+json: schema: $ref: '#/components/schemas/Error' security: - clientCredentials: [] components: schemas: RouteLogisticsResponse: type: object properties: pagination: type: object properties: total: type: integer limit: type: integer nextOffset: type: integer geojson: type: object properties: type: type: string enum: - FeatureCollection features: type: array items: type: object properties: type: type: string enum: - Feature id: type: integer geometry: type: object properties: type: type: string enum: - LineString coordinates: type: array items: type: array items: type: number properties: type: object properties: routeId: type: integer roadName: type: string osmClass: type: string arrivalTime: type: string format: date-time description: Estimated arrival time at this segment (present when departAt is used) departureTime: type: string format: date-time description: Estimated departure time from this segment (present when arriveAt is used) data: type: array items: type: object properties: id: type: integer lat: type: number lon: type: number timestamp: type: string format: date-time pavementCreationTime: type: string format: date-time pavementValidTime: type: string format: date-time pavementValidEndTime: type: string format: date-time airTemp: type: number visibility: type: number windDirection: type: number windGust: type: number windSpeed: type: number iceRate: type: number liquidRate: type: number snowRate: type: number pavementTemperature: type: number pavementCondition: type: string crashRiskIndex: type: number crashRiskUncertainty: type: number createdAt: type: string format: date-time updatedAt: type: string format: date-time properties: type: object description: Route timing metadata. Only present when startPoint/endPoint query params are used with departAt or arriveAt. properties: arrivalTimeUTC: type: string format: date-time description: Estimated arrival time at the destination (departAt + route duration). Present when departAt is used. departureTimeUTC: type: string format: date-time description: Estimated departure time from the origin (arriveAt - route duration). Present when arriveAt is used. LineStringRoute: type: object required: - type - coordinates properties: type: type: string enum: - LineString coordinates: type: array minItems: 2 items: type: array minItems: 2 items: type: number FeatureCollectionRoute: type: object required: - type - features properties: type: type: string enum: - FeatureCollection features: type: array minItems: 1 items: type: object required: - type - geometry properties: type: type: string enum: - Feature geometry: $ref: '#/components/schemas/LineStringRoute' LogisticsResponse: type: object properties: pagination: type: object properties: total: type: integer limit: type: integer nextOffset: type: integer geojson: type: object properties: type: type: string enum: - FeatureCollection features: type: array items: type: object properties: type: type: string enum: - Feature id: type: string geometry: type: object description: GeoJSON geometry for the road segment (LineString or MultiLineString) properties: type: type: string enum: - LineString - MultiLineString coordinates: type: array description: Coordinate array (structure depends on geometry type) items: type: array items: type: number properties: type: object properties: segmentId: type: string roadName: type: string osmClass: type: string data: type: array items: type: object properties: id: type: integer lat: type: number lon: type: number timestamp: type: string format: date-time pavementCreationTime: type: string format: date-time pavementValidTime: type: string format: date-time pavementValidEndTime: type: string format: date-time airTemp: type: number visibility: type: number windDirection: type: number windGust: type: number windSpeed: type: number iceRate: type: number liquidRate: type: number snowRate: type: number pavementTemperature: type: number pavementCondition: type: string crashRiskIndex: type: number crashRiskUncertainty: type: number createdAt: type: string format: date-time updatedAt: type: string format: date-time Error: type: object properties: type: type: string title: type: string status: type: integer detail: type: string instance: type: string responses: ForbiddenResponse: description: Forbidden - No valid Bearer token provided content: application/problem+json: schema: $ref: '#/components/schemas/Error' UnauthorizedResponse: description: Unauthorized - Missing or invalid Bearer token content: application/problem+json: schema: $ref: '#/components/schemas/Error' securitySchemes: clientCredentials: type: oauth2 x-receive-token-in: request-body flows: clientCredentials: tokenUrl: https://api.auth.dtn.com/v1/tokens/authorize description: "# Using DAIS for M2M/API Auth\nYou have been given a Client ID and a Client Secret, which are used to request a DTN Access Token. DTN Access Tokens are required when making calls to each and every DTN API endpoint. The following information provides additional details on these tokens and how they are generated.\n## What is an Access Token and how is it different from an API Key?\nAn API Key is a random string of characters that an API uses to authorize whether or not a calling client has approved access to an endpoint. These keys are a non-standard approach to API authorization and are generally issued on a per-API basis.\n\nAn Access Token is also a string of characters but is a base-64 encoded JavaScript Object Notation Web Token, or JWT. JWTs are a widely accepted standard that use OAuth concepts and approaches. \n\nBoth API Keys and Access Tokens are used in an Authorization Request Header as a Bearer, meaning there is no difference in where you put this string of characters when you make calls to DTN APIs.\n## How to generate an Access Token?\nWhen requested, an Access Token is generated for your specific Client (ID/Secret) and for a specific API. The DTN Auth and Identity Service (DAIS) generates new Access Tokens for your client. The DAIS endpoint is `POST https://api.auth.dtn.com/v1/tokens/authorize`.\n\nThis endpoint takes two Header parameters:\n * `Content-Type: application/json`\n * `Accept: application/json`\n\nThis endpoint takes four parameters in the Request Body:\n * `grant_type`: this should always be client_credentials for generating machine-to-machine tokens.\n * `client_id`: this is the Client ID or Application ID using the token and is given to you by DTN's Identity Team. This ID will never change for your client/application.\n * `client_secret`: this is the Client Secret that is associated with the Application ID and is given to you by DTN's Identity Team. This key is subject to rotation for security purposes but always with the client's knowledge.\n * `audience`: this is the API for which this Access Token will be used. For the DTN Pavement Conditions API, you need to use the following audience: https://pavement-condition.prd.wx.zones.dtn.com\n\nYou can use this CURL command template as a reference for obtaining an access token:\n ```\n curl --location --request POST 'https://api.auth.dtn.com/v1/tokens/authorize' \\\n--header 'Accept: application/json' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n\"grant_type\": \"client_credentials\",\n\"client_id\": \"insert your client id here\",\n\"client_secret\": \"insert your client secret here\",\n\"audience\": \"insert your audience here\"\n}' \n ```\n\n*This document, for demonstration purposes, supplies a client_id and client_secret in all code examples. This client/application is for a fictitious API and cannot be used in practice to gain unauthorized access to any other DTN API.*\nUpon generating a new Access Token, you should receive an HTTP Response from DAIS similar to this:\n ```\n {\n \"data\": {\n \"access_token\": \"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6InpfX21pZW13NGhoTmdvQWQxR3N6ciJ9.eyJodHRwczovL2F1dGguZHRuLmNvbS9jdXN0b21lcklkIjoiMTIzNDU2Nzg5MERlbW8iLCJodHRwczovL2F1dGguZHRuLmNvbS9wcm9kdWN0Q29kZSI6IkRlbW9BcGlQIiwiaHR0cHM6Ly9hdXRoLmR0bi5jb20vcmVxdWVzdGVySXAiOiIxOC4yMTMuMTc0LjI3IiwiaHR0cHM6Ly9hdXRoLmR0bi5jb20vcnBzIjoiMTAwIiwiaHR0cHM6Ly9hdXRoLmR0bi5jb20vdGllciI6IkJhc2ljIiwiaHR0cHM6Ly9hdXRoLmR0bi5jb20vcXVvdGEiOiI5OTk5OTkiLCJpc3MiOiJodHRwczovL2lkLmF1dGguZHRuLmNvbS8iLCJzdWIiOiJuZnlPM0tpS1BSOE4wREtSNUNMOGpTOUdGQkNEZXlGTUBjbGllbnRzIiwiYXVkIjoiaHR0cHM6Ly9kZW1vLWFwaS5hdXRoLmR0bi5jb20vIiwiaWF0IjoxNjU2MDk5MDY4LCJleHAiOjE2NTYwOTkxNTgsImF6cCI6Im5meU8zS2lLUFI4TjBES1I1Q0w4alM5R0ZCQ0RleUZNIiwic2NvcGUiOiJyZWFkOmRlbW8gY3JlYXRlOmRlbW8gdXBkYXRlOmRlbW8iLCJndHkiOiJjbGllbnQtY3JlZGVudGlhbHMiLCJwZXJtaXNzaW9ucyI6WyJyZWFkOmRlbW8iLCJjcmVhdGU6ZGVtbyIsInVwZGF0ZTpkZW1vIl19.0VHdyp1w9PPFVI0FPheAwuKZwb5C25rwP-LPMXcSNoRmouvga1DZtNLA67ZzE_sAlc_VpaDRr6daLKr_Alw4347mw9sdjP8wKR27kCZa9JZK5PGQMmXHscATbzBEJYpCPklfyGaajgymqTBGnedcv8F0UvlRzQPsFeRPnVoX7BWOSXpMbyToGiXWkQLBQT7r96KAmLZOPJFZspPtjw-wH2mSL2WNa_nkB4j5vMGhGxlKiNRsKb30TH_WAel2hsxNlcPK3XHCmrMTYsNnu7HNqOTMn2i0__0rvBrhSWEw-_grqQDmWFJuWd7Qhi1q81AaJcdqgoSa_efz93QFclJUNw\",\n \"scope\": \"read:demo create:demo update:demo\",\n \"expires_in\": 90,\n \"token_type\": \"Bearer\"\n },\n \"meta\": {\n \"date_time\": \"2022-06-24T19:09:42.963Z\",\n \"name\": \"v1.tokens.authorize\",\n \"uuid\": \"ee6f9feb-dcf8-4421-a6fd-efd6beabdaa9\",\n \"start_timestamp\": 1656097782509,\n \"end_timestamp\": 1656097782963,\n \"execution_time\": 454\n }\n }\n ```\nLooking at this Response, you will see:\n * `access_token`: contains the JWT Access Token string you will use as your Bearer token.\n * `scope`: contains the scopes that this Access Token gives you permissions to access.\n * `expires_in`: contains the length of time before this Access Token will expire, in seconds.\n * `token_type`: verifies that this Access Token should be used as a Bearer token.\n\n## How to use an Access Token after one is generated?\nOnce a new Access Token is obtained, it is used in each call to a DTN API endpoint as a Bearer token in an Authorization Request Header. For example:\n ```\n Header: 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6InpfX21pZW13NGhoTmdvQWQxR3N6ciJ9.eyJodHRwczovL2F1dGguZHRuLmNvbS9jdXN0b21lcklkIjoiMTIzNDU2Nzg5MERlbW8iLCJodHRwczovL2F1dGguZHRuLmNvbS9wcm9kdWN0Q29kZSI6IkRlbW9BcGlQIiwiaHR0cHM6Ly9hdXRoLmR0bi5jb20vcmVxdWVzdGVySXAiOiIxOC4yMTMuMTc0LjI3IiwiaHR0cHM6Ly9hdXRoLmR0bi5jb20vcnBzIjoiMTAwIiwiaHR0cHM6Ly9hdXRoLmR0bi5jb20vdGllciI6IkJhc2ljIiwiaHR0cHM6Ly9hdXRoLmR0bi5jb20vcXVvdGEiOiI5OTk5OTkiLCJpc3MiOiJodHRwczovL2lkLmF1dGguZHRuLmNvbS8iLCJzdWIiOiJuZnlPM0tpS1BSOE4wREtSNUNMOGpTOUdGQkNEZXlGTUBjbGllbnRzIiwiYXVkIjoiaHR0cHM6Ly9kZW1vLWFwaS5hdXRoLmR0bi5jb20vIiwiaWF0IjoxNjU2MDk5MDY4LCJleHAiOjE2NTYwOTkxNTgsImF6cCI6Im5meU8zS2lLUFI4TjBES1I1Q0w4alM5R0ZCQ0RleUZNIiwic2NvcGUiOiJyZWFkOmRlbW8gY3JlYXRlOmRlbW8gdXBkYXRlOmRlbW8iLCJndHkiOiJjbGllbnQtY3JlZGVudGlhbHMiLCJwZXJtaXNzaW9ucyI6WyJyZWFkOmRlbW8iLCJjcmVhdGU6ZGVtbyIsInVwZGF0ZTpkZW1vIl19.0VHdyp1w9PPFVI0FPheAwuKZwb5C25rwP-LPMXcSNoRmouvga1DZtNLA67ZzE_sAlc_VpaDRr6daLKr_Alw4347mw9sdjP8wKR27kCZa9JZK5PGQMmXHscATbzBEJYpCPklfyGaajgymqTBGnedcv8F0UvlRzQPsFeRPnVoX7BWOSXpMbyToGiXWkQLBQT7r96KAmLZOPJFZspPtjw-wH2mSL2WNa_nkB4j5vMGhGxlKiNRsKb30TH_WAel2hsxNlcPK3XHCmrMTYsNnu7HNqOTMn2i0__0rvBrhSWEw-_grqQDmWFJuWd7Qhi1q81AaJcdqgoSa_efz93QFclJUNw'\n ```\n\n## Deconstructing the Access Token\nA DTN Access Token carries information within its JWT Body that is available on every API call. By deconstructing the JWT token, our Access Tokens will resemble:\n ```\n {\n \"https://auth.dtn.com/customerId\": \"1234567890Demo\",\n \"https://auth.dtn.com/productCode\": \"DemoApiP\",\n \"https://auth.dtn.com/requesterIp\": \"18.213.174.27\",\n \"https://auth.dtn.com/rps\": \"100\",\n \"https://auth.dtn.com/tier\": \"Basic\",\n \"https://auth.dtn.com/quota\": \"999999\",\n \"iss\": \"https://id.auth.dtn.com/\",\n \"sub\": \"nfyO3KiKPR8N0DKR5CL8jS9GFBCDeyFM@clients\",\n \"aud\": \"https://demo-api.auth.dtn.com/\",\n \"iat\": 1656099068,\n \"exp\": 1656099158,\n \"azp\": \"nfyO3KiKPR8N0DKR5CL8jS9GFBCDeyFM\",\n \"scope\": \"read:demo create:demo update:demo\",\n \"gty\": \"client-credentials\",\n \"permissions\": [\n \"read:demo\",\n \"create:demo\",\n \"update:demo\"\n ]\n }\n ```\n### Description of Claims\n\n | Claim | Type | Description |\n | -----------------------------------| --------------------------------------------| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n | `https://auth.dtn.com/customerId` | String | Custom DTN claim containing the Customer ID found in the DTN Order Management/Salesforce system associated with this token. |\n | `https://auth.dtn.com/productCode` | String | Custom DTN claim containing the Identity product code associated with this token. |\n | `https://auth.dtn.com/requesterIp` | String | Custom DTN claim containing the IP address of the requesting client. |\n | `https://auth.dtn.com/rps` | String | Custom DTN claim containing the maximum rate per second this customer is authorized to utilize. |\n | `https://auth.dtn.com/tier` | String | Custom DTN claim containing the data tier the customer purchased for the requested access. |\n | `https://auth.dtn.com/quota` | String | Custom DTN claim containing the maximum yearly quota the customer purchased for calling DTN endpoints for the specific product. |\n | `iss` | String (URI) | The Security Token Service (STS) that issues and returns the token. If this value is not from `https://id.auth.dtn.com/`, the token should not be considered trusted. |\n | `sub` | String (URI) | The principle about which the token asserts information (the User ID or Client ID within the Identity Provider). A User ID will start with a prefix of `auth0\\|`, while the Client ID will end with the suffix `@clients`. |\n | `aud` | String \\| Array (Strings) (URI \\| [URI, …]) | Identifies the intended recipient(s) of the token – its audience. The token should be rejected if the audience does not contain values expected by the calling application. |\n | `iat` | Number (Timestamp) | “Issued At” indicates when the authentication for this token occurred. |\n | `exp` | Number (Timestamp) | The “expiration time” on or after which the JWT must not be accepted for processing. |\n | `azp` | String | The application/client ID of the client using the token. The application can cat as itself or on behalf of a user. |\n | `gty` | String (Space-delimited) | The grant type that was used to request the token – not an RFC 7519 registered claim (Auth0-specific). |\n | `permissions` | Array (Strings) | The grant type that was used to request the token – not an RFC 7519 registered claim (Auth0-specific). |\n\n "