Skip to main content
PATCH
/
v1
/
transactions
/
{id}
Update a Transaction
curl --request PATCH \
  --url https://api.bookeeping.ai/public-api/v1/transactions/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "refNo": "<string>",
  "totalAmount": 123,
  "transactionDate": "2023-11-07T05:31:56Z",
  "paymentMethod": {},
  "isReconciled": true,
  "currency": "<string>",
  "entries": [
    {
      "id": "<string>",
      "amount": 123,
      "type": "DEBIT",
      "category": "<string>",
      "parentCategory": "INCOME",
      "isMain": true,
      "note": "<string>"
    }
  ],
  "counterParty": "<string>",
  "account": "<string>"
}
'
{
  "message": "<string>",
  "metaData": {
    "warnings": [
      "<string>"
    ]
  },
  "data": {
    "_id": "<string>",
    "projectId": "<string>",
    "currency": "<string>",
    "totalAmount": 123,
    "transactionDate": "2023-11-07T05:31:56Z",
    "paymentMethod": {},
    "source": {},
    "isReconciled": true,
    "nonProfitAllocations": [
      {
        "percentage": 123,
        "program": {
          "_id": "<string>",
          "name": "<string>",
          "status": "PLANNING",
          "createdAt": "2023-11-07T05:31:56Z",
          "updatedAt": "2023-11-07T05:31:56Z",
          "hexColor": "<string>"
        },
        "grant": {
          "_id": "<string>",
          "name": "<string>",
          "status": "ACTIVE",
          "createdAt": "2023-11-07T05:31:56Z",
          "updatedAt": "2023-11-07T05:31:56Z",
          "hexColor": "<string>",
          "funder": {
            "_id": "<string>",
            "accountName": "<string>",
            "accountNumber": "<string>",
            "email": "jsmith@example.com",
            "phone": "<string>",
            "type": "customer"
          }
        },
        "note": "<string>"
      }
    ],
    "entries": [
      {
        "id": "<string>",
        "amount": 123,
        "type": "DEBIT",
        "parentCategory": "INCOME",
        "category": {
          "_id": "<string>",
          "name": "<string>",
          "emoji": "<string>",
          "parentCategory": "INCOME",
          "number": "<string>",
          "group": "<string>"
        },
        "isMain": true,
        "note": "<string>"
      }
    ],
    "classes": [
      {
        "_id": "<string>",
        "name": "<string>",
        "description": "<string>",
        "emoji": "<string>",
        "color": "<string>"
      }
    ],
    "attachmentsIds": [
      "<string>"
    ],
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z",
    "refNo": "<string>",
    "originalAmount": 123,
    "originalCurrency": "<string>",
    "counterParty": {
      "_id": "<string>",
      "accountName": "<string>",
      "accountNumber": "<string>",
      "email": "jsmith@example.com",
      "phone": "<string>",
      "type": "customer"
    },
    "account": {
      "_id": "<string>",
      "accountType": "Depository",
      "accountName": "<string>",
      "accountNumber": "<string>"
    },
    "nonProfitGrantId": "<string>",
    "attachedTransactionId": "<string>"
  }
}

Authorizations

Authorization
string
header
required

API key for authentication. Get your key from the Dashboard > Settings > API Access.

Path Parameters

id
string
required

The id of the transaction. Expected to be a valid object id like 666666666666666666666666

Body

application/json
refNo
string | null
totalAmount
number

The total amount of the transaction. Same as the sum of the Total Credit = Total Debit.

transactionDate
string<date-time>

The transaction date of the transaction

paymentMethod
object

The payment method of the transaction

isReconciled
boolean

The reconciliation status of the transaction

currency
string | null
entries
object[]

The entries of the transaction

counterParty
string | null

The counter party id of the transaction. Expected to be a valid object id like 666666666666666666666666

account
string | null

The account id of the transaction. Expected to be a valid object id like 666666666666666666666666

Response

Update a Transaction executed successfully

message
string

Success message

metaData
object
data
object