Create Quote
A quote is a time-limited pricing contract between you and Ticket Buyback. It locks in the price for a specific section, row, and quantity combination. The quote_id returned is required to create an order.
Authentication Required
This endpoint requires a valid Bearer token and a configured Routable payment method on your TBB account. See Authentication and Routable Setup.
Endpointβ
POST /v1/quotes
Requestβ
Headersβ
Authorization: Bearer <token>
Content-Type: application/json
Bodyβ
{
"event_id": "5496123",
"section_name": "101",
"row_name": "A",
"quantity": 2
}
Field Definitionsβ
| Field | Type | Required | Description |
|---|---|---|---|
event_id | string | Yes | Event ID from the Discovery API |
section_name | string | Yes | Section name from the Sections API |
row_name | string | No | Row name from the Rows API. If omitted, TBB assigns the best available row |
quantity | integer | Yes | Number of tickets requested |
Best Available Row
If you omit row_name, Ticket Buyback will skip row for your requested section and quantity.
cURL Exampleβ
cURL
curl -X POST https://api.ticketbuyback.com/partner/v1/quotes \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"event_id": "5496123",
"section_name": "101",
"row_name": "A",
"quantity": 2
}'
JavaScript Exampleβ
JavaScript
const response = await fetch(
"https://api.ticketbuyback.com/partner/v1/quotes",
{
method: "POST",
headers: {
Authorization: `Bearer ${token}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
event_id: "5496123",
section_name: "101",
row_name: "A",
quantity: 2,
}),
}
);
const { data } = await response.json();
const quoteId = data.quote_id;
const expiresAt = data.expires_at;
Response β 201 Createdβ
{
"success": true,
"data": {
"quote_id": "qt_9f3a2b1c",
"status": "active",
"expires_at": "2026-02-26T11:00:00Z",
"event": {
"event_id": "5496123",
"event_name": "New England Patriots vs. Buffalo Bills",
"event_datetime_local": "2026-09-13T13:00:00",
"event_timezone": "America/New_York"
},
"seats": {
"section_name": "101",
"section_name_display": "Section 101",
"row_name": "A",
"row_name_display": "Row A",
"quantity": 2
},
"pricing": {
"unit_price": 175.00,
"subtotal": 350.00,
"currency": "USD"
}
},
"meta": {
"request_id": "abc123",
"timestamp": "2026-02-26T10:30:00Z"
}
}
Response Fieldsβ
| Field | Description |
|---|---|
quote_id | Unique quote identifier β required to create an order |
status | Always active on creation |
expires_at | UTC timestamp when this quote expires |
event | Event details tied to this quote |
seats.section_name | Section name used for the quote |
seats.row_name | Row assigned β may differ from request if best available was selected |
seats.quantity | Number of tickets quoted |
pricing.unit_price | Price per ticket in USD |
pricing.subtotal | Total price for all tickets (unit_price Γ quantity) |
pricing.currency | Always USD |
Quote TTL & Expiryβ
Quote Expiry
Quotes are valid for a limited time. Once expires_at has passed, the quote cannot be used to create an order. You must request a new quote.
- Always store
expires_atand check it before submitting an order - If your quote expires, call
POST /v1/quotesagain with the same parameters - A quote can only be used once β it is consumed when an order is created
JavaScript β Check expiry before ordering
const expiresAt = new Date(data.expires_at);
const now = new Date();
if (now >= expiresAt) {
// Quote expired β request a new one
throw new Error("Quote has expired. Please request a new quote.");
}
// Safe to proceed with order creation
Error Scenariosβ
| Scenario | HTTP Status | Error Code |
|---|---|---|
| Missing or invalid Bearer token | 401 | UNAUTHORIZED |
| Token expired | 401 | TOKEN_EXPIRED |
| Routable payment not configured | 403 | PAYMENT_NOT_CONFIGURED |
| Invalid event ID | 404 | EVENT_NOT_FOUND |
| Invalid section or row | 404 | SECTION_NOT_FOUND |
| No inventory for section/row/qty | 422 | NO_INVENTORY_AVAILABLE |
| Quantity exceeds available inventory | 422 | INSUFFICIENT_QUANTITY |
| Event date has passed | 422 | EVENT_EXPIRED |
Full Quote Creation Flowβ
JavaScript β Full quote creation
async function createQuote({ eventId, sectionName, rowName, quantity }) {
const response = await fetch(
"https://api.ticketbuyback.com/partner/v1/quotes",
{
method: "POST",
headers: {
Authorization: `Bearer ${token}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
event_id: eventId,
section_name: sectionName,
row_name: rowName, // optional
quantity,
}),
}
);
if (!response.ok) {
const { error } = await response.json();
throw new Error(`Quote failed: ${error.code} β ${error.message}`);
}
const { data } = await response.json();
return {
quoteId: data.quote_id,
expiresAt: data.expires_at,
unitPrice: data.pricing.unit_price,
subtotal: data.pricing.subtotal,
};
}
Next Stepβ
With a valid quote_id, convert it into a confirmed order:
β Create Order