Response schema:
application/jsonPayiano's API provides a flexible response system for all list endpoints, allowing developers to control how data is returned — whether as standard JSON, aggregated summaries, or downloadable export files.
This unified approach ensures that the same endpoint can serve both API integrations and analytical or reporting use cases efficiently.
response_type query parameter to control the output format of any list endpoint. The same filtering, sorting, and pagination parameters work consistently across all response types. Standard JSON responses with pagination metadata. Ideal for building user interfaces, data tables, and general API integrations.
Aggregated data with metrics and grouping. Perfect for dashboards, business intelligence, and analytical applications.
Downloadable files in various formats for external analysis, reporting tools, and data sharing with stakeholders.
Same parameters work across all response types. Apply filters, sorting, and includes regardless of output format.
| Response Type | Content Type | Use Case | Default | Includes Support |
|---|---|---|---|---|
json_list | application/json | API integrations, UI development | ||
json_aggregate | application/json | Dashboards, analytics, reporting | — | — |
export_csv | text/csv | Data sharing, spreadsheet analysis | — | |
export_xls | application/vnd.ms-excel | Legacy Excel compatibility | — | |
export_xlsx | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet | Modern Excel and spreadsheet tools | — |
json_list is the default response type and does not need to be explicitly specified. The includes parameter works with both json_list and export formats. json_list Standard JSON Response The default response type that returns a paginated list of resources with comprehensive metadata. Ideal for building user interfaces and general API integrations. No need to specify this explicitly unless overriding another response type.
includes parameter GET/client/customers?response_type=json_listhttps://api.payiano.dev/v1/client/customers?response_type=json_listhttps://api.payiano.com/v1/client/customers?response_type=json_list200application/jsontotal_pages Type: integerThe total number of pages that are available for the items search criteria. |
current_page Type: integerThe current pagination page. |
per_page Type: integerThe amount of items items return per page. |
total_items Type: integerThe total number of items that match the search criteria. |
items Type: array_of_objectsThe list of items that match the search criteria. |
json_aggregate Aggregated Analytics Returns aggregated data with metrics and grouping capabilities. Requires the aggregations parameter to define which metrics and dimensions to compute.
count, sum, avg metrics aggregations parameter GET/client/customers?response_type=json_aggregatehttps://api.payiano.dev/v1/client/customers?response_type=json_aggregatehttps://api.payiano.com/v1/client/customers?response_type=json_aggregateexport_* File Export Formats Generate downloadable files in various formats for external analysis, reporting tools, and data sharing. All export formats support the same filtering, sorting, and includes as JSON responses.
export_csv CSV Export Comma-separated values format. Lightweight and widely compatible with spreadsheet applications and data analysis tools.
export_xls Excel XLS Legacy Excel format (.xls). Compatible with older versions of Microsoft Excel and other spreadsheet applications.
export_xlsx Excel XLSX Modern Excel format (.xlsx). Recommended for current versions of Microsoft Excel, Google Sheets, and other modern applications.
Export responses return file downloads with appropriate Content-Type headers and include a Content-Disposition header that triggers automatic file downloads in browsers and specifies the filename. The response body will be the binary file content rather than JSON.
Content-Disposition: attachment; filename=customers-2025-10-28.csv The filename follows the pattern: {resource-plural}-{YYYY-MM-DD}.{ext} (e.g., customers-2025-10-28.csv)