Source: https://www.brixit.io/docs/api-transactions-update

# Update transaction

To update transaction in Brixit, send a POST request to /api/automation/v1/execute with operation set to transactions.update. Include parameters.id to identify the record.

[Transactions API](https://www.brixit.io/docs/api-transactions) · `transactions.update`

[URL](https://www.brixit.io/docs/api-transactions-update#url-and-authentication) · [Fields](https://www.brixit.io/docs/api-transactions-update#fields) · [Example](https://www.brixit.io/docs/api-transactions-update#example-request) · [Response](https://www.brixit.io/docs/api-transactions-update#response) · [Try it](https://www.brixit.io/docs/api-transactions-update#try-it)

## URL and authentication

`POST https://YOUR-BACKEND/api/automation/v1/execute`

Send `Authorization: Bearer <connection key>`, `Accept: application/json` and
`Content-Type: application/json`. [Create a connection](https://www.brixit.io/docs/api#get-connected).

This operation requires **write access** and CRM permission `edit_transaction`.
The gateway invokes `PUT /api/v1/app/transactions/{id}` internally.
Use the POST URL above with your automation key, including for read and delete operations.

## Request parameters

| Key | Type | Requirement |
| --- | --- | --- |
| `operation` | string | Required; exactly `transactions.update` |
| `parameters.id` | integer | Required; positive record ID from your CRM |
| `data` | object | Optional; see fields below |
| `idempotency_key` | string | Required; 8–100 characters. Unique per action; keep unchanged for identical retries. |

## Fields

Source requirements use the effective stored transaction source. Completed, closed and cancelled transactions cannot normally be edited; completed transactions permit cheque-only updates. Only in_progress transactions can be cancelled, with cancellation_reason of 10–5000 characters. Rental cheque totals and uniqueness are checked against the resulting cheque plan. Child cheque and split IDs must belong to the transaction.

Fields below belong inside `data`. Dot paths describe nested objects; `*` means each
array item. `nullable` permits null and `sometimes` validates a supplied field.
`in:` lists allowed values; `min:` and `max:` limit the value, length or item count.
`exists:` and `exists_in_company:` require a valid record ID. Conditional rules
such as `required_if` and `required_with` refer to other fields in the same payload.
Use YYYY-MM-DD for date-only values and timestamps with timezone offsets for follow-ups.

| Field | Type | Requirement | Format / validation |
| --- | --- | --- | --- |
| `transaction_source` | string | Optional | sometimes; in:internal,external_listing,external_client |
| `company_role` | string | Optional | sometimes; in:listing_agent,buyers_agent,tenants_agent,dual_agent,referral_only,broker |
| `transaction_type` | string | Optional | sometimes; in:sale,rental |
| `payment_method` | string | Optional | sometimes; in:cash,cheque |
| `status` | string | Optional | sometimes; in:draft,pending,in_progress,completed,closed,cancelled |
| `currency` | string | Optional | sometimes; nullable; string; size:3 |
| `transaction_amount` | number | Optional | sometimes; numeric; min:0 |
| `commission_rate` | number | Optional | sometimes; numeric; min:0; max:100 |
| `commission_amount` | number | Optional | sometimes; numeric; min:0 |
| `transaction_date` | string | Optional | sometimes; date |
| `cancellation_reason` | string | Optional | sometimes; nullable; string; max:5000 |
| `external_listing` | object | Optional | sometimes; nullable; array |
| `external_listing.address` | string | Optional | sometimes; nullable; string; max:100 |
| `external_listing.city` | string | Optional | sometimes; nullable; string; max:100 |
| `external_listing.bedrooms` | integer | Optional | sometimes; nullable; integer; min:0 |
| `external_listing.bathrooms` | integer | Optional | sometimes; nullable; integer; min:0 |
| `external_listing.size` | number | Optional | sometimes; nullable; numeric; min:0 |
| `external_listing.listing_type` | integer | Optional | sometimes; nullable; integer; exists:listing_types,id |
| `external_listing.company` | string | Optional | sometimes; nullable; string; max:255 |
| `external_listing.agent` | object | Optional | sometimes; nullable; array |
| `external_listing.agent.name` | string | Optional | sometimes; nullable; string; max:255 |
| `external_listing.agent.phone` | string | Optional | sometimes; nullable; string; max:20 |
| `external_listing.agent.email` | string | Optional | sometimes; nullable; email; max:255 |
| `external_listing.agent.mls` | string | Optional | sometimes; nullable; string; max:100 |
| `external_client` | object | Optional | sometimes; nullable; array |
| `external_client.name` | string | Optional | sometimes; nullable; string; max:255 |
| `external_client.company` | string | Optional | sometimes; nullable; string; max:255 |
| `external_client.email` | string | Optional | sometimes; nullable; email; max:255 |
| `external_client.phone` | string | Optional | sometimes; nullable; string; max:20 |
| `external_client.client_type` | string | Optional | sometimes; nullable; string; max:100 |
| `external_client.agent` | object | Optional | sometimes; nullable; array |
| `external_client.agent.name` | string | Optional | sometimes; nullable; string; max:255 |
| `external_client.agent.phone` | string | Optional | sometimes; nullable; string; max:20 |
| `external_client.agent.email` | string | Optional | sometimes; nullable; email; max:255 |
| `rental_information` | object | Optional | sometimes; nullable; array |
| `rental_information.rental_start_date` | string | Optional | sometimes; nullable; date |
| `rental_information.rental_end_date` | string | Optional | sometimes; nullable; date; after_or_equal:rental_information.rental_start_date |
| `rental_information.lease_term_months` | integer | Optional | sometimes; nullable; integer; min:1; max:120 |
| `rental_information.monthly_rent` | number | Optional | sometimes; nullable; numeric; min:0 |
| `rental_information.security_deposit` | number | Optional | sometimes; nullable; numeric; min:0 |
| `internal_listing_id` | integer | Optional | sometimes; nullable; exists:listings,id |
| `lead_contact_id` | integer | Optional | sometimes; nullable; exists:leads,id |
| `deal_id` | integer | Optional | sometimes; nullable; exists:deals,id |
| `cheques` | array | Optional | sometimes; nullable; array; min:1 |
| `cheques.*.id` | integer | Optional | sometimes; nullable; integer; exists:transaction_cheques,id |
| `cheques.*.cheque_number` | string | Optional | sometimes; nullable; string; max:255 |
| `cheques.*.amount` | number | Optional | sometimes; nullable; numeric; min:0.01 |
| `cheques.*.due_date` | string | Optional | sometimes; nullable; date |
| `cheques.*.status` | string | Optional | sometimes; in:scheduled,deposited,paid,cleared,bounced,replaced,cancelled |
| `cheques.*.tenant_email` | string | Optional | sometimes; nullable; email; max:255 |
| `cheques.*.notes` | string | Optional | sometimes; nullable; string |
| `cheques.*.replaced_by_id` | integer | Optional | sometimes; nullable; integer; exists:transaction_cheques,id |
| `commission_splits` | array | Optional | sometimes; array; min:1 |
| `commission_splits.*.id` | integer | Optional | sometimes; nullable; integer; exists:commission_splits,id |
| `commission_splits.*.recipient_role` | string | Conditional | required_with:commission_splits; in:listing_agent,buyers_agent,tenants_agent,transaction_coordinator,referral_agent,broker_fee,administrative_fee,external_cooperation,custom |
| `commission_splits.*.internal_agent_id` | integer | Optional | sometimes; nullable; exists:users,id |
| `commission_splits.*.recipient_name` | string | Optional | sometimes; nullable; string; max:255 |
| `commission_splits.*.recipient_company` | string | Optional | sometimes; nullable; string; max:255 |
| `commission_splits.*.split_percentage` | number | Conditional | required_with:commission_splits; numeric; min:0; max:100 |
| `commission_splits.*.split_amount` | number | Conditional | required_with:commission_splits; numeric; min:0 |
| `commission_splits.*.is_external_payment` | boolean | Optional | sometimes; boolean |

## Example request

Replace the example IDs and values with records in your installation. Supply any
additional custom fields required by your company.

```json
{
  "operation": "transactions.update",
  "parameters": {
    "id": 1
  },
  "data": {
    "currency": "AED"
  },
  "idempotency_key": "example-event-12345"
}
```

## Response

Returns the updated transaction in `data`. Use `data.id` for subsequent requests. Related fields depend on the resource and your permissions.

The gateway preserves the underlying HTTP status and JSON body. Successful requests return **HTTP 200**. A response may also include localized message fields.

Illustrative response excerpt (additional fields may be returned):

```json
{
  "status": "success",
  "data": {
    "id": 456
  }
}
```

## Errors

| HTTP status | Meaning |
| --- | --- |
| 400 | A CRM business rule rejected the action. |
| 401 | Missing, invalid, expired or revoked connection key. |
| 403 | Connection access or CRM permissions do not allow this action. |
| 404 | Operation or record unavailable. |
| 409 | This idempotency key was already used with a different request. |
| 413 | Request or result exceeds its size limit; reduce payload or page size. |
| 422 | Missing or invalid fields, or a CRM business rule rejected the operation. |
| 429 | Rate limit exceeded; wait before retrying. |
| 500 | The server could not complete the operation. |

Validation failures may return `message` / `errors`, or an `error` string with
an optional `fields` array. The tester shows the actual HTTP status and full body.
[Read about limits and retries](https://www.brixit.io/docs/api#errors-and-limits).

## Try it

[Open the interactive API tester](https://www.brixit.io/docs/api-transactions-update#try-it)
