Create expense over the API

Overview

Expenses are divided into two parts:

  • „expenseCategory“ – Provides the necessary framework conditions, such as currency. It is used to distinguish between expense types.
  • „expense“ – The expense element containing all relevant data.

If you want to create a new expense element, you must provide the ID of the expense category. Otherwise, the API will return an error. You can manage this in your system under „Receipt types“.

ExpenseCategory

/api/expensecategory

This endpoint only supports GET requests and is for informational purposes only. It can be used to search for expense category with the type you looking for.

FieldDatatypeDescription
namestringname of the category
internalNamestringinternal name of the category
descriptionstringDescription
activebooleanis it usable
typeenumexpense type
currencynumberCurrency-ID
defaultPaymentMethodenumDefault payment method
defaultVehicleenumDefault vehicle method
				
					/api/expensecategory/id
{
  "_id": 11582821,
  "internalName": "Fahrtkosten",
  "type": {
    "caption": "Mileage expense",
    "href": "http://localhost:8083/api/enum/expensetype/POSITIONTYPE_TRAVELEXPENSE",
    "value": "POSITIONTYPE_TRAVELEXPENSE",
    "optionsUrl": "http://localhost:8083/api/enum/expensetype"
  },
  "active": true,
  "name": "Fahrtkosten",
  "description": null,
  "currency": {
    "caption": "EUR",
    "title": "currency",
    "href": "http://localhost:8083/api/currency/8627968",
    "value": 8627968,
    "idKey": "105"
  },
  "defaultPaymentMethod": {
    "href": null,
    "value": null,
    "optionsUrl": "http://localhost:8083/api/enum/paymentmethod"
  },
  "defaultVehicle": {
    "caption": "Private car",
    "href": "http://localhost:8083/api/enum/vehicle/PRIVATE",
    "value": "PRIVATE",
    "optionsUrl": "http://localhost:8083/api/enum/vehicle"
  }
}

				
			

You can also retrieve the ID via your system. To do this, edit an expense category and enable debug mode. Press CTRL + # or CTRL + ^ on your keyboard. Then, copy the ID value.

Create and obtain expenses

/api/expense

Through this endpoint, the following entities can be created:
Receipt, Cost invoice, Mileage expense, Material, Provision, Meal expense, Overtime payment and Supplement.

Fields marked with * are mandatory and required for element creation.

Amounts that are not marked as mandatory fields are calculated by the system. You can overwrite them, but there is a risk that they will be overwritten again when manual editing an entry in the system.

For the billable options (externalBillable, projectBillable, and coworkerBillable), the value of the expense category is used as a fallback. The automation adds the amount – analogous to the system – whenever ‚Billable‘ is not ‚NO‘. If you want different values, you must specify them manually.

Here you can find an overview of all API fields:

FieldDatatypeDescription
datestringDate of the voucher in ISO format (YYYY-MM-DD). As default the current day is used
numberstringNumber of the voucher (Generated automatically)
voucherNumberstringNumber of the original voucher.
descriptionstringDescription
typeenumExpense type (travel expense, provision etc.). Determined by the cost category.
expenseCategorynumberID of the expense category
coworkernumberWorker-ID
projectnumberProject-ID
customernumberCustomer-ID
financeRecordIDnumberInvoice-ID
quantitynumberAmount (For calculations with base price)
voucherCurrencyFactornumberCurrency factor of the voucher (Generated automatically)
voucherVatnumberVat of the voucher
voucherCurrencynumberCurrency-ID
voucherNettonumberNet (Voucher currency)
voucherGrossnumberGross (Voucher currency)
voucherPrivateSharenumberWorker private share. Will be deducted from the reimbursement amount (Voucher currency).
relevantNettonumberNet amount (Mandant Currency)
externalBillableenumBillable of Organization
externalNettonumberBillable amount for organization (Mandant Currency)
projectBillableenumBillable of project
projectNettonumberBillable amount for project (Mandant currency)
coworkerBillableenumBillable of worker
coworkerNettonumberBillable amount for worker (Mandant currency)
coworkerNettoTaxfreenumbertax free billable amount for worker (Mandant currency)
startLocationstringstart location
finishLocationstringfinish location
distancenumberdistance in kilometres
overtimenumberOvertime in minutes
vehicleenumVehicle type (private / company)
paymentMethodenumPayment method (private / company)
containsBreakfastbooleanContains breakfast
containsLunchbooleanContains lunch
containsDinnerbooleanContains dinner
travelExpensenumberTravel-ID
timeenumTime for meal expense
isTaxMandatorybooleanMandatory taxation
costcenterOverridenumberCost center ID
costunitOverridenumberCost unit ID
costtypeOverridenumberCost type ID
costunitAutonumberCost unit ID (From expense category)
costtypeAutonumberCost type ID (From expense category)
costcenterAutonumberCost center ID (From expense category)

Provision

FieldDatatypeDescription
datestringDate of the voucher in ISO format (YYYY-MM-DD). As default the current day is used
numberstringNumber of the voucher (Generated automatically)
descriptionstringDescription
*expenseCategorynumberID of the expense category
*coworkernumberWorker-ID
projectnumberProject-ID
customernumberCustomer-ID
financeRecordIDnumberInvoice-ID
voucherCurrencynumberCurrency-ID
*voucherNettonumberNet (Voucher currency)
relevantNettonumberNet amount (Mandant Currency)
externalBillableenumBillable of Organization
externalNettonumberBillable amount for organization (Mandant Currency)
projectBillableenumBillable of project
projectNettonumberBillable amount for project (Mandant currency)
coworkerNettonumberBillable amount for worker (Mandant currency)
travelExpensenumberTravel-ID
costcenterOverridenumberCost center ID
costunitOverridenumberCost unit ID
costtypeOverridenumberCost type ID
				
					{
  "date": "2025-03-01",
  "description": "Provision",
  "expenseCategory": 176370223,
  "coworker":  54967,
  "financeRecordID": 1926724,
  "voucherCurrency": 8627969,
  "voucherNetto": 100,
  "coworkerBillable": "YES_MANUAL",
}

				
			

Overtime

FieldDatatypeDescription
datestringDate of the voucher in ISO format (YYYY-MM-DD). As default the current day is used
descriptionstringDescription
*expenseCategorynumberID of the expense category
*coworkernumberWorker-ID
coworkerBillableenumBillable of worker
*coworkerNettonumberBillable amount for worker (Mandant currency)
*overtimenumberOvertime in minutes
travelExpensenumberTravel-ID
costcenterOverridenumberCost center ID
costunitOverridenumberCost unit ID
costtypeOverridenumberCost type ID

At least one value must be provided for either „coworkerNetto“ or „overtime“.

				
					{
  "date": "2025-03-07",
  "description": "overtime",
  "expenseCategory": 174025224,
  "coworker": 54967,
  "coworkerBillable": "YES_MANUAL",
  "overtime": 60
}

				
			

Mileage expense

FieldDatatypeDescription
datestringDate of the voucher in ISO format (YYYY-MM-DD). As default the current day is used
numberstringNumber of the voucher (Generated automatically)
voucherNumberstringNumber of the original voucher.
descriptionstringDescription
*expenseCategorynumberID of the expense category
*coworkernumberWorker-ID
projectnumberProject-ID
customernumberCustomer-ID
voucherNettonumberNet (Voucher currency)
relevantNettonumberNet amount (Mandant Currency)
externalBillableenumBillable of Organization
externalNettonumberBillable amount for organization (Mandant Currency)
projectBillableenumBillable of project
projectNettonumberBillable amount for project (Mandant currency)
coworkerBillableenumBillable of worker
coworkerNettonumberBillable amount for worker (Mandant currency)
coworkerNettoTaxfreenumbertax free billable amount for worker (Mandant currency)
startLocationstringstart location
finishLocationstringfinish location
*distancenumberdistance in kilometres
*vehicleenumVehicle type (private / company)
travelExpensenumberTravel-ID
costcenterOverridenumberCost center ID
costunitOverridenumberCost unit ID
costtypeOverridenumberCost type ID
				
					{
  "date": "2025-03-03",
  "description": "travel",
  "expenseCategory": 11582821,
  "coworker": 54967,
  "distance": 100,
  "vehicle": "PRIVATE"
}

				
			

Material expense

FieldDatatypeDescription
datestringDate of the voucher in ISO format (YYYY-MM-DD). As default the current day is used
numberstringNumber of the voucher (Generated automatically)
voucherNumberstringNumber of the original voucher.
descriptionstringDescription
*expenseCategorynumberID of the expense category
*coworkernumberWorker-ID
projectnumberProject-ID
customernumberCustomer-ID
*quantitynumberAmount (For calculations with base price)
relevantNettonumberNet amount (Mandant Currency)
externalBillableenumBillable of Organization
externalNettonumberBillable amount for organization (Mandant Currency)
projectBillableenumBillable of project
projectNettonumberBillable amount for project (Mandant currency)
coworkerBillableenumBillable of worker
coworkerNettonumberBillable amount for worker (Mandant currency)
coworkerNettoTaxfreenumbertax free billable amount for worker (Mandant currency)
travelExpensenumberTravel-ID
costcenterOverridenumberCost center ID
costunitOverridenumberCost unit ID
costtypeOverridenumberCost type ID
				
					{
  "date": "2025-03-07",
  "expenseCategory": 15478132,
  "coworker": 54967,
  "quantity": 100,
  "coworkerBillable": "YES_MANUAL",
}

				
			

Expense voucher

FieldDatatypeDescription
datestringDate of the voucher in ISO format (YYYY-MM-DD). As default the current day is used
numberstringNumber of the voucher (Generated automatically)
voucherNumberstringNumber of the original voucher.
descriptionstringDescription
*expenseCategorynumberID of the expense category
*coworkernumberWorker-ID
projectnumberProject-ID
customernumberCustomer-ID
*quantitynumberAmount (For calculations with base price)
voucherCurrencynumberCurrency-ID
*voucherNettonumberNet (Voucher currency)
*voucherGrossnumberGross (Voucher currency)
voucherPrivateSharenumberWorker private share. Will be deducted from the reimbursement amount (Voucher currency).
externalBillableenumBillable of Organization
externalNettonumberBillable amount for organization (Mandant Currency)
projectBillableenumBillable of project
projectNettonumberBillable amount for project (Mandant currency)
coworkerBillableenumBillable of worker
coworkerNettonumberBillable amount for worker (Mandant currency)
coworkerNettoTaxfreenumbertax free billable amount for worker (Mandant currency)
*paymentMethodenumPayment method (private / company)
travelExpensenumberTravel-ID
costcenterOverridenumberCost center ID
costunitOverridenumberCost unit ID
costtypeOverridenumberCost type ID

If both „voucherNetto“ and „voucherGross“ are null, the base price from the category will be used. If no base price is defined, an error will be returned. If only „voucherGross“ is provided, „voucherNetto“ will be calculated.

				
					{
  "date": "2025-03-07",
  "expenseCategory": 12199867,
  "coworker": 54967,
  "quantity": 2,
  "voucherCurrency": 8627968,
  "voucherNetto": 200,
  "voucherPrivateShare": 10,
  "paymentMethod": "PRIVATE"
}

				
			

Meal expense

FieldDatatypeDescription
datestringDate of the voucher in ISO format (YYYY-MM-DD). As default the current day is used
numberstringNumber of the voucher (Generated automatically)
descriptionstringDescription
*expenseCategorynumberID of the expense category
*coworkernumberWorker-ID
projectnumberProject-ID
customernumberCustomer-ID
relevantNettonumberNet amount (Mandant Currency)
externalBillableenumBillable of Organization
externalNettonumberBillable amount for organization (Mandant Currency)
projectBillableenumBillable of project
projectNettonumberBillable amount for project (Mandant currency)
coworkerBillableenumBillable of worker
coworkerNettonumberBillable amount for worker (Mandant currency)
coworkerNettoTaxfreenumbertax free billable amount for worker (Mandant currency)
*containsBreakfastbooleanContains breakfast
*containsLunchbooleanContains lunch
*containsDinnerbooleanContains dinner
travelExpensenumberTravel-ID
*timeenumTime for meal expense
isTaxMandatorybooleanMandatory taxation
costcenterOverridenumberCost center ID
costunitOverridenumberCost unit ID
costtypeOverridenumberCost type ID
				
					{
  "date": "2025-03-10",
  "expenseCategory": 69707469,
  "coworker": 54967,
  "containsBreakfast": true,
  "containsLunch": true,
  "time": "RATE_24H",
  "containsDinner": false,
  "taxMandatory": false,
}

				
			

Supplement

FieldDatatypeDescription
datestringDate of the voucher in ISO format (YYYY-MM-DD). As default the current day is used
numberstringNumber of the voucher (Generated automatically)
descriptionstringDescription
*expenseCategorynumberID of the expense category
*coworkernumberWorker-ID
projectnumberProject-ID
customernumberCustomer-ID
*voucherNettonumberNet (Voucher currency)
relevantNettonumberNet amount (Mandant Currency)
externalBillableenumBillable of Organization
externalNettonumberBillable amount for organization (Mandant Currency)
projectBillableenumBillable of project
projectNettonumberBillable amount for project (Mandant currency)
coworkerBillableenumBillable of worker
coworkerNettonumberBillable amount for worker (Mandant currency)
travelExpensenumberTravel-ID
costcenterOverridenumberCost center ID
costunitOverridenumberCost unit ID
costtypeOverridenumberCost type ID
				
					{
  "date": "2025-03-14",
  "expenseCategory": 185792490,
  "coworker": 54967,
  "voucherNetto": 100,
  "coworkerBillable": "YES_MANUAL"
}

				
			

Expense invoice

FieldDatatypeDescription
datestringDate of the voucher in ISO format (YYYY-MM-DD). As default the current day is used
numberstringNumber of the voucher (Generated automatically)
descriptionstringDescription
*expenseCategorynumberID of the expense category
*coworkernumberWorker-ID
projectnumberProject-ID
customernumberCustomer-ID
*financeRecordIDnumberInvoice-ID
voucherPrivateSharenumberWorker private share. Will be deducted from the reimbursement amount (Voucher currency).
externalBillableenumBillable of Organization
externalNettonumberBillable amount for organization (Mandant Currency)
projectBillableenumBillable of project
projectNettonumberBillable amount for project (Mandant currency)
coworkerBillableenumBillable of worker
coworkerNettonumberBillable amount for worker (Mandant currency)
coworkerNettoTaxfreenumbertax free billable amount for worker (Mandant currency)
*paymentMethodenumPayment method (private / company)
travelExpensenumberTravel-ID
costcenterOverridenumberCost center ID
costunitOverridenumberCost unit ID
costtypeOverridenumberCost type ID
				
					{
  "date": "2025-03-13",
  "expenseCategory": 185767407,
  "coworker": 54967,
  "financeRecordID": 185797405,
  "paymentMethod": "PRIVATE",
}