Cancel a rework order
const url = 'https://app.buildtrace.eu/api/rework-orders/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/cancel';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"reason":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://app.buildtrace.eu/api/rework-orders/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/cancel \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "reason": "example" }'Cancels a rework order opened by mistake, with a reason (recorded in the audit log). Its unit is free to be reserved again (unless another rework is open on it), and a cancelled retrofit stamps nothing, so the unit still needs the ECO. Only an order nothing has been fitted or removed under can be cancelled, and not an RMA repair (complete it to return the unit).
Required scope: service:write.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”object
Why the order is cancelled (recorded in the audit log).
Example generated
{ "reason": "example"}Responses
Section titled “Responses”OK
object
The order’s number within the organization, e.g. RW-0001
Human-readable serial number of the unit being reworked (read-only).
ECO number, when the order is ECO-linked (read-only).
ECO title, when the order is ECO-linked (read-only).
Example generated
{ "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "orderNumber": "example", "serialId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "reason": "example", "ecoId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "status": "example", "serialNumber": "example", "ecoNumber": "example", "ecoTitle": "example"}The reason is missing
object
Example generated
{ "error": "example"}Unauthorized
Forbidden (the caller lacks service:write)
Not found
The order is already completed or cancelled, units have been fitted or removed under it, or it is an RMA repair
object
Example generated
{ "error": "example"}