Developers
API referenceReferenceExpense claims

Add a leg to an expense claim trip

Computes the mileage, then the trip's travel days and the claim total.

POST
/v1/business/{business_slug}/expense_claims/{claim_id}/trips/{trip_id}/legs/

Path Parameters

business_slug*string

Business slug that scopes this request. If you do not have one yet, call common_accessible_businesses_list and pick a slug from the response.

claim_id*integer

Identifier of the target claim. If the ID is not known, use the corresponding list endpoint with relevant filters and/or the search parameter to discover valid IDs.

trip_id*integer

Identifier of the target trip. If the ID is not known, use the corresponding list endpoint with relevant filters and/or the search parameter to discover valid IDs.

Request Body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/v1/business/string/expense_claims/0/trips/0/legs/" \  -H "Content-Type: application/json" \  -d '{    "destination_address": "string",    "departure_at": "2019-08-24T14:15:22Z",    "arrival_at": "2019-08-24T14:15:22Z",    "vehicle": "CAR",    "distance_km": "string"  }'
{  "id": 0,  "position": 0,  "departure_address": "string",  "destination_address": "string",  "departure_at": "2019-08-24T14:15:22Z",  "arrival_at": "2019-08-24T14:15:22Z",  "description": "string",  "vehicle": "CAR",  "distance_km": "string",  "route_distance_km": "string",  "distance_source": "ROUTE",  "extra_passengers": 0,  "has_trailer": true,  "has_heavy_load": true,  "country_change": "string",  "rate_per_km": "string",  "amount": 0.1}