/salesestimates/checkexisting 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
postSaleEstimatesCheckExisting
Code samples
const inputBody = '{
"type": "object",
"properties": {
"params": {
"type": "object",
"required": [
"number"
],
"properties": {
"number": {
"type": "string",
"description": "Sales estimate number to check"
}
}
}
}
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('https://goldleaf.app/api/v1/salesestimates/checkexisting',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST /salesestimates/checkexisting
Check if a sales estimate number already exists
Checks if a sales estimate with the specified number already exists within the user's organization.
Body parameter
{
"type": "object",
"properties": {
"params": {
"type": "object",
"required": ["number"],
"properties": {
"number": {
"type": "string",
"description": "Sales estimate number to check"
}
}
}
}
}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| body | body | object | true | Sales estimate number to check for existence |
| » params | body | object | false | none |
| »» number | body | string | true | Sales estimate number to check |
Example responses
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Indicates if the sales estimate number exists | None |
| 400 | Bad Request | Invalid request payload | None |
| 401 | Unauthorized | Unauthorized - user must be authenticated | None |
| 403 | Forbidden | Forbidden - customers are blocked and only admin or regular roles allowed | None |
| 500 | Internal Server Error | Internal server error | None |
