Skip to main content

Update expense information for a transaction

PATCH 

/api/transactions/:id/expense

This endpoint updates expense information for an existing transaction.

Prerequisites:

To use this endpoint you need to have the ACCOUNTING scope for the API Key. Please contact your relation manager to get this permission.

Eligibility: The transaction type must be enabled in the business partner expense settings targets.

Request Body:

  • category: Expense category ID.
  • costCenter: Expense cost center ID.
  • vats: Array of 1-3 VAT rows containing expenseVat, rate, amount, grossAmount, externalId.
  • vatRate/vatAmount: Deprecated legacy format, still accepted for backward compatibility.
  • note: Optional comment.

Completion update: Expense completion is recalculated during the request, and the response contains the latest expenseCompletedAt value.

Validation Errors: Responses return status 422 with an errors array containing field, code, and message. Possible code values include:

  • transaction.type.not_supported
  • input.category.not_valid
  • input.cost_center.not_valid
  • input.vat_rate.not_valid
  • input.vat_amount.not_valid
  • input.comment.not_valid
  • expense.vat.not_valid
  • expense.category.transaction_type_not_allowed
  • expense.cost_center.transaction_type_not_allowed
  • expense.category.card_group_not_allowed
  • expense.cost_center.card_group_not_allowed
  • invalid

Request

Path Parameters

    id stringrequired

    Transaction identifier

Body

required
    category integernullable
    costCenter integernullable
    vatRate string[]nullable
    vatAmount string[]nullable
    vats object[]
  • Array [
  • expenseVat integernullable
    rate string
    amount stringnullable
    grossAmount string
    externalId stringnullable
  • ]
  • note stringnullable

Responses

OK - The request was processed successfully.

Schema
    id integer
    currency string
    amount string
    type string

    Possible values: [fee, payin, payout, peer, fx, card]

    executionDate string
    executed boolean
    createdAt string
    updatedAt string
    account integer
    transactionDetailId integernullable
    tags string[]
    documents object
    id integer
    name string
    mimeType string
    expenseCategory object
    id integer
    name string
    accountingAccountNumber string
    externalId string
    expenseCostCenter object
    id integer
    name string
    number string
    vat string[]deprecated
    vats object[]
  • Array [
  • expenseVat integernullable
    rate string
    amount string
    grossAmount string
    externalId stringnullable
  • ]
  • comment stringnullable
    expenseCompletedAt stringnullable
    magicLinkUrl stringnullable
    contact object
    id integer
Loading...