APG PayAPG Paydocs

Loans

Update loan agreement

PATCH/loan-agreements/{loanAgreementId}

Change what may be outstanding on an agreement. An agreement cannot be renamed.

Permissions

Required permission
loanMasterAgreements:update

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

Path parameters

loanAgreementIdstring
required

Request body

This body is a tagged shape: type is always "LmaUpdateAttributes". Send it; more variants can be added, and a caller that switches on it keeps working when they are.

Discriminated by type
type = "LmaUpdateAttributes"

The most that may be outstanding on the agreement at once. Must be in the agreement's own currency.

curl -X PATCH https://api.tst.au.apgpay.dev/loan-agreements/{loanAgreementId} \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "type": "LmaUpdateAttributes",
  "maxLimit": {
    "type": "IsoCurrencyAmount",
    "minorCurrencyUnits": 1250,
    "currency": "AUD"
  }
}'

Responses

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

Discriminated by type
type = "LmaUpdateRspAttributes"

The resource as it stands after the change.

Example
{
  "type": "LmaUpdateRspAttributes",
  "updated": {
    "type": "LmaViewAttributes",
    "loanAgreementId": "lma_9f2Kd8QpLzXw",
    "loanFacilityId": "lfac_9f2Kd8QpLzXw",
    "enterpriseId": "ent_9f2Kd8QpLzXw",
    "referenceAgreementId": "your-own-reference",
    "description": "string",
    "balances": {
      "type": "LmaBalancesAttributes",
      "currency": "AUD",
      "available": 1250,
      "used": 1250,
      "maxLimit": 500000
    },
    "createdAt": "2026-08-19T04:21:07Z",
    "updatedAt": "2026-08-19T04:21:07Z"
  }
}

Error responses