PUT /jobs/{jobId}/finalise
Changed onFinalises a draft job, turning it into an active job.
A draft job (created with isDraft: true via POST /jobs) has the status Draft, has no job number (jobNo and jobNumber are null), and doesn't appear in the Fergus job list. Finalising it:
- assigns the job its job number, after which it appears in the job list
- for Charge Up jobs, creates the job's first phase, and moves the job from To Price to Active
- sets the job's invoice due days from the customer's setting, or from the company default if the customer has none
- records the job as created by the authenticated user in the job's activity history
Quotes on the job aren't changed. A draft quote stays a draft, and isn't published or sent.
Required fields: the job must have a customer, site, job type, title and description. Use PUT /jobs/:jobId to fill in any that are missing first. If one is missing, the request fails with 400 and a message naming the first missing field, for example The job cannot be finalised: site must be set.
Finalising a job that's already finalised has no effect, and returns the job unchanged.
Request: send no body, with Content-Type: text/plain. Any other Content-Type, including application/json, is rejected with 400.
Request
- Base URLhttps://api.fergus.com
- Auth
- OAuth 2Authorization codehttps://auth.fergus.com/oauth2/authorizeToken URLhttps://auth.fergus.com/oauth2/token
- or HTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
Headers
Response
Successful Response
Changes
- breaking
added the new required
headerrequest parameterContent-Type
- breaking