/salesestimate/{salesEstimateId}/item/{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:
Sales Estimates
postSalesEstimateIdItemIdUpdate
Code samples
const inputBody = '{
"params": {
"itemId": "60d0fe4f5311236168a109ca",
"lineNumber": "LN001",
"itemType": "hose",
"quantity": 10,
"comments": "Urgent order"
}
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':undefined
};
fetch('https://goldleaf.app/api/v1/salesestimate/{salesEstimateId}/item/{itemId}/update',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST /salesestimate/{salesEstimateId}/item/{itemId}/update
Update a specific item in a sales estimate
Updates a specific item in the sales estimate with the provided quantity, comments, and pricing.
Body parameter
{
"params": {
"itemId": "60d0fe4f5311236168a109ca",
"lineNumber": "LN001",
"itemType": "hose",
"quantity": 10,
"comments": "Urgent order"
}
}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| salesEstimateId | path | string(mongoId) | true | The ID of the sales estimate |
| itemId | path | string(mongoId) | true | The ID of the item within the sales estimate |
| Authorization | header | undefined | true | Bearer token for authentication |
| body | body | object | true | Item update parameters |
| » params | body | object | false | none |
| »» itemId | body | string(mongoId) | true | none |
| »» lineNumber | body | string | true | none |
| »» itemType | body | string | true | none |
| »» quantity | body | number | true | none |
| »» comments | body | string¦null | false | none |
Example responses
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Item updated successfully in the sales estimate | None |
| 400 | Bad Request | Invalid input or parameters | None |
| 401 | Unauthorized | Unauthorized - user must be authenticated | None |
| 403 | Forbidden | Forbidden - customers are blocked from this endpoint | None |
| 404 | Not Found | Sales estimate or item not found | None |
| 500 | Internal Server Error | Internal server error | None |
