/hosekit/{hoseKitId}/addhoseassembly 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
postHoseKitIdAddHoseAssembly
Code samples
const inputBody = '{
"type": "object",
"properties": {
"params": {
"type": "object",
"required": [
"itemId"
],
"properties": {
"itemId": {
"type": "string",
"format": "objectId",
"description": "ID of the hose assembly item to add."
},
"quantity": {
"type": "number",
"description": "Quantity of the hose assembly (optional)."
},
"itemNumber": {
"type": "number",
"description": "Item number (optional)."
},
"comments": {
"type": "string",
"description": "Additional comments (optional)."
}
}
}
}
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':{
"type": "string"
}
};
fetch('https://goldleaf.app/api/v1/hosekit/{hoseKitId}/addhoseassembly',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST /hosekit/{hoseKitId}/addhoseassembly
Add hose assembly to hose kit BOM
Adds a hose assembly to the specified hose kit's Bill of Materials (BOM), ensuring the hose kit's status is 'under editing'.
Body parameter
{
"type": "object",
"properties": {
"params": {
"type": "object",
"required": ["itemId"],
"properties": {
"itemId": {
"type": "string",
"format": "objectId",
"description": "ID of the hose assembly item to add."
},
"quantity": {
"type": "number",
"description": "Quantity of the hose assembly (optional)."
},
"itemNumber": {
"type": "number",
"description": "Item number (optional)."
},
"comments": {
"type": "string",
"description": "Additional comments (optional)."
}
}
}
}
}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| hoseKitId | path | string(objectId) | true | ID of the hose kit to add the hose assembly to. |
| Authorization | header | string | true | Bearer token for authentication. |
| body | body | object | true | Hose assembly details to add |
| » params | body | object | false | none |
| »» itemId | body | string(objectId) | true | ID of the hose assembly item to add. |
| »» quantity | body | number | false | Quantity of the hose assembly (optional). |
| »» itemNumber | body | number | false | Item number (optional). |
| »» comments | body | string | false | Additional comments (optional). |
Example responses
200 Response
{
"type": "string"
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Hose assembly added successfully | string |
| 403 | Forbidden | Internal server error | string |
| 500 | Internal Server Error | Internal server error | string |
