Skip to main content
POST
/
accounting
/
expenses
/
async
cURL
curl --request POST \
  --url https://api.maesn.dev/accounting/expenses/async \
  --header 'Content-Type: multipart/form-data' \
  --header 'X-ACCOUNT-KEY: <x-account-key>' \
  --header 'X-API-KEY: <x-api-key>' \
  --form 'files=<string>' \
  --form 'expense={
  "id ": "9dea18d2-748e-4bda-9f4c-02b08a9622cd",
  "account ": {
    "id": "db32-4f56-8a9b-1234567890ab",
    "code": "200",
    "name": "EXPENSE",
    "number": 4900
  },
  "currency": "EUR",
  "customerId": "8a32de4f-55cc-4962-b000-a2a20662b821",
  "description": "Expense_07/25 for business trip",
  "documentId": "c77fbedb-1ff3-4fed-8716-4d3e3fc85ccf",
  "expenseLines": [
    {
      "id": "b9dade6b-2b69-42c9-bcd4-841960f6cd9f",
      "account ": {
        "id": "db32-4f56-8a9b-1234567890ab",
        "code": "200",
        "name": "EXPENSE",
        "number": 4900
      },
      "currency": "EUR",
      "description": "Gasoline for business trip",
      "dimensions": [
        {
          "id": "efa82f42-fd85-11e1-a21f-0800200c9a33",
          "categoryName": "CostCenter",
          "name": "Material/Waren"
        }
      ],
      "documentNumber": "EXP-12345",
      "exchangeRate": 1,
      "itemId": "9fc4f3a2-5b8e-4d1b-8a0c-9f6e7d2f3e4b",
      "taxRate": {
        "id": "1895b05b-38a6-4a6a-9653-166389894350",
        "code": "03",
        "description": "Tax19",
        "taxRatePercentage": "19"
      },
      "totalGrossAmount": 119,
      "totalNetAmount": 100
    }
  ],
  "generatorName": "Maesn GmbH",
  "journalCode": "60",
  "note": "Gasoline for business trip",
  "paymentTermId": "d2f3e4b5-6a7b-8c9d-0e1f-2g3h4i5j6k7l",
  "paymentType": "CASH",
  "supplierId": "52c049b9-91b7-4828-b346-e1eeadfa31dd",
  "type": "EXPENSE",
  "totalGrossAmount": 119,
  "totalNetAmount": 100,
  "totalTaxAmount": 5,
  "transactionDate": "2025-07-15T00:00:00Z"
}' \
  --form files.items='@example-file'
{
  "meta": {
    "warnings": [
      "Field not used by target system"
    ],
    "pagination": {
      "total": 125,
      "perPage": 50,
      "currentPage": 1,
      "totalPages": 3
    }
  },
  "data": {
    "taskId": "02cc5849-b23c-48fe-8a9b-96f74bfc9571"
  }
}

Field support per integration

This endpoints is asynchronous. To check the status of the request, use the GET asyncTask endpoint. For more info about asynchronous tasks visit the Asynchronous Task section.
If you’re not using the Interactive Authentication Flow, make sure the query parameter companyId is accurately populated with the appropriate company ID. You can obtain this value by using the GET Companies endpoint available under the Authentication section.
Supported Request Parameters:
expense
string
required
files
file[]

Headers

X-API-KEY
string
required

API key

X-ACCOUNT-KEY
string
required

Account key

Query Parameters

companyId
string

Body

multipart/form-data
files
file[]

Array of files to upload

expense
object

Response

200 - application/json
meta
object
data
object
Last modified on April 27, 2026