/hosekit/{hoseKitId}/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:
Hose Kits
postHoseKitIdLabels
Code samples
const inputBody = '{
"type": "object",
"properties": {
"params": {
"type": "object",
"properties": {
"numCopies": {
"type": "integer",
"description": "Number of label copies to generate",
"example": 3
},
"numHoseAssemblies": {
"type": "integer",
"description": "Number of hose assemblies in the kit",
"example": 10
},
"labelSize": {
"type": "string",
"description": "Desired label size (e.g., \"2x3\", \"4x6\")",
"example": "4x6"
}
}
}
}
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':{
"type": "string"
}
};
fetch('https://goldleaf.app/api/v1/hosekit/{hoseKitId}/labels',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST /hosekit/{hoseKitId}/labels
Generate hose assembly labels for a hose kit
Generates hose assembly labels for a specific work order in PDF format.
Body parameter
{
"type": "object",
"properties": {
"params": {
"type": "object",
"properties": {
"numCopies": {
"type": "integer",
"description": "Number of label copies to generate",
"example": 3
},
"numHoseAssemblies": {
"type": "integer",
"description": "Number of hose assemblies in the kit",
"example": 10
},
"labelSize": {
"type": "string",
"description": "Desired label size (e.g., \"2x3\", \"4x6\")",
"example": "4x6"
}
}
}
}
}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| hoseKitId | path | string(objectId) | true | ID of the hose kit |
| Authorization | header | string | true | Bearer token for authentication |
| body | body | object | false | none |
| » params | body | object | false | none |
| »» numCopies | body | integer | false | Number of label copies to generate |
| »» numHoseAssemblies | body | integer | false | Number of hose assemblies in the kit |
| »» labelSize | body | string | false | Desired label size (e.g., "2x3", "4x6") |
Example responses
500 Response
{
"type": "string"
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Successfully generated label PDF | None |
| 500 | Internal Server Error | Server error. | string |
