Create a report
Creates a new report for a specific
type
. Once created, you can retrieve the report results from the URL returned.Parameters
type
enum
The report type generated. See report types.
Optional
Returns
Returns a report object.
- cURL
- Node.js
- Python
POST
/reports
curl https://production.methodfi.com/reports \
-X POST \
-H "Authorization: Bearer sk_WyZEWVfTcH7GqmPzUPk65Vjc" \
-H "Content-Type: application/json" \
-d '{
"type": "payments.created.current"
}'
POST
/reports
const report = await method.reports.create({ type: 'payments.created.current' });
POST
/reports
report = method.reports.create({ 'type': 'payments.created.current' })
RESPONSE
{
"id": "rpt_cj2mkA3hFyHT5",
"type": "payments.created.current",
"url": "https://production.methodfi.com/reports/rpt_cj2mkA3hFyHT5/download",
"status": "completed",
"metadata": null,
"created_at": "2021-08-25T23:18:05.261Z",
"updated_at": "2021-08-25T23:18:05.261Z"
}