Direct Debits

Create direct debit batch approval task

Changed on

Initiates an asynchronous approval or rejection of every step the caller's role can act on in the batch.

Use GET …/approval-tasks/{taskId} to poll task progress.

post/payments/v2beta/direct-debit-batches/{id}/approval-tasks

Request

Path parameters

idstring required

Atlar resource ID or External ID. Prefix External IDs with external:.

Request body

action'APPROVE' | 'REJECT' required

The action to perform on the approval step.

reasonstring

Rejection reason propagated to each payment's reject event. Required when action is REJECT.

allowDateChangeboolean

If true, bump the execution date to today for payments that are approved by this task and whose date is before today at the time of processing. Payments not approved by this task are left untouched. Only applies when action is APPROVE.

Example request

{
  "action": "APPROVE"
}

Response

The created approval task.

idstring required

Unique resource identifier.

organizationIdstring required

Unique resource identifier.

status'CREATED' | 'PROCESSING_STARTED' | 'COMPLETED' | 'CANCELLING' | 'CANCELLED' required

Lifecycle status of an asynchronous task.

timeoutinteger required

The maximum runtime in seconds.

runtimeMsinteger required

Elapsed runtime in milliseconds.

processedinteger required

Number of items processed so far.

starterUserIdstring required

Unique resource identifier.

starterRoleIdstring required

Unique resource identifier.

createdstring date-time required

Time at which the resource was created.

updatedstring date-time required

Time at which the resource was last updated.

versioninteger required

Resource version. Starts at value 1 when the resource is created and increases by one for each successive update.

Example response

{
  "id": "2ed9a3ee-60aa-4f9f-a858-2eed4eefbbc8",
  "organizationId": "2ed9a3ee-60aa-4f9f-a858-2eed4eefbbc8",
  "starterUserId": "2ed9a3ee-60aa-4f9f-a858-2eed4eefbbc8",
  "starterRoleId": "2ed9a3ee-60aa-4f9f-a858-2eed4eefbbc8",
  "errors": [
    {
      "code": "invalid_value",
      "error": "Must be one of [direct_debits mandates payments]",
      "field": "filter.0.resource",
      "metadata": {
        "resource": "credit_transfers",
        "method": "read"
      }
    }
  ],
  "created": "2022-05-04T18:31:12.889104898Z",
  "updated": "2022-05-04T18:47:32.213842599Z",
  "version": 1,
  "input": {
    "batchId": "2ed9a3ee-60aa-4f9f-a858-2eed4eefbbc8",
    "action": "APPROVE",
    "approver": {
      "userId": "2ed9a3ee-60aa-4f9f-a858-2eed4eefbbc8"
    }
  }
}

Changes