Invoices contain invoice lines, which make reference to any service added to the invoice, together with any quantities, unit price and taxes that pertain to them.
The invoice line object
| Attribute | Type | Extra information |
|---|---|---|
| idRequired | string | Unique Identifier |
| expense_dateRequired | string | The day when the sale/refund related to this line was incurred. |
| descriptionRequired | string | The description of the sale item represented in this line. |
| quantityRequired | integer | How many units were sold as per number of travellers. |
| unit_priceRequired | string | Amount due per unit sold, taxable. This can be helpful when there are multiple travellers on the service. |
| non_taxable_unit_priceRequired | string | Amount due per unit sold, non-taxable. |
| tax_percentageRequired | string | Tax rate applicable to this item. |
| tax_amountRequired | string | Amount of taxes resulting of applying the tax_percentage to the total taxable base (quantity * unit_price). |
| tax_regimeRequired | string | The code representing the tax regime. Such as but not limited to:
|
| total_amountRequired | string | Total amount of the line after taxes, as perquantity (unit_price + non_taxable_unit_price) + tax_amount. |
| metadataRequired | object | An object with contextual metadata related to the user, trip, service and more. |
The metadata object
| Attribute | Type | Description |
|---|---|---|
| trip_id Optional | string | Perk unique ID for the trip. |
| trip_name Optional | string | Name given to the trip. |
| service Optional | string | Code of the service booked in this item (flight, hotel, train, car, seat, meeting_roometc.). If you want the direct vertical for which this booked item is related use the related_vertical field. |
| related_vertical Optional | string | Vertical of the service booked in this item (flight, hotel, train, car, insurance, other).For example, an item with service: "extra" can have related_vertical: "flight", which allows for further grouping of invoice line items. |
| travelers Optional | array[object] | Traveler information associated to the expense. Can contain multiple travellers. Includes the following information:
|
| start_date Optional | string | Start date for the trip. |
| end_date Optional | string | End date for the trip. |
| cost_center Optional | string | Cost center the trip is mapped to. |
| credit_card_last_4_digits Optional | string | Last 4 digits of the credit card used for payment (if paid by credit card) |
| labels Optional | array[string] | List of all labels included in the trip. |
| custom_fields Optional | array[object] | List of all Custom Fields associated with the trip. Includes the following information:
|
| vendor Optional | object | Vendor object. Refers to the end supplier of the service (ie marketing airline if flight, hotel details if hotel, etc.):
|
| out_of_policy Optional | boolean | Refers to whether the trip (not the expense) was initially booked out of policy (true) or within policy (false). |
| approvers Optional | array[object] | List of users who approved the trip. Includes the following information:
|
| booker Optional | object | User who booked the trip. Includes the following information:
|
| service_location Optional | object | An object describing the location of the service. Included only for invoice lines of related_vertical type flight, hotel, train, car. Null otherwise. Check below for the object description. |
| include_breakfast Optional | boolean | Indicates whether breakfast is included in the booking for the service (flight,hotel,train, car). If applicable, this will be set to true, otherwise false or null if it doesn't apply. This attribute is optional. |
Extended InvoiceLine Details:
These details of the InvoiceLines parent Invoice are provided in the list InvoiceLines response for connivance.
| Attribute | Type | Description |
|---|---|---|
| invoice_serial_number | string | The unique identifier for the invoice where this line is related. |
| profile_id | string | The globally unique identifier for the payment/invoice profile. |
| profile_name | string | The name of the payment/invoice profile. |
| invoice_mode | string | A description of the type of legal document that this object represents. See the mode attribute in the Invoice model for more details. |
| invoice_status | string | The current status of the invoice. See the status attribute in the Invoice model for more details. |
| issuing_date | string | The day the invoice was issued. |
| due_date | string | The day by which the invoice must be fully paid. |
| currency | string | The 3-characters ISO 4217 code of the currency used in the invoice. |
Example Response
{
"id": "6dc6d45e-55f5-48cc-9e23-cad798b364ef",
"expense_date": "2020-03-14",
"description": "FLIGHT for Trip 9876543",
"quantity": 2,
"unit_price": "399.00",
"non_taxable_unit_price": "25.75",
"tax_percentage": "19.00",
"tax_amount": "151.62",
"tax_regime": "G-VAT-R",
"total_amount": "1001.12",
"metadata": {
"trip_id": 9876543,
"trip_name": "Meeting with German company GmbH",
"service": "flight",
"related_vertical": "flight",
"travelers": [
{
"name": "John Doe",
"email": "[email protected]",
"external_id": "ASD123"
}
],
"start_date": "2020-03-27",
"end_date": "2020-04-05",
"cost_center": "DACH Accounts",
"credit_card_last_4_digits": "1223",
"include_breakfast": false,
"labels": [
"Sales trips",
"Special"
],
"vendor": {
"code": "LH",
"name": "Lufthansa"
},
"out_of_policy": false,
"approvers": [
{
"name": "Jake Bolt",
"email": "[email protected]",
"external_id": "ASD124"
}
],
"service_location": {
"origin": {
"name": "Berlin Metropolitan Area",
"code": "BER",
"city": "Berlin",
"country": "Germany",
"country_code": "DE",
"latitude": "52.52",
"longitude": "13.405"
},
"destination": {
"name": "Franz Josef Strauss",
"code": "MUC",
"city": "Munich",
"country": "Germany",
"country_code": "DE",
"latitude": "48.3538",
"longitude": "11.7861"
}
},
"booker": {
"name": "Marien Lint",
"email": "[email protected]",
"external_id": "ASD124"
}
},
"profile_id": "edb6322b-8e11-48e9-8d6f-6402e445e50d",
"profile_name": "My German Company GmbH",
"invoice_serial_number": "INV-01-987654",
"invoice_mode": "reseller",
"invoice_status": "paid",
"issuing_date": "2020-04-15",
"due_date": "2020-04-30",
"currency": "GBP"
}The service_location object
| Service (invoice_line.metadata.related_vertical) | Description |
|---|---|
flight | Includes origin and destination objects with the following information: - name, airport name- code, airport IATA code- city, city name- country, country name- country_code, country ISO code- latitude, latitude for airport location- longitude, longitude for airport location |
hotel | Includes hotel_location object with the following information: - city, city name- country, country name- country_code, country ISO code- latitude, latitude for hotel location- longitude, longitude for hotel location |
train | Includes origin and destination objects with the following information: - name, train station name- city, city name- country, country name- country_code, country ISO code- latitude, latitude for train station location- longitude, longitude for train station location |
car | Includes pick_up_location object with the following information: - city, city name for pick up- country, country name for pick up- country_code, country ISO code for pick up- latitude, latitude for car pick up location- longitude, longitude for car pick up location |
"origin": {
"name": "Berlin Metropolitan Area",
"code": "BER",
"city": "Berlin",
"country": "Germany",
"country_code": "DE",
"latitude": "52.52",
"longitude": "13.405"
},
"destination": {
"name": "San Francisco Intl",
"code": "SFO",
"city": "San Francisco",
"country": "United States",
"country_code": "US",
"latitude": "-122.4192",
"longitude": "37.7793"
}"hotel_location": {
"name": "Hampton by Hilton Berlin City East Side Gallery",
"city": "Berlin",
"country": "Germany",
"country_code": "DE",
"latitude": "13.2956",
"longitude": "52.5606"
}"origin": {
"name": "Berlin Hbf (s-Bahn)",
"city": "Berlin",
"country": "Germany",
"country_code": "DE",
"latitude": "13.2956",
"longitude": "52.5606"
},
"destination": {
"name": "München Hbf",
"city": "Munich",
"country": "Germany",
"country_code": "DE",
"latitude": "48.1405",
"longitude": "11.5578"
}"pick_up_location": {
"city": "Berlin",
"country": "Germany",
"country_code": "DE",
"latitude": "13.2956",
"longitude": "52.5606"
}
