GraphQL: Estimates

Read estimates with their line items, totals, customer, job and invoices, and create, update or delete estimates.

OperationTypeDescription
estimate(id)QueryGet one estimate
estimates(first, after, filter, sort)QueryList estimates
createEstimate(input)MutationCreate an estimate
updateEstimate(id, input)MutationUpdate an estimate
deleteEstimate(id)MutationDelete an estimate

EstimateStatus: DRAFT, AWAIT_RESPONSE, AWAIT_SIGNATURE, APPROVED, DECLINED, ARCHIVED, CLOSED, CANCELED, REQUEST_CHANGE


Estimate fields

Details

FieldTypeDescription
idID!Estimate UID
estimate_noIntEstimate number
estimate_no_stringStringEstimate number, as text
reference_noString
estimate_statusEstimateStatus
estimate_descriptionString
estimate_dateDateTime
expiry_dateDateTime
is_expiredBoolean
is_convertedBooleantrue once the estimate is converted to an invoice
is_proposalBoolean
proposal_titleString
sent_dateDateTime
accepted_dateDateTime
custom_fields[CustomField!]!
external_ids[ExternalId!]!{ key value }

Amounts

Zuper calculates all amounts from the line items, discounts and taxes.

FieldTypeDescription
line_items[LineItem!]!
sub_totalFloat
total_discountFloat
taxable_amountFloat
tax[TaxLine!]!Taxes on the whole estimate
totalFloat
total_rebateFloat
net_totalFloat

Related records and audit

FieldTypeDescription
customerCustomer
organizationOrganization
propertyProperty
jobJob
invoicesInvoiceConnection!Invoices created from this estimate. Paginated, with first (default 10), after, filter: InvoiceFilter and sort: InvoiceSort
created_byUser
created_atDateTime
updated_atDateTime

Get an estimate

estimate(id: ID!) returns one estimate, or null if the UID doesn't exist in your account.

query EstimateDetails($id: ID!) {
  estimate(id: $id) {
    id
    estimate_no_string
    reference_no
    estimate_status
    estimate_description
    estimate_date
    expiry_date
    is_expired
    is_converted
    line_items {
      line_item_uid
      product_uid
      name
      description
      quantity
      unit_price
      discount
      discount_type
      total
      tax { tax_name tax_rate tax_amount }
    }
    sub_total
    total_discount
    taxable_amount
    tax { tax_name tax_percent tax_amount }
    total
    net_total
    customer { id customer_full_name customer_email }
    property { id property_name }
    job { id work_order_number job_title }
    invoices { nodes { id invoice_no_string invoice_status total } }
    custom_fields { label value }
    created_by { first_name last_name }
    created_at
  }
}
{ "id": "<estimate_uid>" }

List estimates

estimates(first, after, filter, sort) returns a paginated list.

EstimateFilter

FieldTypeMatches
status_in[EstimateStatus!]Estimates in any of these statuses
customer_uidIDLinked customer
organization_uidIDLinked organization
property_uidIDLinked property
job_uidIDLinked job
estimate_date_from / estimate_date_toDateTimeRange on estimate_date
created_after / created_beforeDateTimeRange on created_at
updated_afterDateTimeEstimates changed at or after this time
custom_field[CustomFieldFilter!]{ label, value } exact matches

EstimateSortField: CREATED_AT, UPDATED_AT, ESTIMATE_DATE, ESTIMATE_NO

Example: approved estimates in a month, with customer and job

query ApprovedEstimates($from: DateTime!, $to: DateTime!, $after: String) {
  estimates(
    first: 50
    after: $after
    filter: { status_in: [APPROVED], estimate_date_from: $from, estimate_date_to: $to }
    sort: { field: ESTIMATE_DATE, direction: DESC }
  ) {
    nodes {
      id
      estimate_no_string
      estimate_date
      net_total
      is_converted
      accepted_date
      customer { customer_full_name }
      job { work_order_number }
    }
    page_info { has_next_page end_cursor }
  }
}
{ "from": "2026-10-01T00:00:00Z", "to": "2026-10-31T23:59:59Z", "after": null }

Note: You can't filter on is_converted. Select it and filter the results in your code.

Example: estimates for a job, highest number first

query EstimatesForRecord($job: ID, $property: ID, $customer: ID) {
  estimates(
    first: 20
    filter: { job_uid: $job, property_uid: $property, customer_uid: $customer }
    sort: { field: ESTIMATE_NO, direction: DESC }
  ) {
    nodes { id estimate_no estimate_no_string estimate_status total }
    page_info { has_next_page end_cursor }
  }
}
{ "job": "<job_uid>", "property": null, "customer": null }

Example: estimates changed since a date, with a custom field value

query EstimateSync($since: DateTime!, $cf: [CustomFieldFilter!], $after: String) {
  estimates(
    first: 100
    after: $after
    filter: { updated_after: $since, custom_field: $cf }
    sort: { field: UPDATED_AT, direction: ASC }
  ) {
    nodes { id estimate_no_string estimate_status total updated_at }
    page_info { has_next_page end_cursor }
  }
}
{ "since": "2026-11-01T00:00:00Z", "cf": [{ "label": "Source", "value": "API" }], "after": null }

Create an estimate

createEstimate(input: EstimateCreateInput!) creates an estimate in DRAFT status.

EstimateCreateInput

FieldTypeRequiredDescription
customer_uidIDYes
estimate_dateDateTimeYesSend at noon UTC, for example 2026-11-17T12:00:00Z
expiry_dateDateTimeYesSend at noon UTC
line_items[LineItemInput!]YesSee below
organization_uidIDNo
property_uidIDNo
job_uidIDNo
reference_noStringNo
estimate_descriptionStringNo
custom_fields[CustomFieldInput!]No{ label value }

LineItemInput

FieldTypeRequiredDescription
product_uidStringNoA product from your catalog. Leave it out for a custom line item
nameStringCustom itemsThe product's name is used for catalog items
descriptionStringNoThe product's description is used for catalog items
quantityFloatYes
unit_priceFloatSee note
discountFloatNo
discount_typeDiscountTypeNoFIXED (default) or PERCENTAGE

Note: Always send unit_price, including for catalog products. The product's price is not copied to the line item, so a missing unit_price is saved as 0.

Zuper calculates the totals and taxes. You can't set tax on individual line items through the API.

mutation CreateEstimate($input: EstimateCreateInput!) {
  createEstimate(input: $input) {
    estimate {
      id
      estimate_no_string
      estimate_status
      line_items { name quantity unit_price discount discount_type total }
      sub_total
      total_discount
      tax { tax_name tax_amount }
      total
    }
    user_errors { field message code }
  }
}
{
  "input": {
    "customer_uid": "<customer_uid>",
    "property_uid": "<property_uid>",
    "job_uid": "<job_uid>",
    "reference_no": "RFQ-2219",
    "estimate_description": "Compressor replacement",
    "estimate_date": "2026-11-17T12:00:00Z",
    "expiry_date": "2026-12-01T12:00:00Z",
    "line_items": [
      { "product_uid": "<product_uid>", "quantity": 1, "unit_price": 1800 },
      { "name": "Labor", "description": "4 hours", "quantity": 4, "unit_price": 95, "discount": 10, "discount_type": "PERCENTAGE" }
    ],
    "custom_fields": [{ "label": "Source", "value": "API" }]
  }
}

Possible user_errors messages include No Customer found for the given UID and Invalid product name for custom line item.


Update an estimate

updateEstimate(id: ID!, input: EstimateUpdateInput!) changes only the fields you send.

EstimateUpdateInput: reference_no, estimate_description, estimate_date, expiry_date, line_items, custom_fields

  • line_items replaces all existing line items. Send the complete list.
  • Secondary customers on the estimate are kept.
  • For an APPROVED estimate that already has invoices, only the fields that can still be edited are changed.
  • The update is rejected while CPQ is processing the estimate or signatures are pending.
mutation UpdateEstimate($id: ID!, $input: EstimateUpdateInput!) {
  updateEstimate(id: $id, input: $input) {
    estimate { id expiry_date estimate_description line_items { name quantity unit_price total } total }
    user_errors { field message code }
  }
}
{
  "id": "<estimate_uid>",
  "input": {
    "estimate_description": "Compressor replacement (revised)",
    "expiry_date": "2026-12-05T12:00:00Z",
    "line_items": [
      { "product_uid": "<product_uid>", "quantity": 1, "unit_price": 1750 },
      { "name": "Labor", "quantity": 4, "unit_price": 95, "discount": 10, "discount_type": "PERCENTAGE" }
    ]
  }
}

Delete an estimate

deleteEstimate(id: ID!)

You can't delete an estimate that has an active deposit (The Quote has an active deposit.) or that CPQ is still processing.

mutation DeleteEstimate($id: ID!) {
  deleteEstimate(id: $id) {
    deleted_id
    user_errors { field message code }
  }
}
{ "id": "<estimate_uid>" }

Did this page help you?