Developers
API referenceReferenceExpense claims

Create an expense claim with its first trip

One transaction. A failed trip leaves no claim and uses no number.

POST
/v1/business/{business_slug}/expense_claims/new/trips/

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.

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/new/trips/" \  -H "Content-Type: application/json" \  -d '{    "description": "string",    "start_at": "2019-08-24T14:15:22Z",    "end_at": "2019-08-24T14:15:22Z",    "destination": "string"  }'
{  "id": 0,  "description": "string",  "start_at": "2019-08-24T14:15:22Z",  "end_at": "2019-08-24T14:15:22Z",  "destination": "string",  "auto_per_diem": true,  "per_diem_automatic_allowed": true,  "position": 0,  "tags": [    {      "id": 0,      "name": "string",      "color": "string"    }  ],  "legs": [    {      "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    }  ],  "travel_days": [    {      "id": 0,      "day_index": 0,      "starts_at": "2019-08-24T14:15:22Z",      "ends_at": "2019-08-24T14:15:22Z",      "duration_minutes": 0,      "destination": "string",      "destination_label": "string",      "destination_override": "string",      "allowance_type": "NONE",      "is_return_day": true,      "requires_review": true,      "after_return": true,      "unresolved_followup": true,      "basis": "string",      "free_meals": 0,      "meal_allowance": true,      "meal_allowance_available": true,      "manual_amount": 0,      "exception_basis": "string",      "exception_set_by": 0,      "exception_set_at": "2019-08-24T14:15:22Z",      "rate": "string",      "amount": 0.1,      "tax_free_amount": 0.1    }  ],  "expenses": [    {      "id": 0,      "merchant": "string",      "purchase_date": "2019-08-24",      "amount": 0,      "category": "TRAVEL_TICKETS"    }  ],  "distance_km": "string",  "mileage_amount": 0.1,  "per_diem_amount": 0.1,  "meal_allowance_amount": 0.1,  "expense_amount": 0.1}