McMain icon

McMain

Interact with McMain API

Hours → Get Details

AI-generated

Summary

Retrieves Hour details from the McMain API.

Inputs

  • returnAll — When true, returns all matching hour records; when false, respects the limit parameter.
  • limit — Maximum number of hour records to return (1‑500). Ignored if returnAll is true.
  • filters — Collection of filter criteria such as customerCode, employee, status, week, or workorder.
  • requestOptions — Additional HTTP request settings like batching, SSL verification, proxy, and timeout.

Output shape

a list of hour records

The response contains an array of hour objects; may be empty or truncated based on limit. No error envelope is returned on success.

Examples

Example 1: Fetch the first 20 hours for a specific work order

limit=20, filters={workorder:'WO123'}, requestOptions.timeout=15000

Example 2: Return all hours filtered by a particular employee

returnAll=true, filters={employee:'John Doe'}

Example 3: Batch request with 100 items per batch

limit=500, requestOptions.batchSize=100, requestOptions.batchInterval=500

Discussion