POST
/
accounting
/
expenses
curl --request POST \
  --url https://api.maesn.dev/accounting/expenses \
  --header 'Content-Type: multipart/form-data' \
  --header 'X-ACCOUNT-KEY: <x-account-key>' \
  --header 'X-API-KEY: <x-api-key>' \
  --form 'files=[
  null
]' \
  --form 'expense={
  "id": "E-12345",
  "accountId ": "Payroll",
  "accountingPeriodId": "2023-12",
  "companyId": "12345",
  "currency": "EUR",
  "customerId": "12345",
  "exchangeRate": "Exchange rate",
  "expenseLines": [
    {
      "id": "I-12345",
      "accountId": "12345",
      "companyId": "12345",
      "currency": "EUR",
      "customerId": "12345",
      "description": "description",
      "documentNumber": "12345",
      "exchangeRate": "19",
      "itemId": "12345",
      "supplierId": "12345",
      "taxRate": {
        "id": "tax rate id",
        "code": "code",
        "name": "name",
        "taxRatePercentage": "tax rate percentage"
      },
      "totalGrossAmount": "100",
      "totalNetAmount": "100",
      "trackingCategories": [
        {
          "id": "tracking category id",
          "name": "name"
        }
      ]
    }
  ],
  "journalId": "Journal Id",
  "memo": "Memo",
  "paymentType": "CASH",
  "supplierId": "Supplier Id",
  "taxRate": {
    "id": "tax rate id",
    "code": "code",
    "name": "name",
    "taxRatePercentage": "tax rate percentage"
  },
  "type": "EXPENSE",
  "totalGrossAmount": "100",
  "totalNetAmount": "100",
  "totalTaxAmount": "5",
  "transactionDate": "2021-01-01T00:00:00Z"
}'
{
  "meta": {
    "warnings": [
      "Field not used by target system"
    ],
    "pagination": {
      "total": 123,
      "perPage": 123,
      "currentPage": 123,
      "totalPages": 123
    }
  },
  "data": {
    "id": "E-12345",
    "accountId ": "Payroll",
    "accountingPeriodId": "2023-12",
    "companyId": "12345",
    "createdDate": "2021-01-01T00:00:00Z",
    "currency": "EUR",
    "customerId": "12345",
    "documentId": "12345",
    "exchangeRate": "Exchange rate",
    "expenseLines": [
      {
        "id": "I-12345",
        "accountId": "12345",
        "companyId": "12345",
        "createdDate ": "2021-01-01T00:00:00Z",
        "currency": "EUR",
        "customerId": "12345",
        "description": "description",
        "documentNumber": "12345",
        "exchangeRate": "19",
        "itemId": "12345",
        "supplierId": "12345",
        "taxRate": {
          "id": "tax rate id",
          "code": "code",
          "name": "name",
          "taxRatePercentage": "tax rate percentage"
        },
        "totalGrossAmount": "100",
        "totalNetAmount": "100",
        "trackingCategories": [
          {
            "id": "tracking category id",
            "name": "name"
          }
        ],
        "updatedDate": "2021-01-01T00:00:00Z"
      }
    ],
    "files": [
      "file1.pdf"
    ],
    "journalId": "Journal id",
    "memo": "Memo",
    "paymentType": "CASH",
    "supplierId": "12345",
    "taskId ": "ADB4457839PXTC2220",
    "taxRate": {
      "id": "tax rate id",
      "code": "code",
      "name": "name",
      "taxRatePercentage": "tax rate percentage"
    },
    "type": "EXPENSE",
    "totalGrossAmount": "100",
    "totalNetAmount": "100",
    "totalTaxAmount": "5",
    "transactionDate": "2021-01-01T00:00:00Z",
    "updatedDate": "2021-01-01T00:00:00Z"
  }
}

Test Api token:

663222ee

Test Account token:

85b30b51

Field support per integration

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