#Bernardo Quina - metrics
1 messages ยท Page 1 of 1 (latest)
Unfortunately as you note there is not a way to directly pull those fields in the API so you will need to get it via a report or pull the data and calculate the metrics yourself.
That sounds like it should be populated by something. Do you have the request ID (req_123) from a time that you pulled a report like this?
I can download the file from the provided url but the "data" parameter is empty.
Here is one from testing:
id: 'frr_1KdxHkCThf1ihfx6xlRN0SQB',
object: 'reporting.report_run',
created: 1647438788,
error: null,
livemode: false,
parameters: {
columns: [ 'gross', 'reporting_category' ],
connected_account: 'acct_1JUqYZ2HSvm7P5nt',
interval_end: 1647388800,
interval_start: 1630491636
},
report_type: 'connected_account_balance_change_from_activity.itemized.1',
result: {
id: 'file_1KdxHkCThf1ihfx65t40gIHL',
object: 'file',
created: 1647438788,
expires_at: 1678974788,
filename: 'frr_1KdxHkCThf1ihfx6xlRN0SQB.csv',
links: {
object: 'list',
data: [],
has_more: false,
url: '/v1/file_links?file=file_1KdxHkCThf1ihfx65t40gIHL'
},
purpose: 'finance_report_run',
size: 4248,
title: 'FinanceReportRun frr_1KdxHkCThf1ihfx6xlRN0SQB',
type: 'csv',
url: 'https://files.stripe.com/v1/files/file_1KdxHkCThf1ihfx65t40gIHL/contents'
},
status: 'succeeded',
succeeded_at: 1647438788
}```
But yeah I guess I'll process the csv file data in the server.
Thank you. I am less familiar with that endpoint but will look in to what that should be populated with.
Sorry it took me a bit to look at this. It looks like that is just an array of File Link objects. File Links are a Stripe object that you can make to retrieve the contents of the file without authentication https://stripe.com/docs/api/reporting/report_run/object
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
I am less familiar with them but I would guess that that array will be populated if you create a file link for that file https://stripe.com/docs/api/file_links/create#create_file_link
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
ok I see! Thank you for your help and time! ๐