/salesestimate/{salesEstimateId}/release 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
postSalesEstimateIdRelease
Code samples
const inputBody = '{
"taxCode": "TX123",
"taxPercent": 7.5,
"taxAmount": 50
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':undefined
};
fetch('https://goldleaf.app/api/v1/salesestimate/{salesEstimateId}/release',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST /salesestimate/{salesEstimateId}/release
Release a sales estimate
Changes the status of the specified sales estimate to "released" if no other versions are currently released.
Body parameter
{
"taxCode": "TX123",
"taxPercent": 7.5,
"taxAmount": 50
}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| salesEstimateId | path | string(mongoId) | true | The ID of the sales estimate to release |
| Authorization | header | undefined | true | Bearer token for authentication |
| body | body | object | false | Optional tax details for the sales estimate |
| » taxCode | body | string | false | Tax code to apply |
| » taxPercent | body | number | false | Tax percentage applied |
| » taxAmount | body | number | false | Tax amount applied |
Example responses
200 Response
{
"success": true,
"message": "Sales estimate released successfully"
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Sales estimate successfully released | Inline |
| 400 | Bad Request | Invalid input or sales estimate already released | None |
| 401 | Unauthorized | Unauthorized - user must be authenticated | None |
| 403 | Forbidden | Forbidden - customers are blocked from this endpoint | None |
| 404 | Not Found | Sales estimate not found | None |
| 500 | Internal Server Error | Internal server error | None |
Response Schema
Status Code 200
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| » success | boolean | false | none | none |
| » message | string | false | none | none |
