Query refunds issued to customers, including amounts and payment references.
Refund — Returns a single refund by id
Refund — Returns a single refund by idquery 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
Refunds — Returns a paginated list of refunds with sorting and filtersquery 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
| Field | Type | Description |
|---|---|---|
id | Int | Unique identifier. |
label | String | Refund reference number. |
dated_at | Date | Refund date. |
status | RefundStatus | Current status. |
tax_type | TaxType | Tax calculation method (Exclusive/Inclusive). |
total_units | Float | Total quantity refunded. |
subtotal | Float | Total before taxes and discounts. |
total_without_tax | Float | Total before taxes. |
total_ecotax | Float | Total ecotaxes. |
total | Float | Grand total of the refund. |
exchange_rate | Float | Currency exchange rate used. |
notes | String | Public notes. |
internal_notes | String | Private notes. |
location_label | String | Impacted warehouse label. |
currency | Currency | Refund currency. |
created_at | DateTime | Creation time. |
updated_at | DateTime | Last update time. |
customer | Customer | Associated customer. |
account_representative | AccountRepresentative | Assigned representative. |
price_level | PriceLevel | Applied price level. |
pdf_template | PdfTemplate | Template used for PDF. |
billing_address | Address | Billing 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_count | Int | Number of linked product returns. |
product_returns | [ProductReturn] | Source product returns. |
invoices | [Invoice] | Source invoices. |
orders | [Order] | Source sales orders. |
season | Season | Associated 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:
| Field | Example |
|---|---|
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:
idlabelstatustax_typetotal_unitstotalcustomer_idcustomer_labelcreated_atdated_atupdated_at
Enums
RefundStatus
RefundStatus| Value | Description |
|---|---|
unpublished | Draft status (no impact). |
pending | Document processed, payment awaiting. |
refunded | Payment confirmed. |
cancelled | Document voided. |
TaxType
TaxType| Value | Description |
|---|---|
exclusive | Tax calculated on top of the net price. |
inclusive | Tax included in the displayed price. |
