Update Transactions

This endpoint allows to update transactions in the storage. Compared to the replace-transactions endpoint the properties that are not set in the request are not changed in the stored transaction.

If the same transaction is updated multiple times in the same request they are updated in the given order.

Request

POST /insights/v1/storage/transactions/update HTTP/1.1
Content-Type: application/json; charset=utf-8
Authorization: Token <Token>
Host: <Host>
{
    "insights_consumer_id": String,
    "insights_account_id": String,
    "transactions": Array<StorageTransaction>
}

insights_consumer_id String, required

The id identifying the consumer to whom the transactions belong.

insights_account_id String, required

The id identifying the account to which the transactions belong.

transactions StorageTransaction[], required

The transactions to update in the storage.

Response

{}

Example updating a transaction

Example request

{
    "insights_consumer_id": "6c03aff-8fa0046-ffae74-b0cbc-4d5fd1",
    "insights_account_id": "c9a87c48-c5c7-404c-ace8-f287e298c4cc",
    "transactions": [
        {
            "insights_transaction_id": "transaction-id-1",
            "reference": "xa0h0d0svlsyw0bap0boahuqxb HM online de, ref. 13676134 UPDATED",
        },
        {
            "insights_transaction_id": "transaction-id-2",
            "state": "PENDING"
        }
    ]
}

Example response

{}

Example updating categories on transactions

Example request

{
    "insights_consumer_id": "6c03aff-8fa0046-ffae74-b0cbc-4d5fd1",
    "insights_account_id": "c9a87c48-c5c7-404c-ace8-f287e298c4cc",
    "transactions": [
        {
            "insights_transaction_id": "transaction-id-1",
            "category_ids": ["d737f69a-8a95-53a5-a99b-0b37a9d5d9e9"]
        },
        {
            "insights_transaction_id": "transaction-id-2",
            "category_ids": ["d737f69a-8a95-53a5-a99b-0b37a9d5d9e9"]
        }
    ]
}

Example response

{}

results matching ""

    No results matching ""