Estimates Queries

Query estimates/quotes with line items, validity, and conversion status.

Estimate — Returns a single estimate by id

query GetEstimate($id: ID!) {
  Estimate(id: $id) {
    id
    label
    status
    total
    dated_at
    customer { id label }
    line_items {
      id
      variant { id label }
      quantity
      price
    }
  }
}

Estimates — Returns a paginated list of estimates with sorting and filters

query Estimates(
  $where: QueryEstimatesWhereWhereConditions,
  $orderBy: [QueryEstimatesOrderByOrderByClause!],
  $search: String,
  $first: Int,
  $page: Int
) {
  Estimates(
    where: $where,
    orderBy: $orderBy,
    search: $search,
    first: $first,
    page: $page
  ) {
    paginatorInfo {
      total
      currentPage
    }
    data {
      id
      label
      status
      dated_at
      total
      customer { id label }
    }
  }
}

Available fields

FieldTypeDescription
idIntUnique identifier.
labelStringEstimate number.
statusEstimateStatusCurrent workflow state.
dated_atDateDocument date.
expire_atDateExpiration date of the offer.
shipping_atDateTarget delivery date.
tax_typeTaxType"Exclusive" or "Inclusive".
default_discountFloatGlobal discount value.
discount_typeDiscountType"percentage" or "amount".
total_unitsFloatTotal quantity across all lines.
subtotalFloatNet before taxes and global discount.
total_without_taxFloatTotal amount excluding tax.
total_ecotaxFloatEnvironmental tax sum.
totalFloatGrand total including taxes.
notesStringPublic notes for the PDF.
internal_notesStringHidden internal comments.
for_the_attention_ofStringPrimary contact person.
external_referenceStringInternal reference.
exchange_rateFloatCurrency conversion rate.
location_labelStringOrigin warehouse name.
ordered_statusOrderedStatusProgress of transformation into Sales Orders.
billing_statusBillingStatusProgress of transformation into Invoices.
payment_statusPaymentStatusEstimated payment progress.
transformed_quantityFloatQuantity already ordered or invoiced.
ordered_quantityFloatQuantity documented in sales orders.
unordered_quantityFloatQuantity still pending order.
billed_quantityFloatQuantity already invoiced.
unbilled_quantityFloatQuantity still pending invoice.
paid_quantityFloatQuantity paid for.
unpaid_quantityFloatQuantity pending payment.
currencyCurrencyEstimate currency.
customerCustomerLinked customer.
price_levelPriceLevelApplied price list.
account_representativeAccountRepresentativeLinked sales rep.
seasonSeasonBusiness season.
payment_informationPaymentInformationBank details for payment.
billing_addressAddressCustomer billing address.
shipping_addressAddressCustomer shipping address.
line_items[LineItemEstimate]Detailed item lines.
total_taxes[DocumentTaxRate]Summary of taxes.
invoices_countIntNumber of linked invoices.
invoices[Invoice]Resulting invoices history.
orders_countIntNumber of linked sales orders.
orders[Order]Resulting orders history.
public_idStringToken for public web viewing.
public_view_countIntWeb view statistics.
public_last_accessed_atJSONLast web view timestamp.
email_histories[EmailHistory]Communication logs.
files[File]Attached files.
pdf_templatePdfTemplateDesign used for PDF generation.
created_atDateTimeCreation time.
updated_atDateTimeLast update time.
custom_fields[EntityCustomField]Custom fields for this entity.

Filters

The following fields can be used in the where parameter:

id, label, status, expire_at, shipping_at, currency, tax_type, default_discount, total_units, subtotal, total_without_tax, total_ecotax, total, billed_quantity, unbilled_quantity, paid_quantity, unpaid_quantity, ordered_quantity, unordered_quantity, orders_count, invoices_count, transformed_quantity, notes, internal_notes, for_the_attention_of, external_reference, dated_at, created_at, updated_at, customer_id, price_level_id, account_representative_id, season_id, variant_id, variant_label, variant_sku, location_id, batch_number_id, product_tag_id, customer_tag_id, is_sent, payment_status, billing_status, ordered_status.

Example Filters:

FieldExample
status{ "column": "STATUS", "operator": "EQ", "value": "pending" }
customer_id{ "column": "CUSTOMER_ID", "operator": "EQ", "value": 100050 }
expire_at{ "column": "EXPIRE_AT", "operator": "LT", "value": "2025-12-31" }

Sorting

You can sort results using the orderBy parameter:

  • id
  • label
  • status
  • expire_at
  • shipping_at
  • currency
  • total
  • dated_at
  • customer_label

Grouping Options

You can group estimates using the groupBy parameter for reports:

FieldDescription
idGroup by internal ID.
yearGroup by year of dated_at.
monthGroup by month of dated_at.
dayGroup by day of dated_at.

Enums

EstimateStatus

ValueDescription
unpublishedDraft status (hidden).
pendingDocument sent/awaiting customer decision.
acceptedCustomer agreed to the offer.
rejectedCustomer declined the offer.
cancelledDocument voided.

OrderedStatus

ValueDescription
not_orderedNo sales order created from this estimate.
partially_orderedSome items included in sales orders.
orderedFull value reached in sales orders.

BillingStatus

ValueDescription
not_billedNo invoice generated.
partially_billedPartial invoices created.
billedFull value reached in invoices.

PaymentStatus

ValueDescription
unpaidNo payment recorded.
partially_paidPartial payment received.
paidFully paid.

DiscountType

ValueDescription
amountFixed discount amount.
percentagePercentage-based discount.

TaxType

ValueDescription
exclusiveTax calculated on top of the net price.
inclusiveTax included in the displayed price.