agmission/Development/server/docs/EXPORT_USAGE_DETAIL.md

1.0 KiB

Export Usage Detail API Documentation

Endpoint

POST /exportUsageDetail

Description

Exports customer spray usage details as an Excel file. Supports filtering by date range, billable status, and applicator users (by username/email).

Request Parameters

  • from (string, required): Start date (YYYY-MM-DD)
  • to (string, required): End date (YYYY-MM-DD)
  • tz (string, optional): Timezone (e.g., 'America/Chicago')
  • billable (boolean, optional): Filter for billable customers
  • applicators (array of strings, optional): List of applicator usernames/emails to filter jobs

Example Request (JSON)

{
  "from": "2025-06-01",
  "to": "2025-07-01",
  "tz": "America/Chicago",
  "billable": true,
  "applicators": ["applicator1@email.com", "applicator2@email.com"]
}

Response

  • Excel file download containing filtered customer spray usage details.

Notes

  • If applicators is provided, only jobs performed by those applicator users will be included.
  • The output includes job details and the applicator for each job.