/workorders/export 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
postWorkOrdersExport
Code samples
const inputBody = '{
"workOrders": [
"60c72b2f9b1e8e4f12345678",
"60c72b2f9b1e8e4f87654321"
],
"selectAll": false,
"search": {
"number": "WO1234",
"description": "Leak test",
"status": "open"
}
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':{
"type": "string"
}
};
fetch('https://goldleaf.app/api/v1/workorders/export',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST /workorders/export
Export specified work orders
Body parameter
{
"workOrders": ["60c72b2f9b1e8e4f12345678", "60c72b2f9b1e8e4f87654321"],
"selectAll": false,
"search": {
"number": "WO1234",
"description": "Leak test",
"status": "open"
}
}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| Authorization | header | string | true | Bearer token for authorization |
| body | body | object | true | Work orders to export and search filters |
| » workOrders | body | [string] | true | List of work order IDs to export |
| » selectAll | body | boolean | true | Select all work orders ignoring specific IDs |
| » search | body | object | false | Optional search filters |
| »» number | body | string | false | none |
| »» description | body | string | false | none |
| »» status | body | string | false | none |
Example responses
500 Response
{
"type": "string"
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Work orders exported successfully | None |
| 400 | Bad Request | Invalid request body | None |
| 500 | Internal Server Error | none | string |
