APG PayAPG Paydocs

Ledgers and journals

Update journal

PATCH/journals/{journalId}

Link a journal to the ledger it clears into, and record when it last cleared.

2 actionsSjnlUpdateLinkLedgerSjnlUpdateRecordClearance

Permissions

Required permission
systemJournals:update

Requires the `update` action on `systemJournals` for the supplied runtime context

Path parameters

journalIdstring
required

Request body

This body is a typed union. Pick a variant to see its fields and a matching example.

Discriminated by type
type = "SjnlUpdateLinkLedger"
systemLedgerIdSldgIdrequired

Identifier of a system ledger.

Example sldg_9f2Kd8QpLzXw

curl -X PATCH https://api.tst.au.apgpay.dev/journals/{journalId} \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "type": "SjnlUpdateLinkLedger",
  "systemLedgerId": "sldg_9f2Kd8QpLzXw"
}'

Responses

The response is a tagged shape: type is always "SjnlUpdateRspAttributes". Switch on it; subtypes can be added, and a client that already reads it will not break.

Discriminated by type
type = "SjnlUpdateRspAttributes"

The resource as it stands after the change.

Example
{
  "type": "SjnlUpdateRspAttributes",
  "updated": {
    "type": "SjnlViewAttributes",
    "journalId": "sjnl_9f2Kd8QpLzXw",
    "businessKey": {
      "type": "SjnlBusinessKeyAttributes",
      "ownerType": "Merchant",
      "ownerIdentifier": "string",
      "category": "General",
      "clearanceSystem": "string",
      "currency": "AUD"
    },
    "systemLedgerId": "sldg_9f2Kd8QpLzXw",
    "clearanceTimeZone": "string",
    "lastClearanceDate": "2026-08-19",
    "lastClearanceAt": "2026-08-19T04:21:07Z",
    "ownerName": "Ada Lovelace",
    "createdAt": "2026-08-19T04:21:07Z",
    "updatedAt": "2026-08-19T04:21:07Z"
  }
}

Error responses