/hoseassembly/{hoseAssemblyId}/label 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 Assembly
postHoseAssemblyIdLabel
Code samples
const inputBody = '{
"type": "object",
"properties": {
"numCopies": {
"type": "integer",
"description": "Number of copies for each label.",
"example": 2
},
"numHoseAssemblies": {
"type": "integer",
"description": "Number of hose assemblies to serialize.",
"example": 1
},
"labelSize": {
"type": "string",
"description": "Size of the label.",
"example": "4x6"
},
"customerId": {
"type": "string",
"format": "mongo-id",
"description": "The MongoDB ObjectId of the customer for custom labeling."
}
}
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('https://goldleaf.app/api/v1/hoseassembly/{hoseAssemblyId}/label',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST /hoseassembly/{hoseAssemblyId}/label
Generate PDF label(s) for a hose assembly
Generates one or more labels in PDF format for a specific hose assembly.
Body parameter
{
"type": "object",
"properties": {
"numCopies": {
"type": "integer",
"description": "Number of copies for each label.",
"example": 2
},
"numHoseAssemblies": {
"type": "integer",
"description": "Number of hose assemblies to serialize.",
"example": 1
},
"labelSize": {
"type": "string",
"description": "Size of the label.",
"example": "4x6"
},
"customerId": {
"type": "string",
"format": "mongo-id",
"description": "The MongoDB ObjectId of the customer for custom labeling."
}
}
}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| hoseAssemblyId | path | string(mongo-id) | true | The MongoDB ObjectId of the hose assembly. |
| body | body | object | false | none |
| » numCopies | body | integer | false | Number of copies for each label. |
| » numHoseAssemblies | body | integer | false | Number of hose assemblies to serialize. |
| » labelSize | body | string | false | Size of the label. |
| » customerId | body | string(mongo-id) | false | The MongoDB ObjectId of the customer for custom labeling. |
Example responses
500 Response
{
"type": "string"
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 500 | Internal Server Error | Server error | string |
