curl --request POST \
--url https://sandbox.tight.com/v6/mileage/query \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"cursor": "<string>",
"limit": 123,
"sort": {
"orderBy": "DATE",
"direction": "ASC"
},
"filter": {
"status": {
"in": [
"ACTIVE"
],
"notIn": [
"ACTIVE"
],
"equal": "ACTIVE",
"notEqual": "ACTIVE",
"greaterThan": "ACTIVE",
"greaterThanEqual": "ACTIVE",
"lessThan": "ACTIVE",
"lessThanEqual": "ACTIVE"
},
"mileageStatus": {
"in": [
"PENDING"
],
"notIn": [
"PENDING"
],
"equal": "PENDING",
"notEqual": "PENDING",
"greaterThan": "PENDING",
"greaterThanEqual": "PENDING",
"lessThan": "PENDING",
"lessThanEqual": "PENDING"
}
}
}
'{
"result": "SUCCESS",
"data": [
{
"id": "mlg_12345",
"date": "2024-03-15",
"status": "ACTIVE",
"mileageStatus": "BUSINESS",
"description": "Drive to client meeting",
"notes": "Client was not available",
"customer": {
"id": "cus_4852707",
"name": "Abigail Adams",
"email": "abigail@tight.com"
},
"classSegments": [
{
"id": "cls_593051",
"label": {
"id": "cll_4521",
"name": "Region",
"requiredness": "NOT_REQUIRED"
},
"name": "Mid-Atlantic",
"child": {
"id": "cls_593052",
"label": {
"id": "cll_4521",
"name": "Region",
"requiredness": "NOT_REQUIRED"
},
"name": "Washington DC",
"child": "<unknown>"
}
}
],
"distance": {
"type": "MILE",
"value": "12.5"
},
"start": {
"time": "2023-11-07T05:31:56Z",
"lat": "38.8977",
"lng": "-77.0365",
"location": {
"id": "loc_28868401",
"name": "Home Office"
},
"address": {
"countryCode": "USA",
"state": "<string>",
"city": "<string>",
"zip": "<string>",
"phoneWork": "<string>",
"address1": "<string>",
"address2": "<string>"
}
},
"end": {
"time": "2023-11-07T05:31:56Z",
"lat": "38.8977",
"lng": "-77.0365",
"location": {
"id": "loc_28868401",
"name": "Home Office"
},
"address": {
"countryCode": "USA",
"state": "<string>",
"city": "<string>",
"zip": "<string>",
"phoneWork": "<string>",
"address1": "<string>",
"address2": "<string>"
}
},
"duration": 3600000,
"deduction": {
"amount": 6775
},
"route": {
"id": "mrt_12345",
"waypoints": [
{
"lat": "38.8977",
"lng": "-77.0365"
}
]
},
"car": {
"id": "car_28868401",
"name": "My Toyota Camry",
"make": "Toyota",
"model": "Camry"
},
"customData": {
"internal_key": "some_internal_key",
"some_other_field": 23434
}
}
],
"cursor": {
"after": "<string>",
"before": "<string>"
}
}Query mileage records for the authenticated user
curl --request POST \
--url https://sandbox.tight.com/v6/mileage/query \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"cursor": "<string>",
"limit": 123,
"sort": {
"orderBy": "DATE",
"direction": "ASC"
},
"filter": {
"status": {
"in": [
"ACTIVE"
],
"notIn": [
"ACTIVE"
],
"equal": "ACTIVE",
"notEqual": "ACTIVE",
"greaterThan": "ACTIVE",
"greaterThanEqual": "ACTIVE",
"lessThan": "ACTIVE",
"lessThanEqual": "ACTIVE"
},
"mileageStatus": {
"in": [
"PENDING"
],
"notIn": [
"PENDING"
],
"equal": "PENDING",
"notEqual": "PENDING",
"greaterThan": "PENDING",
"greaterThanEqual": "PENDING",
"lessThan": "PENDING",
"lessThanEqual": "PENDING"
}
}
}
'{
"result": "SUCCESS",
"data": [
{
"id": "mlg_12345",
"date": "2024-03-15",
"status": "ACTIVE",
"mileageStatus": "BUSINESS",
"description": "Drive to client meeting",
"notes": "Client was not available",
"customer": {
"id": "cus_4852707",
"name": "Abigail Adams",
"email": "abigail@tight.com"
},
"classSegments": [
{
"id": "cls_593051",
"label": {
"id": "cll_4521",
"name": "Region",
"requiredness": "NOT_REQUIRED"
},
"name": "Mid-Atlantic",
"child": {
"id": "cls_593052",
"label": {
"id": "cll_4521",
"name": "Region",
"requiredness": "NOT_REQUIRED"
},
"name": "Washington DC",
"child": "<unknown>"
}
}
],
"distance": {
"type": "MILE",
"value": "12.5"
},
"start": {
"time": "2023-11-07T05:31:56Z",
"lat": "38.8977",
"lng": "-77.0365",
"location": {
"id": "loc_28868401",
"name": "Home Office"
},
"address": {
"countryCode": "USA",
"state": "<string>",
"city": "<string>",
"zip": "<string>",
"phoneWork": "<string>",
"address1": "<string>",
"address2": "<string>"
}
},
"end": {
"time": "2023-11-07T05:31:56Z",
"lat": "38.8977",
"lng": "-77.0365",
"location": {
"id": "loc_28868401",
"name": "Home Office"
},
"address": {
"countryCode": "USA",
"state": "<string>",
"city": "<string>",
"zip": "<string>",
"phoneWork": "<string>",
"address1": "<string>",
"address2": "<string>"
}
},
"duration": 3600000,
"deduction": {
"amount": 6775
},
"route": {
"id": "mrt_12345",
"waypoints": [
{
"lat": "38.8977",
"lng": "-77.0365"
}
]
},
"car": {
"id": "car_28868401",
"name": "My Toyota Camry",
"make": "Toyota",
"model": "Camry"
},
"customData": {
"internal_key": "some_internal_key",
"some_other_field": 23434
}
}
],
"cursor": {
"after": "<string>",
"before": "<string>"
}
}Bearer authentication header of the form Bearer <token>, see Authentication for more detail.
Success
The result of the action performed.
SUCCESS, FAILURE The data generated by the action performed.
Show child attributes
Cursor to be used in your subsequent paginated request. Only populated if there are more pages available.
Show child attributes