Get All Quotes
Retrieves a list of quotes. You can filter the results by company or customer and page through them.
HTTP Request
- URL:
/quote/all - Method:
GET - Headers:
accessToken: Required. Your API access token.
- Required scope:
READ_QUOTEorREAD_WRITE_QUOTE
Query Parameters
| Parameter | Type | Description |
|---|---|---|
page | Integer | Page number to retrieve. Default is 1. |
limit | Integer | Number of quotes per page. Default is 10. |
company | String | Return only quotes for this company ID. |
customer | String | Return only quotes for this customer ID. |
cURL Example
curl --location '<BASE_URL>/quote/all?page=1&limit=10&company=65ba028af764f931f1c7c18b' \
--header 'accessToken: <ACCESS_TOKEN>'
Response
- 200 OK: The list of quotes was returned successfully.
- 400 Bad Request: The access token is missing or invalid, does not have the required scope, or a filter ID is not valid.
Sample JSON Response
{
"success": true,
"data": [
{
"_id": "6720f3c1a8b4e21f9c3d5a10",
"id": "6720f3c1a8b4e21f9c3d5a10",
"quoteId": 1042,
"title": "Q4 Restock Quote",
"status": "pending",
"requestedCount": 0,
"company": "65ba028af764f931f1c7c18b",
"companyDetails": {
"companyId": "65ba028af764f931f1c7c18b",
"name": "Northwind Supplies",
"email": "purchasing@northwind.example",
"phoneNumber": "+1 312 555 0142"
},
"customer": "66d07121db294e0b70180bf6",
"customerDetails": {
"customerId": "66d07121db294e0b70180bf6",
"firstName": "Dana",
"lastName": "Whitfield",
"email": "dana.whitfield@northwind.example",
"phoneNumber": "+1 312 555 0187"
},
"products": [
{
"_id": "6720f3c1a8b4e21f9c3d5a11",
"product": "65b88ef5045a7d009e79974b",
"variant": null,
"name": "Cordless Drill 18V",
"sku": "CD-18V",
"productSku": "CD-18V",
"image": "https://cdn.example.com/products/cd-18v.webp",
"options": [],
"quantity": 10,
"price": 129,
"companyPrice": 119,
"requestedPrice": 110,
"extendedPrice": 1190,
"selectedCurrencyPrice": null
}
],
"comments": [],
"timeline": [],
"createdBy": {
"_id": "6720f3c1a8b4e21f9c3d5a14",
"id": "6650c2e9f1a3b84d2e7a9c01",
"name": "ERP Integration",
"type": "api"
},
"notes": "",
"metaFields": [],
"expiryDate": "2024-11-13T14:02:09.498Z",
"order": null,
"isCompleted": false,
"selectedCurrency": null,
"createdAt": "2024-10-29T14:02:09.512Z",
"updatedAt": "2024-10-29T14:02:09.512Z"
}
],
"pagination": {
"count": 1,
"page": 1,
"total": 1
}
}
Response Details
| Field | Type | Description |
|---|---|---|
success | Boolean | Whether the request was successful. |
data | Array | List of quotes. |
pagination | Object | Pagination details. See below. |
Quote Data
Each quote has the same fields as described in Get Single Quote.
Pagination Details
| Field | Type | Description |
|---|---|---|
count | Integer | Number of quotes returned on this page. |
page | Integer | Current page number. |
total | Integer | Total number of quotes matching the filters. |