/workorder/{workOrderId}/labels 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
postWorkOrderIdLabels
Code samples
const inputBody = '{
"params": {
"numCopies": 2,
"numHoseAssemblies": 5,
"labelSize": "A4"
}
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':{
"type": "string"
}
};
fetch('https://goldleaf.app/api/v1/workorder/{workOrderId}/labels',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST /workorder/{workOrderId}/labels
Generate hose assembly labels for a specific work order in PDF format
Body parameter
{
"params": {
"numCopies": 2,
"numHoseAssemblies": 5,
"labelSize": "A4"
}
}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| Authorization | header | string | true | Bearer token for authorization |
| workOrderId | path | string | true | Work order ID (MongoDB ObjectId) |
| body | body | object | false | Parameters to customize label generation |
| » params | body | object | false | none |
| »» numCopies | body | integer | false | Number of label copies to generate |
| »» numHoseAssemblies | body | integer | false | Number of hose assemblies to include |
| »» labelSize | body | string | false | Size of the label |
Example responses
500 Response
{
"type": "string"
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | PDF labels generated successfully | None |
| 500 | Internal Server Error | none | string |
