A report's CSV at once, as views writes it for the workspace (catalog dimensions by id and name, formulas guarded): its range a preset (range, last_7_days by default) or days (from and to, YYYY-MM-DD, both included); up to 10 000 rows and 5 MiB, else 409 export_too_large and it's an export
GET
/v1/buyer/reports/csv
const url = 'https://example.com/v1/buyer/reports/csv';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/v1/buyer/reports/csv \ --header 'Authorization: Bearer <token>'Who: a workspace’s member, staff under its support access, or its key. API keys with the stats:read scope.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”range
string
from
string
to
string
time_zone
string
currency
string
group_by
string
columns
string
sort
string
time_basis
string
compare
string
compare_from
string
compare_to
string
model
string
filter
string
exclude
string
Responses
Section titled “Responses”The file, as an attachment
Media typetext/csv
string
default
Section titled “default”An error, as go-commons apperr maps it
Media typeapplication/json
object
error
required
object
code
required
string
fields
object
key
additional properties
string
message
required
string
Example generated
{ "error": { "code": "example", "fields": { "additionalProperty": "example" }, "message": "example" }}