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
| Name | Type | Required | Notes |
|---|---|---|---|
status | string | no | Comma-separated raw Xero quote statuses (e.g. DRAFT,SENT), case-insensitive. Omitted = every status except DELETED. |
contactId | string | no | Customer Xero contact GUID. |
dateFrom | string | no | Inclusive issue-date lower bound (YYYY-MM-DD). |
dateTo | string | no | Inclusive issue-date upper bound (YYYY-MM-DD). |
expiryDateFrom | string | no | Inclusive expiry-date lower bound (YYYY-MM-DD). |
expiryDateTo | string | no | Inclusive expiry-date upper bound (YYYY-MM-DD). |
createdBy | string | no | Case-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. |
cursor | string | no | |
limit | integer | no | |
autoPaginate | boolean | no | |
totals | boolean | no |
Responses
200 — Matching quotes.
Body: QuotesResponse
| Field | Type | Required | Notes |
|---|---|---|---|
quotes | array of Quote | yes | |
nextCursor | string | yes | |
totalCount | integer | yes | Quotes matching the filters that this key may see (sensitive contacts excluded without READ_SENSITIVE). |
redactedItemCount | integer | yes | 0 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. |
truncated | boolean | no | |
totals | InvoiceBillTotals | no | |
totalsTruncated | boolean | no | |
billingAlert | BillingAlert | no | |
xeroAlert | XeroAlert | no |
401 — Unauthorized
Body: ErrorResponse
| Field | Type | Required | Notes |
|---|---|---|---|
error | string | yes |
403 — The key lacks READ_QUOTES (insufficient_scope).
Body: ErrorResponse
| Field | Type | Required | Notes |
|---|---|---|---|
error | string | yes |
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.