McMain icon

McMain

Interact with McMain API

Hours → Register

AI-generated

Summary

Registers a new hours entry for a work order, employee, date, and duration.

Inputs

  • workOrderId (required) — ID of the work order the hours belong to
  • employeeId (required) — ID of the employee that worked the hours
  • date (required) — Date that the hours were worked
  • hours (required) — Amount of hours worked
  • additionalFields — Additional fields to include in the request payload
  • requestOptions — Various request-level options such as batching, SSL verification, proxy, and timeout

Output shape

a single record representing the newly created hours entry

The response contains the created record; errors are returned in an envelope with a status code.

Examples

Example 1: Register 8 hours for work order 12345 worked by employee 987 on 2024-09-01

Set Work Order ID=12345, Employee ID=987, Date=2024-09-01, Hours=8

Example 2: Register multiple batches of hours with default batching

Enable Batching with batchSize=50 and batchInterval=1000

Example 3: Register using a custom proxy and longer timeout

Set Proxy=http://proxy:3128, Timeout=15000, AllowUnauthorizedCerts=true

Discussion