APG PayAPG Paydocs

Merchants

List travel entry refund candidates

GET/travel-entries/{travelEntryId}/refund-candidates
Request
GEThttps://api.tst.au.apgpay.dev/travel-entries/{travelEntryId}/refund-candidates
curl -X GET https://api.tst.au.apgpay.dev/travel-entries/{travelEntryId}/refund-candidates \
  -H "Authorization: Bearer $API_KEY"

Return the purchases this refund may be a refund of, oldest first, for the staff who relink it with TvlentUpdateRelinkOriginal. They are found on the refund's own card, which is never published, and are the owner's matched purchases of the refund's kind of file and processing page with at least the refund's amount still unrefunded. matchOn adds the references they must share with it. Only a refund has candidates.

Permissions

Required permission
merchantTravelData:update

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

Path parameters

travelEntryIdstring
required

Query parameters

pageinteger (int32)

1-based page number.

limitinteger (int32)

Maximum items per page.

matchOnone of TvlentRefundMatchField, array of TvlentRefundMatchField

What else a purchase must share with the refund. Repeat the parameter to require several. A purchase is always on the refund's card, owner, kind of file and processing page, with at least the refund's amount unrefunded.

Responses

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

Discriminated by type
type = "TvlentRefundCandidatePageAttributes"
hasMorebooleanrequired

Whether further items exist after this page.

Example true

nextStartingAfterstring

Id to pass as startingAfter to fetch the next page. Present in cursor mode only.

totalCountinteger (int64)

Total items matching the query.

Example 42

pageinteger (int32)

The 1-based page returned. Present in offset mode only.

Example 1250

totalPagesinteger (int32)

Total pages available. Present in offset mode only.

Example 1250

Example
{
  "type": "TvlentRefundCandidatePageAttributes",
  "data": [
    {
      "type": "TvlentViewAttributes",
      "travelEntryId": "tvlent_9f2Kd8QpLzXw",
      "travelFileId": "tvlfile_9f2Kd8QpLzXw",
      "travelBatchId": "tvlbat_9f2Kd8QpLzXw",
      "merchantId": "mcht_9f2Kd8QpLzXw",
      "ownerMerchantId": "mcht_9f2Kd8QpLzXw",
      "fileType": "Merchant",
      "processingDate": "2026-08-19",
      "lineNumber": 1250,
      "serviceKind": "Flight",
      "sign": "Purchase",
      "cardType": "Uatp",
      "hasCardToken": true,
      "documentNumberFormat": "2026-08-19T04:21:07Z",
      "documentNumber": "string",
      "serialNumber": "string",
      "purchaseDate": "2026-08-19",
      "travellerName": "Ada Lovelace",
      "amounts": {
        "type": "TvlentAmountsAttributes",
        "currency": "AUD",
        "amount": 1250,
        "netAmountNonVatable": 1250,
        "netAmountVatable": 1250,
        "vatAmount": 1250,
        "refundedAmount": 1250,
        "vatPercentage": "string",
        "vatIndicator": "string"
      },
      "approvalCode": "string",
      "merchantDetails": {
        "type": "TvlentMerchantDetailsAttributes",
        "name": "Ada Lovelace",
        "city": "string",
        "zipCode": "string",
        "stateCode": "string",
        "iataNumber": "string",
        "invoiceNumber": "string",
        "orderNumber": "string",
        "customerNumber": "string",
        "agencyDossierNumber": "string",
        "agencyDeliveryNoteNumber": "string"
      },
      "usageCode": "string",
      "validation": "Passed",
      "dbi": {
        "type": "TvlentDbiAttributes",
        "pk": "string",
        "ds": "string",
        "ks": "string",
        "ae": "string",
        "ik": "string",
        "bd": "2026-08-19",
        "pr": "string",
        "au": "string",
        "ak": "string",
        "rz": "string",
        "status": "NotRequired",
        "statusAt": "2026-08-19T04:21:07Z",
        "statusMessage": "Active",
        "mandatoryFields": "string"
      },
      "authorisation": {
        "type": "TvlentAuthorisationAttributes",
        "operator": "ApgPay",
        "status": "NotRequired",
        "statusAt": "2026-08-19T04:21:07Z",
        "statusMessage": "Active",
        "refundStatus": "NotRequired",
        "refundStatusAt": "2026-08-19T04:21:07Z"
      },
      "matching": {
        "type": "TvlentMatchAttributes",
        "status": "NotRequired",
        "statusAt": "2026-08-19T04:21:07Z",
        "statusMessage": "Active",
        "timedOut": true,
        "needsManualOriginalMatch": true,
        "originalTravelEntryId": "tvlent_9f2Kd8QpLzXw",
        "transactionId": "tran_9f2Kd8QpLzXw",
        "refundId": "rfnd_9f2Kd8QpLzXw",
        "issuerTransactionId": "itxn_9f2Kd8QpLzXw",
        "issuerRefundId": "rfnd_9f2Kd8QpLzXw",
        "loanId": "loan_9f2Kd8QpLzXw",
        "customerId": "cust_9f2Kd8QpLzXw"
      },
      "enabled": true,
      "serviceLines": [
        {
          "type": "TvlentServiceLineCar",
          "currency": "AUD",
          "rentalCompanyCode": "string",
          "contractNumber": "string",
          "vehicleClassCode": "string",
          "vehicleType": "string",
          "noShow": true,
          "pickUpDate": "2026-08-19",
          "pickUpTime": "string",
          "pickUpLocationCode": "string",
          "pickUpLocationCity": "string",
          "returnDate": "2026-08-19",
          "returnTime": "string",
          "returnLocationCode": "string",
          "returnLocationCity": "string",
          "rentalDays": 1250,
          "mileageIndicator": "string",
          "drivenDistance": "string",
          "charges": [
            {
              "type": "TvlentCarChargeAttributes",
              "kind": "string",
              "amount": 1250,
              "vatIndicator": "string"
            }
          ]
        }
      ],
      "createdAt": "2026-08-19T04:21:07Z",
      "updatedAt": "2026-08-19T04:21:07Z"
    }
  ],
  "hasMore": true,
  "nextStartingAfter": "string",
  "totalCount": 42,
  "page": 1250,
  "totalPages": 1250
}

Error responses