/hosekit/{hoseKitId}/hoseassembly/{itemId}/update 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
postHoseKitIdHoseAssemblyItemIdUpdate
Code samples
const inputBody = '{
"type": "object",
"properties": {
"params": {
"type": "object",
"required": [
"itemId",
"itemNumber",
"quantity"
],
"properties": {
"itemId": {
"type": "string",
"format": "objectId",
"description": "The ID of the hose assembly item (should match `itemId` in the path)."
},
"itemNumber": {
"type": "string",
"description": "Part number or identifier of the hose assembly."
},
"quantity": {
"type": "number",
"description": "Quantity to be used in the BOM."
},
"comments": {
"type": "string",
"description": "Optional comments for the hose assembly."
}
}
}
}
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':{
"type": "string"
}
};
fetch('https://goldleaf.app/api/v1/hosekit/{hoseKitId}/hoseassembly/{itemId}/update',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST /hosekit/{hoseKitId}/hoseassembly/{itemId}/update
Update hose assembly item in a hose kit BOM
Updates the details of a specific hose assembly in the bill of materials (BOM) of the specified hose kit.
Body parameter
{
"type": "object",
"properties": {
"params": {
"type": "object",
"required": ["itemId", "itemNumber", "quantity"],
"properties": {
"itemId": {
"type": "string",
"format": "objectId",
"description": "The ID of the hose assembly item (should match `itemId` in the path)."
},
"itemNumber": {
"type": "string",
"description": "Part number or identifier of the hose assembly."
},
"quantity": {
"type": "number",
"description": "Quantity to be used in the BOM."
},
"comments": {
"type": "string",
"description": "Optional comments for the hose assembly."
}
}
}
}
}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| hoseKitId | path | string(objectId) | true | ID of the hose kit containing the hose assembly. |
| itemId | path | string(objectId) | true | ID of the hose assembly item to update. |
| Authorization | header | string | true | Bearer token for user authentication. |
| body | body | object | true | none |
| » params | body | object | false | none |
| »» itemId | body | string(objectId) | true | The ID of the hose assembly item (should match itemId in the path). |
| »» itemNumber | body | string | true | Part number or identifier of the hose assembly. |
| »» quantity | body | number | true | Quantity to be used in the BOM. |
| »» comments | body | string | false | Optional comments for the hose assembly. |
Example responses
200 Response
{
"type": "string"
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Successfully updated the hose assembly item in the BOM. | string |
| 403 | Forbidden | Forbidden – customers are not allowed. | string |
| 500 | Internal Server Error | Server error. | string |
