Order Quotes API
Generate AI-powered quotes with optimal pricing and flexible payment options.
Overview
The Quotes API provides:
- AI-Generated Pricing — Dynamic pricing based on credit score
- Payment Term Options — Multiple installment plans
- Quote Validation — Expiration and pricing guarantees
- Conversion to Orders — Seamless quote-to-order flow
Base URL
https://api.huntrecht.com/api/v1/quotes
Required Scopes
| Scope | Permission |
|---|---|
quotes:read | View quotes |
quotes:write | Generate quotes |
Generate Quote
POST /quotes/generate
Generate an AI-powered quote with optimal pricing.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
customer_id | string | Yes | Customer ID |
product_ids | array | Yes | Array of product IDs |
quantities | array | Yes | Array of quantities |
payment_terms | string | No | Preferred payment terms |
Example Request
quote = client.quotes.generate({
"customer_id": "cust_abc123",
"product_ids": ["prod_001", "prod_002"],
"quantities": [10, 5],
"payment_terms": "net_30"
})
Example Response
{
"id": "quote_abc123",
"customer_id": "cust_abc123",
"expires_at": "2026-01-18T10:00:00Z",
"valid_days": 7,
"line_items": [
{
"product_id": "prod_001",
"quantity": 10,
"original_price": 150.00,
"discounted_price": 142.50,
"discount_percent": 5,
"total": 1425.00
},
{
"product_id": "prod_002",
"quantity": 5,
"original_price": 75.00,
"discounted_price": 75.00,
"discount_percent": 0,
"total": 375.00
}
],
"pricing": {
"subtotal": 1800.00,
"discount_total": 37.50,
"tax": 144.00,
"shipping": 25.00,
"total": 1931.50
},
"recommended_terms": {
"payment_terms": "net_30",
"interest_rate": 0,
"installments_available": [6, 12, 24],
"monthly_payment_estimate": null
},
"credit_score": 720,
"discount_reason": "Volume discount + credit tier pricing"
}
Get Quote
GET /quotes/{quote_id}
Retrieve an existing quote.
quote = client.quotes.get("quote_abc123")
Convert Quote to Order
POST /quotes/{quote_id}/convert
Convert a valid quote to an order.
order = client.quotes.convert(
quote_id="quote_abc123",
payment_terms="net_30"
)
List Quotes
GET /quotes
Retrieve quotes with filtering.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
customer_id | string | Filter by customer |
status | string | active, expired, converted |
start_date | string | Filter by created date |
end_date | string | Filter by created date |
page | integer | Page number |
limit | integer | Results per page |
quotes = client.quotes.list(
customer_id="cust_abc123",
status="active",
page=1,
limit=20
)
AI Pricing Model
Quote pricing is dynamically calculated based on:
graph TD
A[Quote Request] --> B[Credit Score Lookup]
B --> C{Pricing Factors}
C --> D[Volume Discount]
C --> E[Credit Tier]
C --> F[Customer History]
C --> G[Payment Terms]
D --> H[Final Price]
E --> H
F --> H
G --> H
Pricing Factors
| Factor | Impact |
|---|---|
| Order Volume | 1-10% discount based on quantity |
| Credit Score | 2-5% discount for excellent credit |
| Customer History | Loyalty discount for repeat customers |
| Payment Terms | 0% interest for Net terms, interest for installments |
Payment Terms Options
| Terms | Description | Interest |
|---|---|---|
net_30 | Pay in 30 days | 0% |
net_60 | Pay in 60 days | 0% |
installments_6 | 6 monthly payments | 6.5-12% |
installments_12 | 12 monthly payments | 7-12% |
installments_24 | 24 monthly payments | 8-15% |
Quote Status
| Status | Description |
|---|---|
active | Valid and can be converted |
expired | Past expiration date |
converted | Successfully converted to order |
expired_partial | Some items no longer available |
Error Codes
| Code | Description |
|---|---|
QUOTE_NOT_FOUND | Quote ID not found |
QUOTE_EXPIRED | Quote has expired |
PRODUCT_UNAVAILABLE | Product no longer available |
PRICE_CHANGED | Product price has changed |
Webhook Events
| Event | Description |
|---|---|
quote.created | New quote generated |
quote.expired | Quote expired |
quote.converted | Quote converted to order |