APG PayAPG Paydocs

Operations

Update export job

PATCH/export-jobs/{exportJobId}

Cancel one export job, or put one that failed on the platform's side back in the queue. Answers the job as it now is.

2 actionsExptjobUpdateCancelExptjobUpdateRequeue

Permissions

Required permission
queues:update

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

Path parameters

exportJobIdstring
required

Request body

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

Discriminated by type
type = "ExptjobUpdateCancel"

This variant has no additional fields.

curl -X PATCH https://api.tst.au.apgpay.dev/export-jobs/{exportJobId} \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "type": "ExptjobUpdateCancel"
}'

Responses

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

Discriminated by type
type = "ExptjobViewAttributes"
exportJobIdExptjobIdrequired

Identifier of an export, as its owner names it.

Example expt_9f2Kd8QpLzXw

tenantstringrequired

The tenant it was asked in, by contextual id, or platform.

ownerstringrequired

Who asked, keyed as reporting keys an owner: user_, key_, or staff_ and the SHA-256 of an email address.

sourcestringrequired

What it exports.

sourceKindExptSourceKindrequired

What its source reads.

ListQuestionDashboardUnknown
summarystringrequired

What was asked of the source: the names of the parameters given, never their values.

stateExptStaterequired
QueuedRunningDoneFailedExpiredCancelledDeletedUnknown
rowsWritteninteger (int64)required

Rows written so far, the header aside.

Example 1250

failureCodeExptFailureCode

Why it failed, as a code, when it has.

RefusedTooLargeTooSlowWaitedTooLongStoppedInterruptedNotWrittenQueueGaveUpUnknown
failurestring

Why it failed, in words, when it has.

createdAtstring (date-time)required

Example 2026-08-19T04:21:07Z

startedAtstring (date-time)

When it was first taken up to be written.

Example 2026-08-19T04:21:07Z

finishedAtstring (date-time)

When it was done, failed or cancelled.

Example 2026-08-19T04:21:07Z

Example
{
  "type": "ExptjobViewAttributes",
  "exportJobId": "expt_9f2Kd8QpLzXw",
  "tenant": "string",
  "owner": "string",
  "source": "string",
  "sourceKind": "List",
  "summary": "string",
  "state": "Queued",
  "rowsWritten": 1250,
  "failureCode": "Refused",
  "failure": "string",
  "createdAt": "2026-08-19T04:21:07Z",
  "startedAt": "2026-08-19T04:21:07Z",
  "finishedAt": "2026-08-19T04:21:07Z"
}

Error responses