/salesestimate/{salesEstimateId}/newversion 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
postSalesEstimateIdNewVersion
Code samples
const headers = {
Accept: "application/json",
Authorization: undefined,
};
fetch("https://goldleaf.app/api/v1/salesestimate/{salesEstimateId}/newversion", {
method: "POST",
headers: headers,
})
.then(function (res) {
return res.json();
})
.then(function (body) {
console.log(body);
});
POST /salesestimate/{salesEstimateId}/newversion
Create a new version of a sales estimate
Creates a new version of the specified sales estimate, optionally deleting the previous version.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| salesEstimateId | path | string(mongoId) | true | The ID of the sales estimate to version |
| Authorization | header | undefined | true | Bearer token for authentication |
Example responses
201 Response
{
"newVersionId": "60f5a3d5c7e4e21b5c123abc"
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 201 | Created | New sales estimate version created successfully | Inline |
| 400 | Bad Request | Invalid salesEstimateId or bad request | 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 201
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| ยป newVersionId | string | false | none | The ID of the newly created sales estimate version |
