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