Skip to content

Schedules

Manage recurring export schedules. Each schedule defines a query (source/fields/filters — the same shape as POST /payments/query) that is re-executed on a fixed interval, producing a new export run each time.


GET /schedules

Returns all recurring export schedules for the authenticated tenant.

Status Codes

Status Description
200 Schedule list returned.
401 Missing or invalid API key.

Example Request

curl https://ext.arc-aegis.billtrust.com/api/v1/remittance-export/schedules \
  -H "X-API-Key: <your-api-key>"

Example Response — 200

{
  "data": [
    {
      "id": "8f2c1e40-1234-4abc-9def-000000000001",
      "tenantId": "acme-corp",
      "scheduleName": "cashapp-nightly-recon",
      "intervalMs": 86400000,
      "source": "cashapp",
      "fields": ["id", "status", "totalAmount", "currency", "createDateTime"],
      "filters": { "status": { "eq": "Paid" } },
      "nextRunAt": "2026-07-15T02:00:00.000Z",
      "createdAt": "2026-06-01T10:00:00.000Z",
      "updatedAt": "2026-06-01T10:00:00.000Z"
    }
  ]
}

POST /schedules

Creates a recurring export schedule. The query definition is validated at creation time and is exactly what each scheduled run executes.

Request Body

Field Type Required Description
scheduleName string No Optional human-readable label for this schedule.
intervalMs integer Yes Interval in milliseconds. Minimum 300000 (5 minutes).
firstRunAt string (date-time) No Optional first run time. Defaults to now + intervalMs.
source string (cashapp, iandp, bpn) Yes Payment data source to query.
fields array of string No Fields to select. Omit to select all core fields.
filters object Yes Field-level filters. Same shape as POST /payments/query — at least one is required so a schedule can't be created that dumps the whole tenant table on every run.

Status Codes

Status Description
201 Schedule created.
400 Validation error (e.g. intervalMs below the 5-minute minimum, no filters provided, invalid filters).
401 Missing or invalid API key.

Example Request

curl -X POST https://ext.arc-aegis.billtrust.com/api/v1/remittance-export/schedules \
  -H "X-API-Key: <your-api-key>" \
  -H "Content-Type: application/json" \
  -d '{
    "scheduleName": "cashapp-nightly-recon",
    "intervalMs": 86400000,
    "source": "cashapp",
    "fields": ["id", "status", "totalAmount", "currency", "createDateTime"],
    "filters": { "status": { "eq": "Paid" } }
  }'

Example Response — 201

{
  "id": "8f2c1e40-1234-4abc-9def-000000000001",
  "tenantId": "acme-corp",
  "scheduleName": "cashapp-nightly-recon",
  "intervalMs": 86400000,
  "source": "cashapp",
  "fields": ["id", "status", "totalAmount", "currency", "createDateTime"],
  "filters": { "status": { "eq": "Paid" } },
  "nextRunAt": "2026-07-15T02:00:00.000Z",
  "createdAt": "2026-07-14T10:00:00.000Z",
  "updatedAt": "2026-07-14T10:00:00.000Z"
}

DELETE /schedules/{id}

Deletes a schedule. Future runs are cancelled; past export runs and their data snapshots are unaffected.

Path Parameters

Parameter Description
id The schedule's ID.

Status Codes

Status Description
204 Schedule deleted.
401 Missing or invalid API key.
404 Not found.

Example Request

curl -X DELETE https://ext.arc-aegis.billtrust.com/api/v1/remittance-export/schedules/8f2c1e40-1234-4abc-9def-000000000001 \
  -H "X-API-Key: <your-api-key>"