Updating and management of jobs
This endpoint is available to manufacturers only.
Setting estimated completion dates is performed by sending a POST request to /api/job/<ID>/estimatedCompletion.
The request consists of a JSON document containing three fields:
{
"estimated_completion_date": "2025-01-01T12:34:56+01:00",
"trigger_notification": true,
"reason": "Supplier delays",
}
| Field | Type | Mandatory | Description |
|---|---|---|---|
estimated_completion_date |
string | Yes | ISO 8601 formatted estimated completion date |
trigger_notification |
boolean | No | Whether to email the customer about this change |
reason |
string | No | Message to add to the email to the customer |
Note:
estimated_completion_date must be formatted as an ISO 8601 date with an optional time component. 2025-01-02 and 2025-01-02T12:34:56+10:00 are equivalent.If the estimated completion date is successfully updated, and if an email is requested, that is sent, then this will return a 200 status code and a response containing the new estimated completion date and whether an email was sent or not.
If the job cannot be updated or the date is invalid, this will return an appropriate status code and an error response explaining how it failed. Note that it is possible that there may be multiple errors with a request, and in this case, only the first one checked will be returned.
POST /api/job/1234/estimatedCompletion
{
"estimated_completion_date": "2025-99-99T99:99:99+10:00",
"trigger_notification: true,
"reason": "Supplier delays"
}
{
"success": 0,
"error": "date is invalid or incorrectly formatted."
}
POST /api/job/1234/estimatedCompletion
{
"estimated_completion_date": "2025-01-02T12:34:56+10:00",
"trigger_notification: true,
"reason": "Supplier delays"
}
{
"success": 1,
"estimated_completion_date": "2025-01-02",
"email_sent": true
}