/workorder/{workOrderId}/rollback v1.0.0
Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.
Base URLs:
Work Orders
postWorkOrderIdRollback
Code samples
const headers = {
Accept: "application/json",
Authorization: {
type: "string",
},
};
fetch("https://goldleaf.app/api/v1/workorder/{workOrderId}/rollback", {
method: "POST",
headers: headers,
})
.then(function (res) {
return res.json();
})
.then(function (body) {
console.log(body);
});
POST /workorder/{workOrderId}/rollback
Deletes the latest version of the specified work order and reverts to the previous version
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| Authorization | header | string | true | Bearer token for authorization |
| workOrderId | path | string | true | Work order ID to rollback (MongoDB ObjectId) |
Example responses
200 Response
{
"description": null,
"type": "string"
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Rollback successful, reverted to previous version | string |
| 204 | No Content | none | string |
| 500 | Internal Server Error | none | string |
