Skip to main content

Updating a Current Account Transaction

Description

Used to update an existing current account transaction. The record to be updated is found by referencing either the UpdateErpCode (current ERP code) or the Id (system ID) fields sent in the request body. The new ERP code of the record is set via the erpCode field in the request body.

  • Endpoint: /cat/cat
  • Method: PUT

Request Example

  • Header: Authorization: Bearer {token}, Content-Type: application/json
  • Body: JSON

Request Body

FieldRequiredFormatDescription / Validation
UpdateErpCodeConditionalStringThe current ERP code of the record to be updated. This field is required if the Id field is empty.
IdConditionalGuidThe unique system ID of the record to be updated. This field is required if the UpdateErpCode field is empty.
AgentErpCodeYesStringThe ERP code of the related agent. Cannot be empty.
amountYesDecimalThe new debt amount. Must be (> 0).
paidAmountNoDecimalThe paid amount. Must be a positive number. Cannot be greater than amount.
documentNoYesStringThe new document number. Cannot be empty.
currentAccountErpCodeYesString[]The ERP code of the current account. Cannot be empty.
currentAccountTransactionTypeYesString (Enum)Must be one of the following values: "Promissory Note", "Cheque", "Credit Card", "Debt Receipt", "Invoice", "Wire Transfer", "Order", "Carryover", "Transfer".
dueDateYesDateTimeThe new due date (ISO 8601: YYYY-MM-DD).
transactionDateYesDateTimeThe new transaction date (ISO 8601: YYYY-MM-DD). Cannot be later than the dueDate.
currencyIdYesStringCurrency code (e.g., "TRY"). Must be defined in the system.
erpCodeYesStringThe new or updated ERP code of the transaction. Cannot be empty.
descriptionNoStringThe new transaction description.

Business Rules and Notes

  • Reference Identification: To update a record, you must send at least one of the UpdateErpCode or Id fields. If both are left empty, the request will receive a 400 Bad Request error.
  • Record Not Found: If no transaction matching the provided UpdateErpCode or Id is found in the system, a 404 Not Found error is returned.
  • ERP Code Management: While UpdateErpCode is used to locate the record to be updated, the erpCode field specifies the new ERP code of this record. If you do not want to change the ERP code, you can send the same value in both fields.
  • Duplicate ERP Code: If the new erpCode you want to assign is already used by another record (excluding the record being updated), the system returns a 409 Conflict error.
  • Date Validation: The transactionDate field cannot be later than the dueDate field.
{  
"agentErpCode": "NT26822394",
"amount": 4500,
"paidAmount": 0,
"documentNo": "DemoTest",
"currentAccountErpCode": "441B3BF1-8F5F-4CCD-A116-7CD90D3E4C04",
"documentType": "Senet",
"dueDate": "2025-08-05T07:51:00.157Z",
"transactionDate": "2025-08-05T07:51:00.157Z",
"currencyCode": "USD",
"description": "test test",
"updateErpCode": "7044dac0-bbb3-4845-a316-702e2702b1673",
"erpCode":"12001450"
}