Quotes API Reference

Manage sales quotes, proposals, and quote-related operations in the sales system.

Base Path: /api/quotes

Overview

The Quotes API provides endpoints for managing sales quotes including creation, retrieval, PDF generation, public sharing, and quote lifecycle management.

Key Operations


API Endpoints

POST /api/quotes

Create Quote

Creates a new sales quote for a customer.

Authentication

Bearer Token

Request Body

{
  "customerId": "cust_123",
  "quoteNumber": "QT-2026-001",
  "expiryDate": "2026-07-02T23:59:59Z",
  "items": [
    {
      "offerId": "offer_456",
      "description": "Cloud Server Premium",
      "quantity": 1,
      "unitPrice": 299.99,
      "amount": 299.99
    }
  ],
  "subtotal": 299.99,
  "tax": 29.99,
  "total": 329.98,
  "currency": "USD",
  "notes": "Special pricing for annual commitment"
}

Response

{
  "id": "quote_789",
  "quoteNumber": "QT-2026-001",
  "customerId": "cust_123",
  "status": "draft",
  "total": 329.98,
  "createdAt": "2026-06-02T10:30:00Z"
}
GET /api/quotes

List Quotes

Gets all quotes with filtering and pagination.

Authentication

Bearer Token

Query Parameters

Parameter Type Description
$filter string OData filter expression
$skip integer Skip n records
$top integer Take n records

Response

{
  "value": [
    {
      "id": "quote_789",
      "quoteNumber": "QT-2026-001",
      "customerId": "cust_123",
      "status": "sent",
      "total": 329.98,
      "expiryDate": "2026-07-02T23:59:59Z"
    }
  ],
  "count": 100
}
GET /api/quotes/{id}

Get Quote by ID

Gets quote details by ID with all line items and actions.

Authentication

Bearer Token

Path Parameters

Parameter Type
id string

Response

{
  "id": "quote_789",
  "quoteNumber": "QT-2026-001",
  "customerId": "cust_123",
  "expiryDate": "2026-07-02T23:59:59Z",
  "items": [
    {
      "offerId": "offer_456",
      "description": "Cloud Server Premium",
      "quantity": 1,
      "unitPrice": 299.99,
      "amount": 299.99
    }
  ],
  "subtotal": 299.99,
  "tax": 29.99,
  "total": 329.98,
  "currency": "USD",
  "status": "sent",
  "createdAt": "2026-06-02T10:30:00Z"
}
PATCH /api/quotes/{id}

Update Quote

Updates quote details (only draft quotes).

Authentication

Bearer Token

Request Body

{
  "expiryDate": "2026-07-10T23:59:59Z",
  "items": [
    {
      "offerId": "offer_456",
      "quantity": 2,
      "unitPrice": 299.99
    }
  ],
  "notes": "Updated pricing"
}

Response

{
  "id": "quote_789",
  "quoteNumber": "QT-2026-001",
  "status": "draft",
  "total": 659.96,
  "updatedAt": "2026-06-02T11:00:00Z"
}
POST /api/quotes/{id}/actions

Manage Quote Actions

Perform actions on quote (send, accept, reject, revoke).

Authentication

Bearer Token

Request Body

{
  "action": "send",
  "sendToEmail": "customer@example.com",
  "message": "Please review the attached proposal"
}

Response

{
  "id": "quote_789",
  "status": "sent",
  "action": "send",
  "actionDate": "2026-06-02T10:35:00Z"
}
POST /api/quotes/{id}/download-pdf

Download Quote PDF

Generates and downloads quote as PDF.

Authentication

Bearer Token

Path Parameters

Parameter Type
id string

Response

PDF file download

GET /api/quotes/public/{publicToken}

Get Public Quote

Gets quote details using public token (no authentication required).

Authentication

None

Path Parameters

Parameter Type
publicToken string

Response

{
  "id": "quote_789",
  "quoteNumber": "QT-2026-001",
  "items": [
    {
      "description": "Cloud Server Premium",
      "quantity": 1,
      "unitPrice": 299.99,
      "amount": 299.99
    }
  ],
  "total": 329.98,
  "status": "sent",
  "expiryDate": "2026-07-02T23:59:59Z"
}
POST /api/quotes/public/{publicToken}/actions

Perform Public Quote Action

Allows customers to accept/reject quote using public token.

Authentication

None

Request Body

{
  "action": "accept",
  "customerEmail": "customer@example.com",
  "customerName": "John Doe"
}

Response

{
  "id": "quote_789",
  "status": "accepted",
  "action": "accept",
  "actionDate": "2026-06-02T14:30:00Z"
}

Error Responses

Code HTTP Status Description
QUOTE_NOT_FOUND 404 Quote does not exist
QUOTE_EXPIRED 400 Quote has expired
INVALID_ACTION 400 Invalid action for current quote status
INVALID_TOKEN 401 Invalid or expired public token

Quick Links