curl -X POST https://api.khaime.com/api/v1/partner/quote \
-H "X-API-Key: pk_sandbox_your_key" \
-H "Content-Type: application/json" \
-d '{
"order_id": 789,
"line_items": [
{
"product_id": 123,
"product_title": "Widget Pro",
"quantity": 100,
"unit_price": 2500
}
],
"currency": "USD",
"valid_until": "2024-02-28T23:59:59Z"
}'
curl -X POST https://api.khaime.com/api/v1/partner/quote \
-H "X-API-Key: pk_sandbox_your_key" \
-H "Content-Type: application/json" \
-d '{
"order_id": 789,
"line_items": [
{
"product_id": 123,
"product_title": "Widget Pro",
"quantity": 100,
"unit_price": 2500,
"lead_time_days": 14,
"quantity_breaks": [
{ "min_qty": 500, "unit_price": 2200 },
{ "min_qty": 1000, "unit_price": 2000 }
]
},
{
"product_id": 456,
"product_title": "Gadget Plus",
"quantity": 50,
"unit_price": 5000
}
],
"discount_amount": 25000,
"discount_reason": "Volume discount - 10%",
"shipping_amount": 15000,
"tax_amount": 20000,
"currency": "USD",
"payment_terms": "NET30",
"shipping_terms": "FOB Destination",
"valid_until": "2024-02-28T23:59:59Z",
"supplier_notes": "Thank you for your business! Delivery within 2 weeks of PO."
}'
{
"status": "success",
"message": "Quote created successfully",
"data": {
"id": 101,
"quote_number": "Q-2024-0001",
"iteration": 1,
"status": "draft",
"subtotal": 500000,
"discount_amount": 25000,
"shipping_amount": 15000,
"tax_amount": 20000,
"total_amount": 510000,
"currency": "USD",
"payment_terms": "NET30",
"valid_until": "2024-02-28T23:59:59Z"
}
}
Create Quote
Create a quote with pricing for an RFQ.
POST
/
quote
curl -X POST https://api.khaime.com/api/v1/partner/quote \
-H "X-API-Key: pk_sandbox_your_key" \
-H "Content-Type: application/json" \
-d '{
"order_id": 789,
"line_items": [
{
"product_id": 123,
"product_title": "Widget Pro",
"quantity": 100,
"unit_price": 2500
}
],
"currency": "USD",
"valid_until": "2024-02-28T23:59:59Z"
}'
curl -X POST https://api.khaime.com/api/v1/partner/quote \
-H "X-API-Key: pk_sandbox_your_key" \
-H "Content-Type: application/json" \
-d '{
"order_id": 789,
"line_items": [
{
"product_id": 123,
"product_title": "Widget Pro",
"quantity": 100,
"unit_price": 2500,
"lead_time_days": 14,
"quantity_breaks": [
{ "min_qty": 500, "unit_price": 2200 },
{ "min_qty": 1000, "unit_price": 2000 }
]
},
{
"product_id": 456,
"product_title": "Gadget Plus",
"quantity": 50,
"unit_price": 5000
}
],
"discount_amount": 25000,
"discount_reason": "Volume discount - 10%",
"shipping_amount": 15000,
"tax_amount": 20000,
"currency": "USD",
"payment_terms": "NET30",
"shipping_terms": "FOB Destination",
"valid_until": "2024-02-28T23:59:59Z",
"supplier_notes": "Thank you for your business! Delivery within 2 weeks of PO."
}'
{
"status": "success",
"message": "Quote created successfully",
"data": {
"id": 101,
"quote_number": "Q-2024-0001",
"iteration": 1,
"status": "draft",
"subtotal": 500000,
"discount_amount": 25000,
"shipping_amount": 15000,
"tax_amount": 20000,
"total_amount": 510000,
"currency": "USD",
"payment_terms": "NET30",
"valid_until": "2024-02-28T23:59:59Z"
}
}
Create Quote
Creates a new quote with specific pricing for an existing RFQ. The quote starts indraft status and must be sent to the customer via the Send Quote endpoint.
Request Body
integer
required
ID of the RFQ (order) this quote is for.
array
required
Quoted line items with pricing.
Show Line item fields
Show Line item fields
integer
required
Product ID.
string
required
Product name/title.
integer
required
Quantity being quoted.
integer
required
Unit price in cents (smallest currency unit).
integer
Lead time in days for this item.
integer
Total discount amount in cents.
string
Reason for the discount (e.g., “Volume discount”, “Preferred customer”).
integer
Shipping cost in cents.
integer
Tax amount in cents.
string
default:"USD"
3-letter ISO currency code.
string
Payment terms. One of:
upfront, NET15, NET30, NET60, 50_upfront.string
Shipping terms (e.g., “FOB Destination”, “Ex Works”).
string
Quote expiration date in ISO 8601 format.
string
Notes from the merchant to the customer.
Response
string
success on successful creation.object
Show Quote fields
Show Quote fields
Error Codes
| Status | Error | Fix |
|---|---|---|
400 | Validation error | Check required fields and data types |
401 | Invalid API key | Verify your X-API-Key header |
404 | RFQ not found | Check that order_id exists and belongs to your business |
curl -X POST https://api.khaime.com/api/v1/partner/quote \
-H "X-API-Key: pk_sandbox_your_key" \
-H "Content-Type: application/json" \
-d '{
"order_id": 789,
"line_items": [
{
"product_id": 123,
"product_title": "Widget Pro",
"quantity": 100,
"unit_price": 2500
}
],
"currency": "USD",
"valid_until": "2024-02-28T23:59:59Z"
}'
curl -X POST https://api.khaime.com/api/v1/partner/quote \
-H "X-API-Key: pk_sandbox_your_key" \
-H "Content-Type: application/json" \
-d '{
"order_id": 789,
"line_items": [
{
"product_id": 123,
"product_title": "Widget Pro",
"quantity": 100,
"unit_price": 2500,
"lead_time_days": 14,
"quantity_breaks": [
{ "min_qty": 500, "unit_price": 2200 },
{ "min_qty": 1000, "unit_price": 2000 }
]
},
{
"product_id": 456,
"product_title": "Gadget Plus",
"quantity": 50,
"unit_price": 5000
}
],
"discount_amount": 25000,
"discount_reason": "Volume discount - 10%",
"shipping_amount": 15000,
"tax_amount": 20000,
"currency": "USD",
"payment_terms": "NET30",
"shipping_terms": "FOB Destination",
"valid_until": "2024-02-28T23:59:59Z",
"supplier_notes": "Thank you for your business! Delivery within 2 weeks of PO."
}'
{
"status": "success",
"message": "Quote created successfully",
"data": {
"id": 101,
"quote_number": "Q-2024-0001",
"iteration": 1,
"status": "draft",
"subtotal": 500000,
"discount_amount": 25000,
"shipping_amount": 15000,
"tax_amount": 20000,
"total_amount": 510000,
"currency": "USD",
"payment_terms": "NET30",
"valid_until": "2024-02-28T23:59:59Z"
}
}
⌘I
