/salesestimate/{salesEstimateId}/revise 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
postSalesEstimateIdRevise
Code samples
const inputBody = '{
"type": "object",
"properties": {
"params": {
"type": "object",
"properties": {
"revision": {
"type": "string",
"description": "New revision string",
"example": "B"
}
},
"required": [
"revision"
]
}
},
"required": [
"params"
]
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':undefined
};
fetch('https://goldleaf.app/api/v1/salesestimate/{salesEstimateId}/revise',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST /salesestimate/{salesEstimateId}/revise
Revise a sales estimate by creating a new version with updated revision level
Creates a new version of the specified sales estimate with an updated revision level.
Body parameter
{
"type": "object",
"properties": {
"params": {
"type": "object",
"properties": {
"revision": {
"type": "string",
"description": "New revision string",
"example": "B"
}
},
"required": ["revision"]
}
},
"required": ["params"]
}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| salesEstimateId | path | string(mongoId) | true | The ID of the sales estimate to revise |
| Authorization | header | undefined | true | Bearer token for authentication |
| body | body | object | true | Revision information |
| » params | body | object | true | none |
| »» revision | body | string | true | New revision string |
Example responses
200 Response
{
"type": "object",
"properties": {
"success": {
"type": "boolean",
"example": true
},
"message": {
"type": "string",
"example": "Sales estimate revised"
},
"data": {
"type": "object",
"description": "The newly revised sales estimate object"
},
"revisedVersionId": {
"type": "string",
"description": "The ID of the new revised sales estimate version"
}
}
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Successfully created a new revised version of the sales estimate | Inline |
| 400 | Bad Request | Invalid salesEstimateId or revision data | 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 |
| » data | object | false | none | The newly revised sales estimate object |
| » revisedVersionId | string | false | none | The ID of the new revised sales estimate version |
