financial/transactions/edit

Edit an existing transaction.

POST
https://api.elvanto.com/v1/financial/transactions/edit.{json|xml|php}

Parameters

Name Type Description
id Required string The ID of the transaction.
batch array This array can contain the id of a batch, a number or name. Both a number and name can be used at the same time and if the number and/or name you provide does not match an existing batch, a new batch will be created with the details you provide. If this parameter is left empty, a new batch will be created and the transaction will be moved to it. Do not specify this parameter if you wish to leave the transaction in its current batch.
person Required array This array can contain the id of a person or a firstname, lastname, email, mobile or phone. If you do not provide an id, the API will try match a person with the details you provide. A new person will be created if no match is found. Do not specify this parameter if you wish to leave the transaction assigned to its current person.
transaction_date date The date the transaction was made. E.g: 2024-12-30
transaction_method string The method that the transaction was paid in.
Accepted Values: Cash, Check, Credit Card, Bank Transfer, Automatic Direct Debit and Online. Any other value will be treated as Other and placed in the "Method Name" field.
check_number string The check number. Will only be recognized if Check is the value of the transaction_method parameter.
amounts_add array An array of amounts to add to the transaction. Each array needs to contain the following:

category_id: The ID of the category (Chart of Accounts).
total: The total amount.
tax_deductible: 1 if the payment is tax deductible. (optional)
memo: A memo to add to the amount. (optional)

If you do not include the tax_deductible parameter in your calls we will base this value off whether the Chart of Account has tax deductible payments turned on by default or not.
amounts_edit array An array of amounts to edit to the transaction. Each array needs to contain the following:

id: The ID of the transaction amount.
category_id: The ID of the category (Chart of Accounts).
total: The total amount.
tax_deductible: 1 if the payment is tax deductible. (optional)
memo: A memo to add to the amount. (optional)
amounts_remove array An array of ID's of the amounts you would like to delete from this transaction.
Expected request JSON HTTP POST
{
    "id": "b49c5f04-3bf8-49d4-97e0-9a83797a79d8",
    "batch": {
        "id": "a491a41a-ad34-4845-b783-392cf0a409e7"
    },
    "person": {
        "id": "5045a36e-2650-4be4-932a-82d6aef8d53f"
    },
    "transaction_date": "2024-12-30",
    "transaction_method": "Check",
    "check_number": "12345678",
    "amounts_add": [
        {
            "category_id": "3bbe0492-07b6-464c-b075-d26f8b320b15",
            "total": "100.00",
            "tax_deductible": 0,
            "memo": "Optional memo goes here."
        },
        {
            "category_id": "979df69e-16c3-4d37-a0ef-014928685a29",
            "total": "5000.00",
            "tax_deductible": 1,
            "memo": "Optional memo goes here."
        }
    ],
    "amounts_edit": [
        {
            "id": "3ac2f817-7fc5-4083-adc7-7f55a6cf2082",
            "category_id": "a91a779f-54c7-4143-8ecf-82a09bb66ec3",
            "total": "53.00",
            "tax_deductible": 1,
            "memo": ""
        }
    ],
    "amounts_remove": [
        [
            "219265b5-d422-47ff-9570-5a74a5e620cf",
            "3ac2f817-7fc5-4083-adc7-7f55a6cf2082"
        ]
    ]
}
Expected response JSON XML PHP
{
    "generated_in": "0.018",
    "status": "ok",
    "transaction": {
        "id": "b49c5f04-3bf8-49d4-97e0-9a83797a79d8",
        "batch": {
            "id": "a491a41a-ad34-4845-b783-392cf0a409e7",
            "number": 1002,
            "name": "Sunday 25th August"
        },
        "person": {
            "id": "5045a36e-2650-4be4-932a-82d6aef8d53f",
            "firstname": "John",
            "lastname": "Smith"
        }
    }
}
Error responses

Please see our response status codes documentation for details of potential error responses for any API request.

  • 250: Invalid Transaction ID The Transaction ID you provided does not exist.
  • 250: Invalid Batch ID The Batch ID you provided does not exist.