Jobs

POST /jobs

Creates a new job. Supports two modes depending on whether isDraft is set:

Non-draft job (default, isDraft omitted or false): All of jobType, title, description, customerId, and siteId are required. The job is created in an active state and assigned a job number immediately.

Draft job (isDraft: true): Only jobType and title are required. description, customerId, and siteId are optional and can be filled in later via PUT /jobs/:jobId. A draft job does not receive a job number until it is finalised via PUT /jobs/:jobId/finalise.

Job types (jobType): Quote, Estimate, Charge Up

Typical draft workflow:

  1. POST /jobs with isDraft: true — create the draft

  2. PUT /jobs/:jobId — update fields (customer, site, description, etc.)

  3. PUT /jobs/:jobId/finalise — convert the draft to an active job

Variation job (parentJobId set): provide parentJobId to instead create a variation of an existing job:

  • requires jobType
  • inherits customer, site, contacts and budget from the parent
  • title, description and customerReference are optional overrides
  • always created finalised (non-draft)

Request

  • Base URL
    https://api.fergus.com
  • Auth
    • OAuth 2
      Authorization codehttps://auth.fergus.com/oauth2/authorize
      Token URLhttps://auth.fergus.com/oauth2/token
    • or HTTP bearer
  • TypeScript
    A function with typed inputs. Its response is checked against the schema.

Request body

isDraftboolean
jobType'Quote' | 'Estimate' | 'Charge Up' required
titlestring
descriptionstring
customerIdnumber
customerReferencestring
siteIdnumber
parentJobIdnumber

When provided, creates a variation of the job with this id as its parent. Only jobType is required; title, description and customerReference are optional and inherited from the parent when omitted.

Response

Resource created successfully

resultstring required

Changes

No recorded changes to this operation across all 18 revisions of this API.