McMain icon

McMain

Interact with McMain API

Work Order → Create

AI-generated

Summary

Create a new work order in the McMain system

Inputs

  • description (required) — Short description of the work order
  • typeId (required) — ID of the type of the work order
  • faultId (required) — ID of the cause of the work order
  • priorityId (required) — ID of the priority of the work order
  • assetId (required) — ID of the asset of the work order
  • accountId (required) — ID of the account of the work order
  • additionalFields — Optional key‑value pairs to add extra data to the request
  • requestOptions — HTTP request configuration such as batching, timeout, proxy, SSL settings

Output shape

JSON object representing the created work order

Includes at least the work order ID; may contain additional fields returned by the API

Examples

Example 1: Add a new work order for equipment maintenance

description=Maintenance of pump, typeId=12, faultId=34, priorityId=5, assetId=67, accountId=89, requestOptions.timeout=15000

Example 2: Create a work order with extra fields and batching

description=Inspection, additionalFields[employeeId]=101;102, requestOptions.batching.batchSize=100

Example 3: Create with default values and ignore SSL issues

typeId=7, priorityId=2, requestOptions.allowUnauthorizedCerts=true

Discussion