/workorders/checkexisting 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
postWorkOrdersCheckExisting
Code samples
const inputBody = '{
"type": "object",
"properties": {
"params": {
"type": "object",
"required": [
"number"
],
"properties": {
"number": {
"type": "string",
"description": "Work order number to search for"
}
},
"example": {
"number": "WO12345"
}
}
}
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':{
"type": "string"
}
};
fetch('https://goldleaf.app/api/v1/workorders/checkexisting',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST /workorders/checkexisting
Check if a work order exists for the given organization by number
Body parameter
{
"type": "object",
"properties": {
"params": {
"type": "object",
"required": ["number"],
"properties": {
"number": {
"type": "string",
"description": "Work order number to search for"
}
},
"example": {
"number": "WO12345"
}
}
}
}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| Authorization | header | string | true | Bearer token for authorization |
| body | body | object | true | Work order number to check for existence |
| » params | body | object | false | none |
| »» number | body | string | true | Work order number to search for |
Example responses
200 Response
{
"type": "boolean"
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Work order existence check result | boolean |
| 500 | Internal Server Error | none | string |
