/salesestimates 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
getSalesEstimates
Code samples
const headers = {
Accept: "application/json",
};
fetch("https://goldleaf.app/api/v1/salesestimates", {
method: "GET",
headers: headers,
})
.then(function (res) {
return res.json();
})
.then(function (body) {
console.log(body);
});
GET /salesestimates
Retrieve sales estimates
Retrieves all sales estimates for the organization, optionally filtered by customer, status, or item part numbers.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| search.number | query | string | false | Filter by sales estimate number (partial match) |
| search.customerName | query | string | false | Filter by customer name (partial match) |
| search.status | query | string | false | Filter by status (partial match) |
| number | query | string | false | Filter by exact sales estimate number |
| status | query | array[string] | false | Filter by one or more statuses |
| customerOrgId | query | string(mongoId) | false | Filter by customer organization ID |
| hoseAssemblyId | query | string(mongoId) | false | Filter by hose assembly ID |
| hoseKitId | query | string(mongoId) | false | Filter by hose kit ID |
| workOrderId | query | string(mongoId) | false | Filter by work order ID |
| salesEstimateId | query | string(mongoId) | false | Filter by sales estimate ID |
| onlyCustomer | query | boolean | false | If true, returns only estimates linked to the customer |
| page | query | integer | false | Pagination page number |
| limit | query | integer | false | Pagination limit per page |
Example responses
200 Response
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": false
},
"page": {
"type": "integer"
},
"totalPages": {
"type": "integer"
},
"totalCount": {
"type": "integer"
}
}
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | List of sales estimates | Inline |
| 401 | Unauthorized | Unauthorized - user must be authenticated | None |
| 403 | Forbidden | Forbidden - customers are blocked | None |
| 500 | Internal Server Error | Internal server error | None |
Response Schema
Status Code 200
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| » data | array | false | none | none |
| »» anonymous | any | false | none | none |
| » page | integer | false | none | none |
| » totalPages | integer | false | none | none |
| » totalCount | integer | false | none | none |
