Refunds Queries

Query refunds issued to customers, including amounts and payment references.

Refund — Returns a single refund by id

query GetRefund($id: ID!) {
  Refund(id: $id) {
    id
    label
    dated_at
    status
    total
    customer { id label }
    line_items {
      id
      variant { id label }
      quantity
      total
    }
  }
}

Refunds — Returns a paginated list of refunds with sorting and filters

query Refunds(
  $where: QueryRefundsWhereWhereConditions,
  $orderBy: [QueryRefundsOrderByOrderByClause!],
  $search: String,
  $first: Int,
  $page: Int
) {
  Refunds(
    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.
labelStringRefund reference number.
dated_atDateRefund date.
statusRefundStatusCurrent status.
tax_typeTaxTypeTax calculation method (Exclusive/Inclusive).
total_unitsFloatTotal quantity refunded.
subtotalFloatTotal before taxes and discounts.
total_without_taxFloatTotal before taxes.
total_ecotaxFloatTotal ecotaxes.
totalFloatGrand total of the refund.
exchange_rateFloatCurrency exchange rate used.
notesStringPublic notes.
internal_notesStringPrivate notes.
location_labelStringImpacted warehouse label.
currencyCurrencyRefund currency.
created_atDateTimeCreation time.
updated_atDateTimeLast update time.
customerCustomerAssociated customer.
account_representativeAccountRepresentativeAssigned representative.
price_levelPriceLevelApplied price level.
pdf_templatePdfTemplateTemplate used for PDF.
billing_addressAddressBilling address link.
email_histories[EmailHistory]History of sent emails.
files[File]Attached files.
integrations[Integration]Linked external platforms.
line_items[LineItemRefund]List of items refunded.
total_taxes[DocumentTaxRate]Summary of applied taxes.
product_returns_countIntNumber of linked product returns.
product_returns[ProductReturn]Source product returns.
invoices[Invoice]Source invoices.
orders[Order]Source sales orders.
seasonSeasonAssociated season.
custom_fields[EntityCustomField]Custom fields for this entity.

Filters

The following fields can be used in the where parameter:

id, label, status, tax_type, total_units, total_without_tax, total_ecotax, subtotal, total, exchange_rate, notes, internal_notes, currency, customer_id, account_representative_id, price_level_id, pdf_template_id, created_at, dated_at, updated_at, season_id, product_returns_count, variant_id, variant_label, variant_sku, product_tag_id, customer_tag_id, location_id, is_sent.

Example Filters:

FieldExample
status{ "column": "STATUS", "operator": "EQ", "value": "refunded" }
customer_id{ "column": "CUSTOMER_ID", "operator": "EQ", "value": 100001 }
variant_id{ "column": "VARIANT_ID", "operator": "EXISTS", "value": 200050 }
dated_at{ "column": "DATED_AT", "operator": "GTE", "value": "2025-01-01" }

Sorting

You can sort results using the orderBy parameter:

  • id
  • label
  • status
  • tax_type
  • total_units
  • total
  • customer_id
  • customer_label
  • created_at
  • dated_at
  • updated_at

Enums

RefundStatus

ValueDescription
unpublishedDraft status (no impact).
pendingDocument processed, payment awaiting.
refundedPayment confirmed.
cancelledDocument voided.

TaxType

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