McMain icon

McMain

Interact with McMain API

Employee → Update

AI-generated

Summary

Updates an employee record by ID with supplied field values.

Inputs

  • id (required) — ID of the employee to update
  • name — Full name of the employee
  • crewId — Group/Crew the employee belongs to
  • vendorId — ID of the vendor of the employee
  • departmentId — ID of the department of the employee
  • phone — Phone number of the employee
  • mobile — Mobile number of the employee
  • email — Email address of the employee
  • rate — Rate of the employee (numeric, up to two decimal places)
  • planningFlag — Whether the employee appears on the planboard
  • financialReference — External reference number for the employee
  • availableHoursMonday — Available hours on Monday
  • availableHoursTuesday — Available hours on Tuesday
  • availableHoursWednesday — Available hours on Wednesday
  • availableHoursThursday — Available hours on Thursday
  • availableHoursFriday — Available hours on Friday
  • availableHoursSaturday — Available hours on Saturday
  • availableHoursSunday — Available hours on Sunday
  • batching — Batch settings for throttling requests (batchSize and batchInterval)
  • allowUnauthorizedCerts — Whether to accept the response even if SSL certificate validation fails
  • proxy — HTTP proxy to use (e.g., http://username:password@myproxy:3128)
  • timeout — Timeout in milliseconds for the request

Output shape

a single updated employee object

The response contains the updated employee data; fields not provided may be omitted.

Examples

Example 1: Update employee's name and rate

Set Employee ID to 123, add a field name with value 'John Doe' and rate with value 45.5, then execute the node.

Example 2: Batch update multiple employees

Configure batching with batchSize 100 and batchInterval 500, provide IDs and fields for several employees, then run the node.

Discussion