Get Sales Report
asc_get_sales_reportRetrieve sales summary reports for your vendor by specifying a date and frequency (daily, weekly, monthly, yearly). Returns report rows with total and truncated data.
Instructions
Fetch a sales summary report (SALES / SUMMARY / version 1.0) for the vendor configured via the ASC_VENDOR_NUMBER environment variable.
Args:
reportDate (string, required): Date of the report. Format depends on frequency: DAILY / WEEKLY -> "YYYY-MM-DD" MONTHLY -> "YYYY-MM" YEARLY -> "YYYY"
frequency (string): "DAILY" (default) | "WEEKLY" | "MONTHLY" | "YEARLY"
Returns: { "totalRows": number, // total number of data rows in the report "returnedRows": number, // number of rows included in this response (max 50) "truncated": boolean, // true if totalRows > returnedRows "rows": [ { : , ... } ] }
Error Handling:
Returns an error if ASC_VENDOR_NUMBER is not set
Returns "Error: Resource not found" (HTTP 404) if no report exists for the given date/frequency
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| frequency | No | Report frequency: DAILY (default), WEEKLY, MONTHLY, or YEARLY. | DAILY |
| reportDate | Yes | The report date. Format depends on frequency: DAILY/WEEKLY = YYYY-MM-DD, MONTHLY = YYYY-MM, YEARLY = YYYY. |