Skip to main content

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​

FieldTypeRequiredDescription
event_idstringYesEvent ID from the Discovery API
section_namestringYesSection name from the Sections API
row_namestringNoRow name from the Rows API. If omitted, TBB assigns the best available row
quantityintegerYesNumber 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​

FieldDescription
quote_idUnique quote identifier β€” required to create an order
statusAlways active on creation
expires_atUTC timestamp when this quote expires
eventEvent details tied to this quote
seats.section_nameSection name used for the quote
seats.row_nameRow assigned β€” may differ from request if best available was selected
seats.quantityNumber of tickets quoted
pricing.unit_pricePrice per ticket in USD
pricing.subtotalTotal price for all tickets (unit_price Γ— quantity)
pricing.currencyAlways 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_at and check it before submitting an order
  • If your quote expires, call POST /v1/quotes again 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​

ScenarioHTTP StatusError Code
Missing or invalid Bearer token401UNAUTHORIZED
Token expired401TOKEN_EXPIRED
Routable payment not configured403PAYMENT_NOT_CONFIGURED
Invalid event ID404EVENT_NOT_FOUND
Invalid section or row404SECTION_NOT_FOUND
No inventory for section/row/qty422NO_INVENTORY_AVAILABLE
Quantity exceeds available inventory422INSUFFICIENT_QUANTITY
Event date has passed422EVENT_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