Depa LogoDocsv1
API Reference

Reports

Reports are vault-wide CSV exports, generated in the background.

  1. Create a report for a date range with POST /vaults/{vault_id}/reports.
  2. Poll GET /vaults/{vault_id}/reports/{id} until status is completed (or failed, with the reason in error_message).
  3. Call the download endpoint to get a signed URL for the file. The URL is valid for one hour; request a new one if it expires.

The available report type is card_payments.

List reports

GET/vaults/{vault_id}/reports

Returns the reports of a vault, newest first. Filter by status or report_type.

Authorization

BearerAuth
AuthorizationBearer <token>

Token from POST /sign_in, sent as Authorization: Bearer <token>.

In: header

Path Parameters

vault_id*string

Vault ID

Formatuuid

Query Parameters

status?string

Return only reports with this status.

Value in

  • "pending"
  • "processing"
  • "completed"
  • "failed"
report_type?"card_payments"

Return only reports of this type.

Value in

  • "card_payments"
page?integer

Page number, starting at 1.

Range1 <= value
Default1
per_page?integer

Number of results per page. Defaults to 25.

Range1 <= value
Default25

Response Body

application/json

application/json

application/json

curl -X GET "https://example.com/vaults/ea8fef00-eb80-41c5-a3b1-b3ed9d65ea5b/reports?status=completed&report_type=card_payments&page=1&per_page=25"
{  "data": [    {      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",      "report_type": "card_payments",      "status": "completed",      "start_date": "2025-01-01",      "end_date": "2025-01-31",      "error_message": "Failed to generate report",      "created_at": 1750844132,      "completed_at": 1750847732    }  ],  "pagination": {    "current_page": 1,    "per_page": 80,    "total_pages": 1,    "total_count": 2  }}

Create a report

POST/vaults/{vault_id}/reports

Starts generating a report for a date range. It's built in the background: poll the report until status is completed, then get the file from the download endpoint.

Authorization

BearerAuth
AuthorizationBearer <token>

Token from POST /sign_in, sent as Authorization: Bearer <token>.

In: header

Path Parameters

vault_id*string

Vault ID

Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/vaults/ea8fef00-eb80-41c5-a3b1-b3ed9d65ea5b/reports" \  -H "Content-Type: application/json" \  -d '{    "report_type": "card_payments",    "start_date": "2026-03-01",    "end_date": "2026-03-31"  }'
{  "data": {    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",    "report_type": "card_payments",    "status": "completed",    "start_date": "2025-01-01",    "end_date": "2025-01-31",    "error_message": "Failed to generate report",    "created_at": 1750844132,    "completed_at": 1750847732  }}

Retrieve a report

GET/vaults/{vault_id}/reports/{id}

Returns a report and its status. Poll it after creating a report until status is completed or failed.

Authorization

BearerAuth
AuthorizationBearer <token>

Token from POST /sign_in, sent as Authorization: Bearer <token>.

In: header

Path Parameters

vault_id*string

Vault ID

Formatuuid
id*string

ID of the report.

Formatuuid

Response Body

application/json

application/json

application/json

curl -X GET "https://example.com/vaults/ea8fef00-eb80-41c5-a3b1-b3ed9d65ea5b/reports/a1b2c3d4-e5f6-7890-abcd-ef1234567890"
{  "data": {    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",    "report_type": "card_payments",    "status": "completed",    "start_date": "2025-01-01",    "end_date": "2025-01-31",    "error_message": "Failed to generate report",    "created_at": 1750844132,    "completed_at": 1750847732  }}
GET/vaults/{vault_id}/reports/{id}/download

Returns a signed URL to download the report's CSV file. The URL is valid for one hour; call this endpoint again for a new one. The report must be completed, otherwise the response is 422 with report_not_ready.

Authorization

BearerAuth
AuthorizationBearer <token>

Token from POST /sign_in, sent as Authorization: Bearer <token>.

In: header

Path Parameters

vault_id*string

Vault ID

Formatuuid
id*string

ID of the report.

Formatuuid

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/vaults/ea8fef00-eb80-41c5-a3b1-b3ed9d65ea5b/reports/a1b2c3d4-e5f6-7890-abcd-ef1234567890/download"
{  "download_url": "https://s3.amazonaws.com/bucket/reports/card_payments_1_2025-01-01_2025-01-31.csv?...",  "expires_in": 3600,  "filename": "card_payments_1_2025-01-01_2025-01-31.csv"}
🍪 We do not track your behaviour or use any cookie on this site.