WorkBuddy

Interact with WorkBuddy API - Field service management

Actions227

Service Plans → Create a Service Plan

AI-generated

Summary

Creates a new Service Plan contract header by sending a POST request with required fields such as integrationId, name, customerId, siteId, and dateStart. Optional fields include description, dateEnd, workingDays, blackoutRanges, and jobDefaults. Lines and Tasks are managed through their respective nested endpoints.

Inputs

  • integrationId (required) — integration ID
  • name (required) — Display name
  • customerId (required) — Customer ID — use /crm/customers to look up
  • siteId (required) — Site ID — use /crm/sites to look up
  • dateStart (required) —
  • description — Detailed description
  • dateEnd —
  • workingDays — Array of working days (Mon, Tue, Wed, Thu, Fri, Sat, Sun)
  • blackoutRanges —
  • jobDefaults —
  • requestOptions — Configuration for batching, SSL, proxy, and timeout

Output shape

a single record (the created service plan)

The API response is returned directly as the item output.

Examples

Example 1: Create a new 30-day service plan for a customer on a specific site, active from January 1st to January 30th, with Monday through Friday as working days.

Name: 'Monthly Subscription', customerId: '12345', siteId: '67890', dateStart: '2024-01-01', dateEnd: '2024-01-30', workingDays: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri']

Example 2: Create a short-term service plan with a custom batch size to avoid hitting API rate limits.

Name: 'Urgent Fix', customerId: '55555', siteId: '99999', dateStart: '2024-12-25', workingDays: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri'], requestOptions: { batching: { batchSize: 5, batchInterval: 2000 } }

Links

Discussion