Skip to main content

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​

ScopePermission
quotes:readView quotes
quotes:writeGenerate quotes

Generate Quote​

POST /quotes/generate

Generate an AI-powered quote with optimal pricing.

Request Body​

FieldTypeRequiredDescription
customer_idstringYesCustomer ID
product_idsarrayYesArray of product IDs
quantitiesarrayYesArray of quantities
payment_termsstringNoPreferred 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​

ParameterTypeDescription
customer_idstringFilter by customer
statusstringactive, expired, converted
start_datestringFilter by created date
end_datestringFilter by created date
pageintegerPage number
limitintegerResults 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​

FactorImpact
Order Volume1-10% discount based on quantity
Credit Score2-5% discount for excellent credit
Customer HistoryLoyalty discount for repeat customers
Payment Terms0% interest for Net terms, interest for installments

Payment Terms Options​

TermsDescriptionInterest
net_30Pay in 30 days0%
net_60Pay in 60 days0%
installments_66 monthly payments6.5-12%
installments_1212 monthly payments7-12%
installments_2424 monthly payments8-15%

Quote Status​

StatusDescription
activeValid and can be converted
expiredPast expiration date
convertedSuccessfully converted to order
expired_partialSome items no longer available

Error Codes​

CodeDescription
QUOTE_NOT_FOUNDQuote ID not found
QUOTE_EXPIREDQuote has expired
PRODUCT_UNAVAILABLEProduct no longer available
PRICE_CHANGEDProduct price has changed

Webhook Events​

EventDescription
quote.createdNew quote generated
quote.expiredQuote expired
quote.convertedQuote converted to order

Next Steps​