Skip to content

GET /api/agent/quotes ​

Returns the caller's org Xero sales quotes. DELETED quotes are excluded unless requested: with no status filter every status except DELETED is returned, and status=DELETED (alone or in a list) opts in. Filterable by raw Xero status (comma-separated: DRAFT/SENT/DECLINED/ACCEPTED/INVOICED/DELETED), contactId (customer), issue-date range (dateFrom/dateTo) and expiry-date range (expiryDateFrom/expiryDateTo), all inclusive, and createdBy (name of who raised the quote, case-insensitive contains). Every quote carries createdBy/createdAt/lastEditedBy/lastEditedAt/lastSentBy/lastSentAt, read from Xero's quote history (null until fetched). Same pagination semantics as /api/agent/invoices (cursor + nextCursor, ?autoPaginate=true 5,000-row cap with truncated). ?totals=true adds a block grouped by raw status (statuses with no rows are omitted); totals.grandTotal sums every returned status together — filter by status first for, say, the open quoted value (status=DRAFT,SENT). Multiple currencies return the mixedCurrency shape instead of a sum. Quotes whose contact is sensitive are excluded from the rows, totalCount and totals unless the key carries READ_SENSITIVE; redactedItemCount is then a 0/1 flag (1 = this organisation has quotes withheld from this key), independent of the request's filters and not a count. Read-only; requires the dedicated READ_QUOTES scope (NOT implied by invoice access).

Auth ​

  • Required scope: READ_QUOTES
  • Header: Authorization: Bearer cr_live_<prefix>_<secret>

Query parameters ​

NameTypeRequiredNotes
statusstringnoComma-separated raw Xero quote statuses (e.g. DRAFT,SENT), case-insensitive. Omitted = every status except DELETED.
contactIdstringnoCustomer Xero contact GUID.
dateFromstringnoInclusive issue-date lower bound (YYYY-MM-DD).
dateTostringnoInclusive issue-date upper bound (YYYY-MM-DD).
expiryDateFromstringnoInclusive expiry-date lower bound (YYYY-MM-DD).
expiryDateTostringnoInclusive expiry-date upper bound (YYYY-MM-DD).
createdBystringnoCase-insensitive "contains" match on the name of the person who raised the quote in Xero (createdBy). The text is matched literally (%, _ and a backslash are ordinary characters, not wildcards). Blank is ignored; more than 200 characters matches nothing. Applies to the rows, totalCount and totals; quotes whose history has not been fetched yet have no creator and never match.
cursorstringno
limitintegerno
autoPaginatebooleanno
totalsbooleanno

Responses ​

200 — Matching quotes. ​

Body: QuotesResponse

FieldTypeRequiredNotes
quotesarray of Quoteyes
nextCursorstringyes
totalCountintegeryesQuotes matching the filters that this key may see (sensitive contacts excluded without READ_SENSITIVE).
redactedItemCountintegeryes0 or 1. 1 means this organisation has quotes that are withheld from this key because their customer is marked sensitive. It does not depend on the request's filters and is not a count. Always 0 when the key carries READ_SENSITIVE.
truncatedbooleanno
totalsInvoiceBillTotalsno
totalsTruncatedbooleanno
billingAlertBillingAlertno
xeroAlertXeroAlertno

401 — Unauthorized ​

Body: ErrorResponse

FieldTypeRequiredNotes
errorstringyes

403 — The key lacks READ_QUOTES (insufficient_scope). ​

Body: ErrorResponse

FieldTypeRequiredNotes
errorstringyes

429 — Rate-limited (per-minute burst) or query credits exhausted. Credits return individually on a rolling 5h window — retry after Retry-After seconds for one more call. ​

Body:

any

Response headers ​

Every successful response carries X-CashRunway-Subscription, X-CashRunway-Plan, X-CashRunway-Quota-Remaining, and X-CashRunway-Quota-Reset. Trialing subscriptions also include X-CashRunway-Trial-Days-Remaining. See the overview for details.

Released under a proprietary license. · cashrunway.ai