ReturnZap GraphQL API Documentation

Welcome to the ReturnZap API documentation. Here you can find details about all available queries, mutations, and types.

API Endpoints
https://api.returnzap.com/graphql/admin
Headers
# Your authorization token must be included in all requests.
Authorization: Bearer <YOUR_TOKEN_HERE>
Version

1.0.0

Introduction

This is the API documentation for ReturnZap. Here you can explore all the available queries, mutations, and data types.

Money semantics

Which amount do I actually refund?

Return.suggestedRefund(returnItemIds:) returns several MoneySet values. Only one of them is the amount to pay out.

Field Meaning
availableForRefundSet Gross ceiling for the selected items — the most this selection can be refunded. It does not report the remaining refundable amount of the whole order. Never pay this out.
suggestedRefundSet Gross suggested refund, before outstanding handling and restocking fees.
netRefundPayableSet The payable amount. suggestedRefundSet minus the handling and restocking fees still outstanding on the return, clamped at zero.

Pass netRefundPayableSet to returnRefund(refundFullAmount:).

The fee arguments on returnRefundhandlingFee and restockingFee — are record-only. They are stored on the return for reporting and do not reduce refundFullAmount. Sending suggestedRefundSet together with a fee argument over-refunds the customer by the fee. The same applies to returnCreateStoreCredit(amount:). One mode caveat: restockingFee is only recorded when the return's restocking fee is configured once per return; in once-per-item mode the argument is ignored and Return.actualRestockingFeeCharged stays unchanged.

Record-only does not mean optional. netRefundPayableSet is computed as suggestedRefundSet minus the fees still outstanding — the suggested fee minus what has already been recorded as charged. If you deduct a fee by paying out netRefundPayableSet but never send handlingFee / restockingFee, nothing is recorded, and the next partial refund on the same return will subtract the very same fee again and short-change the customer. Always send the fee amounts the deduction represents — that is what handlingFeeSuggestedSet and restockingFeeSuggestedSet are for, and it is what the ReturnZap admin UI does on every refund.

The one exception is a clamped payout: if netRefundPayableSet comes back 0.00 while suggestedRefundSet is positive, the outstanding fees exceed this selection's gross refund, so only part of the fee is actually being withheld. Do not send the full suggested fee amounts there — the recorded fee would exceed what was withheld, the return would show no outstanding fee, and the next partial refund would pay out too much. Recorded fees are cumulative maxima (Return.actualHandlingFeeCharged / Return.actualRestockingFeeCharged), so in the clamped case send fee amounts that grow those recorded values by at most this selection's suggestedRefundSet — or resolve the fee-bearing selection last, where the clamp cannot occur.

Optional shipping reimbursement and store-credit incentives are not folded into netRefundPayableSet; add them yourself if your flow offers them. For a store-credit incentive, adding it to amount alone is not enough: also pass it as returnCreateStoreCredit(bonusCredit:). When the shop issues credit as Shopify account credit, only the bonusCredit portion is excluded from the order's refundable balance — an incentive folded silently into amount consumes that balance and can shrink a later refund on the same order.

shopMoney vs presentmentMoney

Every MoneySet is { shopMoney, presentmentMoney }, and each Money is { amount, currencyCode }. Presentment is the currency the customer paid in; shop is the store's own currency.

returnRefund validates refundFullAmount against Shopify's presentment transaction totals, so send presentmentMoney.amount with refundCurrency: presentmentMoney.currencyCode. Use shopMoney only when aggregating across orders in a single currency — never mix the two in one total.

Worked example

suggestedRefund requires returnItemIds. It returns null when the list is empty, when none of the ids resolve to a return item on this return with a Shopify line item, or when the underlying Shopify call fails. A null is never "the refund is zero" — treat it as "unknown, do not refund" and retry.

query SuggestedRefund(: ID!, : [ID]!) {
  getReturn(returnId: ) {
    id
    suggestedRefund(returnItemIds: , refundShipping: false) {
      availableForRefundSet { presentmentMoney { amount currencyCode } }
      suggestedRefundSet    { presentmentMoney { amount currencyCode } }
      netRefundPayableSet   { presentmentMoney { amount currencyCode } }
      handlingFeeSuggestedSet   { presentmentMoney { amount } }
      restockingFeeSuggestedSet { presentmentMoney { amount } }
    }
  }
}

Then feed netRefundPayableSet.presentmentMoney straight into the mutation:

mutation Refund(
  : ID!
  : [ID!]!
  : Decimal!      # netRefundPayableSet.presentmentMoney.amount
  : String!     # netRefundPayableSet.presentmentMoney.currencyCode
  # The fee args are optional in the schema, but always send both (0 if none) — see
  # above, including the clamped-payout exception when netRefundPayableSet is 0.00.
  : Decimal! # handlingFeeSuggestedSet.presentmentMoney.amount
  : Decimal! # restockingFeeSuggestedSet.presentmentMoney.amount
) {
  returnRefund(
    returnId: 
    returnItemIds: 
    refundShipping: false
    refundFullAmount: 
    refundCurrency: 
    handlingFee: 
    restockingFee: 
    notifyCustomer: true
  ) {
    error
    refund {
      shopifyRefundId
      requestedTotalRefundAmount
      requestedCurrencyCode
      presentmentTotalAmountRefunded
    }
  }
}

Reading a RefundType

  • requestedTotalRefundAmount / requestedCurrencyCode — exactly what you passed as refundFullAmount / refundCurrency, in presentment currency. Available immediately.
  • presentmentTotalAmountRefunded — the net cash Shopify refunded. This is the settlement figure, and it is populated asynchronously: Shopify can delay totalRefundedSet until the underlying transactions settle, so a completed refund can legitimately read 0.00 for minutes or longer. A nightly backfill re-fetches recent refunds still sitting at zero. Do not treat 0.00 here as "the refund failed" — check requestedTotalRefundAmount and the error field on the mutation instead.
  • shopTotalAmountRefunded and the shop* breakdown carry the same figures converted to the shop's currency, with the same delay.
  • currencyCode and totalAmountRefunded are deprecated aliases of presentmentCurrencyCode and presentmentTotalAmountRefunded.

Resolution behavior

Confirming a resolution

returnRefund and returnCreateStoreCredit commit in one transaction. The reliable immediate signals are the mutation's own payload and the return's collections:

  • returnRefund { error } — empty string on success; a locale key such as refundMutation.refundIntegrationError on failure.
  • Return.refunds — the new RefundType is present as soon as the mutation returns.
  • Return.storeCredits — likewise for store credit.

Return.resolvedStatus (RESOLVED / PARTIALLY_RESOLVED / UNRESOLVED) is recomputed in the same transaction, but the return object embedded in the mutation payload is serialized from the copy loaded before the resolution, so it can still show the pre-refund value. Re-query getReturn if you need resolvedStatus, or use refunds as the immediate signal.

Duplicate resolutions are already rejected server-side

You do not need to build your own idempotency guard against double-refunding. Every financial path takes a row lock on the return, then re-reads the items:

  • returnRefund and returnCreateStoreCredit only accept return items that are not already resolved. A retry against an already-refunded item fails with refundMutation.returnItemsNotEligibleForRefund (or returnCreateStoreCreditMutation.returnItemsNotEligibleForStoreCredit), not a second payout.
  • Crossing the paths is rejected too: crediting an item that already has a refund, or refunding an item that already has store credit, fails on the loser of the lock.

Never retry blindly on a non-empty error. refundMutation.refundIntegrationError covers both a harmless rejection (a concurrent duplicate lost the row lock — no money moved) and a reconciliation failure after Shopify already moved money, and the two are not distinguishable from the response. On any error, re-query getReturn { refunds { … } }. A matching refund present means the payout landed — do not retry. A matching refund absent is not proof that no money moved: in the reconciliation-failure case ReturnZap cannot attribute the new Shopify refund and deliberately records nothing, so the payout exists in Shopify but never appears in refunds. Before retrying, check the order's refund list in Shopify admin (or via the Shopify API); if a refund for the amount is already there, reconcile manually with ReturnZap support instead of retrying.

Refunding never restocks

Issuing a refund or store credit does not put inventory back. Restocking is a separate, explicit, irreversible call, per item:

mutation Restock(: ID!, : [ID!]!, : ID!) {
  returnDispose(
    returnId: 
    returnItemIds: 
    dispositionAction: RESTOCK
    shopifyLocationId: 
  ) {
    error
    return { id }
  }
}

Items that were rejected or marked missing at receiving cannot be restocked; the mutation restocks the remaining valid items and returns disposeMutation.itemNotRestockable alongside the payload as a partial-success caveat.

Finding a return

What returns(query:) matches

The free-text query argument on returns (and the deprecated dashboardReturns) runs a PostgreSQL full-text search over exactly these seven columns:

Matched field Exposed on Return as
customer_first_name customerFirstName
customer_last_name customerLastName
customer_email customerEmail
shopify_order_number shopifyOrderNumber
rma_number rmaNumber
tracking_number trackingNumber
shopify_order_id shopifyOrderId

Nothing else is searched — not notes, not SKUs, not product titles, not addresses. It is a PostgreSQL full-text match using the english configuration, not a substring match: partial fragments and prefixes do not hit, and all terms must match. Terms are also stemmed and stop-word filtered — inflections of the same English word share a match (returned finds returning), and a term that is an English stop word (a customer named May, for example) is dropped entirely and can make a row unfindable by that field alone. Do not treat it as exact token matching. Matching is a filter only — results are ordered by sortBy (default -returnDate), not by relevance.

Read the order number off Return.shopifyOrderNumber. Return.orderNumber still exists as a deprecated alias of the same value — new integrations should not use it.

RMA number formats

Generated RMA numbers come in two shapes, and which one a shop uses is a per-shop setting. You cannot tell them apart from a single value's shape alone.

  • Short (the default): 1.1001 — an unpadded per-order return counter and the Shopify order name with # stripped, no date.
  • Long: 0001.1001.20260613 — the counter zero-padded to four digits, the order name, and YYYYMMDD of creation.

A shop can also override the RMA number entirely when approving a return: any custom value is accepted (truncated to 45 characters), so do not build a parser that rejects values outside the two generated shapes.

The return-label barcode

The barcode printed on the RMA slip does not always encode the RMA number. It encodes whichever value the shop configured, one of four:

Setting Barcode contents
NONE No barcode is rendered at all.
SHOPIFY_ORDER_NUMBER Return.shopifyOrderNumber
SHOPIFY_ORDER_ID Return.shopifyOrderId
RMA_NUMBER Return.rmaNumber, with any apostrophes stripped

A scanner-driven lookup must therefore try the scanned string against the free-text returns(query:) search rather than assuming it is an RMA number — all three non-empty settings encode a field that search covers. Note the RMA_NUMBER caveat: the search indexes the stored rmaNumber verbatim, so for the rare RMA number containing an apostrophe the scanned barcode is not byte-identical to the stored value. Fall back to matching Return.rmaNumber client-side if a scan comes back empty.

Barcodes are Code 128, which cannot encode every character. If the configured value contains a character outside that set — possible with RMA_NUMBER when a custom RMA carries, say, an accented letter — the slip renders without a barcode rather than failing, so a non-NONE setting does not guarantee a barcode on every slip.

Enums, stages, and deprecated fields

Return.systemStage is an Int, and its order is not workflow order

systemStage is typed Int, not an enum. Its values are:

Value Meaning
1 Automatically approved
2 Pending approval
3 Approved
4 Rejected
5 Received

Do not sort or compare on this number. The numbers are storage ids, not workflow positions — internally the workflow order is a separate remapping in which pending approval comes first and automatic approval sits between approved and received. Treat systemStage as a categorical label.

systemStage is also null for a return sitting in a shop-defined custom stage. Use stageId plus the shop's stage list to resolve the label:

query Stages {
  getMyShop {
    stages { id label systemStage behavior }
  }
}

Match Return.stageId against id in that list. Note the type mismatch: Stage.systemStage on that list is the SystemStage enum (AUTOMATICALLY_APPROVED, PENDING_APPROVAL, APPROVED, REJECTED, RECEIVED), while Return.systemStage is the Int above — the table maps between them. A custom stage has systemStage: null but may still behave like a system stage: Stage.behavior carries the effective SystemStage enum for a custom stage configured to act like one (for example a shop's own "received" stage), and is the field to read when you care about semantics rather than identity. Return.stageLabel is a snapshot of the stage's label taken when the return entered the stage: if the merchant later renames the stage, stageLabel keeps the old text while stages[].label reflects the rename. Map stageId against the stage list when you need the current display name. statusId and statusLabel are older aliases of stageId and stageLabel.

Return.availableActions

availableActions is a list of ProcessingStatusAction tokens that partitions returns into two coarse families — draft and live. It does not check per-mutation eligibility: a fully resolved return still reports POST_ACTIVATION_ACTIONS even though a further refund would be rejected. The complete set of values it can return:

Token Meaning
POST_ACTIVATION_ACTIONS The return is live (not a draft); the approve / receive / refund / dispose family of mutations applies, subject to each mutation's own validation. This is returned alone, never alongside the draft tokens.
DISCARD Draft only — the draft can be discarded. Not offered once its Shopify return has synced.
CONVERT_SHIPPING Draft only — the shipping choice can still be converted.
RETRY Draft only — a failed activation step can be retried.
WAIVE_BALANCE Draft only — an outstanding exchange balance can be waived.
RESEND_BALANCE_INVOICE Draft only — the balance invoice can be re-sent.

A draft never reports POST_ACTIVATION_ACTIONS: the post-activation mutations exclude drafts and would report the return as not found.

Disposition enums

returnDispose takes two mutually exclusive enums. Prefer dispositionAction — it is the business-level intent, and ReturnZap maps it to what Shopify records.

DispositionAction (pass one of these):

Value Recorded in Shopify as
RESTOCK RESTOCKED — the only value that returns inventory to stock
REFURBISH PROCESSING_REQUIRED
RECYCLE NOT_RESTOCKED
DESTROY NOT_RESTOCKED
DONATE NOT_RESTOCKED
LIQUIDATE NOT_RESTOCKED
RESELL NOT_RESTOCKED

DispositionType is the raw Shopify-level value (MISSING, PROCESSING_REQUIRED, NOT_RESTOCKED, RESTOCKED) and is accepted for backwards compatibility. Supply one of the two arguments: supplying neither fails with disposeMutation.invalidDispositionType, and if both are supplied dispositionAction wins and dispositionType is silently ignored — do not send both. shopifyLocationId is required, and every id in returnItemIds must belong to the given return. Disposition is irreversible.

Item vendor

For newly created return items, vendor is recorded from the Shopify order line at purchase time. It does not follow the product if the merchant later reassigns the product's vendor. Older return items may contain values populated by historical maintenance.

Automatic population begins with the 2026-08-25 release noted in the changelog. This release does not run a backfill, so older return items that were not populated by historical maintenance remain empty. Around the release itself the boundary is approximate rather than exact — a rolling deploy means some returns created that day still read empty.

An empty vendor is therefore never authoritative: it means the Shopify line carried no vendor, or the return item was not populated, and the API cannot tell you which. Do not read "" as evidence that a product has no vendor.

Migrating off deprecated fields

dashboardReturnsreturns. Same arguments, same DashboardResponse. The old name was a misnomer: it returns a filtered, paginated list of returns, not dashboard aggregates. Rename the field and nothing else.

archiveReturnsreturnUpdateStatus. The arguments differ:

archiveReturns returnUpdateStatus
returnIds: [ID]! — no length limit returnIds: [ID]! — capped at 10 ids per call; may be empty when filters is supplied
archive: Boolean! isArchived: Boolean! (renamed)
filters: FiltersInput — archive everything matching a filter instead of an explicit id list
returns success returns success and affectedReturnIds

Passing neither filters nor a non-empty returnIds is an error, and ids for returns outside your shop are silently not matched — so read affectedReturnIds rather than assuming every id you sent was archived. The two argument styles are mutually exclusive in effect: whenever returnIds is non-empty, filters is ignored entirely — to archive by filter, send returnIds: []. Batches larger than ten ids are rejected; chunk them or switch to filter mode.

The two are not behaviourally identical: archiveReturns skips draft returns, returnUpdateStatus does not. If your id list or filter can include drafts, a straight rename will start archiving them. Filter drafts out of returnIds yourself — adding filters alongside a non-empty id list does nothing — or use filter mode with filters: { processingStatus: [...] } and an empty returnIds.

Other deprecated fields worth migrating while you are here: suggestionRefundsuggestedRefund, handlingFeeChargedoriginalHandlingFeeCharged / actualHandlingFeeCharged, restockingFeeChargedoriginalRestockingFeeCharged / actualRestockingFeeCharged, shippedTowarehouseName, appliedRulesappliedRulesDetailed, next/previousnextReturn/previousReturn.

Webhooks

The event catalog

There are exactly two events:

Event Fires when
return_created A return becomes live.
return_updated A live return changes one of the fields carried in the payload below.

Deliveries are queued on transaction commit, and events are coalesced per return per transaction: several saves of the same return in one business operation produce one delivery, and if both events are pending for the same return, only return_created is sent. Do not expect one delivery per field change. A change that only touches fields outside the payload usually delivers nothing; return_date is the exception and can fire return_updated without appearing in the body.

Drafts never deliver. A return in a draft state is skipped entirely; it sends return_created when it is activated, not when the draft row appeared.

Two other cases are silent. Unarchiving a return does not send return_updated (archiving does). Pre-fulfillment and manual withdrawals never send webhooks.

Webhooks are a plan feature. If the shop's subscription does not include webhooks, nothing is delivered, and no error is surfaced to the API caller.

The delivered request

Every delivery is an HTTP POST with Content-Type: application/json and a body of this shape. Note the keys are snake_case, unlike the GraphQL API's camelCase:

{
  "event": "return_created",
  "content": {
    "shop":   { "id": "42", "uuid": "…", "url": "example.myshopify.com" },
    "return": { "id": "12345", "uuid": "…", "rma_number": "1.1001", "…": "…" }
  },
  "trace_id": "…",
  "call_id": "…",
  "webhook_url": "https://example.com/hooks/returnzap",
  "webhook_id": "…"
}

content.return is a snake_cased projection of the GraphQL Return type — a fixed subset, not the whole type. It carries the identity and status fields (id, uuid, rma_number, customer_email, customer_first_name, customer_last_name, shopify_order_id, shopify_order_number, rma_form_url, stage_id, stage_label, system_stage, created_at, is_archived, approval_required, rejected_at, rejection_reason, gift_return, gift_return_email_address, no_shipping_required, exchange_balance_due, return_item_types, return_type_labels), the shipping fields (tracking_number, shipping_method, shipment_carrier_name, shipment_service_name), the customer_address / destination_address / gift_return_address objects, a shipment object holding tracking_url, an exchange_items array, and an items array. Each item carries its own identifiers, quantities, reason and condition, pre_tax_price_set / post_tax_price_set money sets, its exchange_item, and the shopper's answers.

Ids arrive as strings, including content.shop.id and content.return.id.

The same field semantics documented elsewhere in these docs apply here — in particular system_stage is a categorical Int whose order is not workflow order, and stage_label is a snapshot taken when the return entered the stage.

The four top-level fields outside content are added by the delivery layer:

Field Meaning
trace_id Identifies the originating business operation. Stable across retries — quote it to support.
call_id Unique per delivery attempt. A retry carries a new one, so it is not a deduplication key.
webhook_url The endpoint this delivery was addressed to.
webhook_id The endpoint's id.

Treat deliveries as best-effort and possibly duplicated, and possibly out of order. Each body is a snapshot: upsert on content.return.id (or uuid). Do not drop a delivery because event plus return id already arrived — later updates reuse that pair. call_id changes on every attempt, and trace_id names the originating operation (callers can reuse X-Trace-Id), so neither identifies one delivery.

Verifying the signature

Every delivery carries X-ReturnZap-Signature: the lowercase hex HMAC-SHA256 of the raw request body, keyed by the endpoint's signing secret (UTF-8). There is no timestamp, no version prefix, and no other component in the header value.

The body is serialized once as compact, key-sorted JSON and those exact bytes are both signed and sent, so verify against the raw bytes you received — parsing the JSON and re-serializing it will not reproduce the signature reliably.

import hashlib
            import hmac
            
            
            def verify(raw_body: bytes, signature_header: str, secret: str) -> bool:
                expected = hmac.new(secret.encode("utf-8"), raw_body, hashlib.sha256).hexdigest()
                return hmac.compare_digest(expected, signature_header or "")
            
const crypto = require('node:crypto')
            
            function verify(rawBody, signatureHeader, secret) {
              const expected = crypto.createHmac('sha256', secret).update(rawBody).digest('hex')
              const a = Buffer.from(expected, 'utf8')
              const b = Buffer.from(signatureHeader || '', 'utf8')
              return a.length === b.length && crypto.timingSafeEqual(a, b)
            }
            

Most web frameworks hand you a parsed body by default. Capture the raw body explicitly (express.raw({ type: 'application/json' }), Django's request.body before any parsing, and so on) and compare in constant time, as above.

The signing secret is generated when the endpoint is created and shown once. Rotating it takes effect immediately — the previous secret stops validating on the next delivery. Copy the new secret and deploy it; there is no overlap window, so deliveries between rotate and deploy fail signature checks. If the endpoint is also configured with HTTP Basic Auth, deliveries additionally carry a standard Authorization: Basic header; the signature is unaffected.

This signing scheme is not final. The Warehouse partner API uses a newer, timestamped scheme, and whether the two converge is an open question. Keep your verification logic in one place so it can be updated.

Retries

Each attempt has a 10-second timeout. If the endpoint answers with a 4xx or 5xx status, the delivery is retried up to 5 times with exponential backoff from a 30-second base: 30s, 60s, 120s, 240s, 480s — six attempts in total, spanning roughly 15 minutes. Retries repeat the same content with a fresh call_id and the original trace_id.

Two limits are worth designing around:

  • A connection failure or a timeout is not retried. Only a 4xx or 5xx status schedules a retry; if your endpoint is unreachable or too slow to answer within 10 seconds, that delivery is dropped. Answer 2xx immediately and do the work asynchronously.
  • After the final retry the delivery is abandoned — there is no dead-letter queue and no self-serve replay. Webhooks are a latency optimization, not a system of record: reconcile against the API periodically rather than assuming every event arrived.

Configuring an endpoint

There are two kinds of endpoint, and both deliver identically:

  • Customer-managed. Configured in HQ under Settings → Integrations: URL, which of the two events to send, an enable/disable toggle, optional Basic Auth credentials, and the signing secret with a rotate action. Requires the HQ Can Modify Settings permission — without it the controls are hidden. At most one per shop — a database constraint enforces it. Clearing the URL deletes the endpoint.
  • Support-managed. Additional endpoints ReturnZap support configures on request, one per distinct URL, not visible or editable in HQ.

A delivery goes to every enabled endpoint whose event list includes the event, so a shop with both kinds receives the event on both.

API tokens

Creating a token

Merchants issue their own tokens — no support ticket needed. In HQ, go to Settings → Integrations → API tokens and choose Create token. The only input is an optional label (it defaults to API Token); use it to name the integration the token belongs to.

The plaintext token is displayed once, immediately after minting, and is never retrievable afterwards. Copy it straight into your secret store. It looks like rz_prod_ followed by 32 hex characters.

The card also supports editing a token's label and revoking a token. Revocation takes effect on the token's next request and cannot be undone — issue a new token and migrate rather than expecting to restore one. The token list shows each token's label, last four characters, creation date, who created it, and when it was last used.

Minting requires the API access plan feature and the HQ Can Modify Settings permission. Losing the feature automatically revokes every active token from this card — they disappear from the list and cannot be restored.

Using a token

Send it as a bearer token on every request:

POST /graphql/admin HTTP/1.1
Host: api.returnzap.com
Content-Type: application/json
Authorization: Bearer rz_prod_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Tokens minted from this card are full-access and non-expiring. There is no rotation action, no expiry to configure, and no narrower scope to request: the card issues one kind of credential. (Narrower scopes and expiry exist inside the system for other credential types — do not build an integration that expects to obtain them here.)

Two consequences of "full access" are worth stating plainly:

  • A token carries shop-wide authority over return data. Per-user permission checks do not apply to token-authenticated requests, so there is no way to hand out a read-only or returns-only token from here. Keep it server-side, in a secret manager — never ship it to a browser, a mobile app, or a shared CI log. The one thing a token deliberately cannot do is manage credentials: minting, relabelling, revoking, and rotating tokens require a signed-in HQ user, so a leaked token cannot mint itself a successor.
  • A token is bound to the shop it was minted for. To integrate with several shops, mint a token per shop.

The last used column is stamped at most once every five minutes, so it is a liveness hint, not an audit log. Do not use it to prove a token was or was not used at a given moment.

The separate Merchant MCP credential on the same settings page is a different flow with its own lifecycle; it does not authenticate against this API.

Deprecation policy and changelog

How a deprecation is signalled

A deprecated query, mutation, or field carries a deprecationReason. That reason is visible through GraphQL introspection and rendered in these docs, so your tooling can detect deprecations without reading release notes. Treat it as explanatory metadata — it often names a replacement, but it may be empty or say only that the member is unused. There is no other signal: no response header, no sunset date embedded in the schema.

Deprecation alone changes nothing at runtime. The field keeps working, unchanged, for the whole window below.

The windows

  • 90 days of sunset from the deprecation date. During this period the deprecated member continues to behave exactly as before. This is the window to migrate in.
  • Removable at 180 days, and only then. A deprecated member is removed no earlier than 180 days after its deprecation date, and only once measured usage has reached zero — a field still carrying live traffic stays past 180 days rather than breaking callers.
  • Every removal is announced in the changelog below before it ships. A member disappearing without a changelog entry is a bug; report it.

Migrate within the sunset window rather than at the deadline, and read "Enums, stages, and deprecated fields" first: some replacements are not behaviour-identical to the member they replace (archiveReturnsreturnUpdateStatus differs on draft returns, for one), so a blind rename can change what your integration does.

Changelog

Newest first. This log begins in August 2026, seeded with the most recent notable schema changes; it is not a complete history of the API.

Date Change
2026-08-25 Began automatically populating vendor on newly created return items. No backfill in this release; older items may contain historical values, and an empty value stays ambiguous. See "Item vendor".
2026-08-12 Added SuggestedRefundType.netRefundPayableSet — the refund amount to actually pay out, suggestedRefundSet minus outstanding handling and restocking fees. See "Money semantics".
2025-11-03 Deprecated the dashboardReturns query → use returns. Same arguments, same response type.
2024-10-24 Deprecated the archiveReturns mutation → use returnUpdateStatus. Arguments differ, and the two treat draft returns differently.

Queries

dashboardReturns

Use 'returns' instead. This query was misnamed - it returns a filterable list of returns, not dashboard data.
Response

Returns a DashboardResponse

Arguments
Name Description
query - String Default = ""
stages - [Int]
status - ArchiveFilter
returnDate - DateFilterRange
orderDate - DateFilterRange
stageUpdatedDate - DateFilterRange
perPage - Int Default = 25
currentPage - Int Default = 0
sortBy - String Default = "-returnDate"
resolvedStatus - [ResolvedStatus]
returnItemTypes - [String]
warehouseIds - [Int] No filtering if not passed in or empty list. Use 0 to designate default, or no warehouse.
requestType - [String]

Example

Query
query dashboardReturns(
  $query: String,
  $stages: [Int],
  $status: ArchiveFilter,
  $returnDate: DateFilterRange,
  $orderDate: DateFilterRange,
  $stageUpdatedDate: DateFilterRange,
  $perPage: Int,
  $currentPage: Int,
  $sortBy: String,
  $resolvedStatus: [ResolvedStatus],
  $returnItemTypes: [String],
  $warehouseIds: [Int],
  $requestType: [String]
) {
  dashboardReturns(
    query: $query,
    stages: $stages,
    status: $status,
    returnDate: $returnDate,
    orderDate: $orderDate,
    stageUpdatedDate: $stageUpdatedDate,
    perPage: $perPage,
    currentPage: $currentPage,
    sortBy: $sortBy,
    resolvedStatus: $resolvedStatus,
    returnItemTypes: $returnItemTypes,
    warehouseIds: $warehouseIds,
    requestType: $requestType
  ) {
    id
    returns {
      ...ReturnFragment
    }
    totalCount
  }
}
Variables
{
  "query": "",
  "stages": [123],
  "status": "ACTIVE",
  "returnDate": DateFilterRange,
  "orderDate": DateFilterRange,
  "stageUpdatedDate": DateFilterRange,
  "perPage": 25,
  "currentPage": 0,
  "sortBy": "-returnDate",
  "resolvedStatus": ["RESOLVED"],
  "returnItemTypes": ["xyz789"],
  "warehouseIds": [123],
  "requestType": ["xyz789"]
}
Response
{
  "data": {
    "dashboardReturns": {
      "id": "4",
      "returns": [Return],
      "totalCount": 987
    }
  }
}

getMyShop

Response

Returns an AuthenticatedShop

Example

Query
query getMyShop {
  getMyShop {
    uuid
    url
    primaryDomain
    timezone
    name
    onboardingCompletedAt
    currency
    isExchangeIntegrationEnabled
    isStoreCreditIntegrationEnabled
    id
    useNewAnalyticsUi
    useAsyncReturnProcessing
    installedAt
    returnReasons {
      ...ReturnReasonFragment
    }
    stages {
      ...StageFragment
    }
    easyPostAccount {
      ...EasyPostAccountTypeFragment
    }
    webhookUrl
    webhookEvents
    easypostApiKey
    onboardingComplete
    installDate
    exchangeIntegration
    storeCreditIntegration
  }
}
Response
{
  "data": {
    "getMyShop": {
      "uuid": "xyz789",
      "url": "xyz789",
      "primaryDomain": "xyz789",
      "timezone": "abc123",
      "name": "abc123",
      "onboardingCompletedAt": "2007-12-03T10:15:30Z",
      "currency": "abc123",
      "isExchangeIntegrationEnabled": false,
      "isStoreCreditIntegrationEnabled": true,
      "id": "4",
      "useNewAnalyticsUi": true,
      "useAsyncReturnProcessing": true,
      "installedAt": "2007-12-03T10:15:30Z",
      "returnReasons": [ReturnReason],
      "stages": [Stage],
      "easyPostAccount": EasyPostAccountType,
      "webhookUrl": "xyz789",
      "webhookEvents": ["RETURN_CREATED"],
      "easypostApiKey": "abc123",
      "onboardingComplete": false,
      "installDate": "2007-12-03T10:15:30Z",
      "exchangeIntegration": false,
      "storeCreditIntegration": false
    }
  }
}

getPaymentMethod

Description

Get a specific payment method by ID

Response

Returns a ShopPaymentMethod

Arguments
Name Description
paymentMethodId - ID!

Example

Query
query getPaymentMethod($paymentMethodId: ID!) {
  getPaymentMethod(paymentMethodId: $paymentMethodId) {
    id
    createdAt
    brand
    lastFour
    expMonth
    expYear
    bankName
    isActive
    isDefault
    isExpired
  }
}
Variables
{"paymentMethodId": 4}
Response
{
  "data": {
    "getPaymentMethod": {
      "id": "cc14463d-6a06-4740-a3d8-380aacfa0644",
      "createdAt": "2007-12-03T10:15:30Z",
      "brand": "abc123",
      "lastFour": "abc123",
      "expMonth": 123,
      "expYear": 123,
      "bankName": "xyz789",
      "isActive": false,
      "isDefault": true,
      "isExpired": true
    }
  }
}

getReturn

Response

Returns a Return

Arguments
Name Description
returnId - ID!

Example

Query
query getReturn($returnId: ID!) {
  getReturn(returnId: $returnId) {
    id
    uuid
    customerFirstName
    customerLastName
    customerEmail
    rmaNumber
    stageLabel
    stageUpdatedDate
    approvalRequired
    approvedAt
    rejectedAt
    rejectionReason
    notes
    allowResubmission
    receivedAt
    financialTerminalAt
    isArchived
    expiredAt
    shippingMethod
    giftReturn
    giftReturnEmailAddress
    trackingNumber
    deliveryDate
    deliveryStatus
    labelCurrency
    shopCurrency
    noShippingRequired
    feesSentThroughReturnIntegration
    originalHandlingFeeCharged
    actualHandlingFeeCharged
    originalRestockingFeeCharged
    actualRestockingFeeCharged
    shopifyReturnId
    shopifyReturnName
    shopifyOrderId
    shopifyOrderDate
    exchangeBalanceDue
    exchangeBalancePaidAt
    shopifyOrderNumber
    customerAddress {
      ...ReturnAddressTypeFragment
    }
    destinationAddress {
      ...ReturnAddressTypeFragment
    }
    giftReturnAddress {
      ...ReturnAddressTypeFragment
    }
    rmaFormUrl
    stageId
    systemStage
    statusId
    statusLabel
    labelUrl
    qrCodeUrl
    qrCodeDownloadUrl
    returnStatusPageUrl
    totalWeightGrams
    createdAt
    refunds {
      ...RefundTypeFragment
    }
    next
    previous
    nextReturn {
      ...ReturnFragment
    }
    previousReturn {
      ...ReturnFragment
    }
    exchangeOrders {
      ...ExchangeOrderFragment
    }
    shipment {
      ...ShipmentFragment
    }
    appliedRules
    appliedRulesDetailed {
      ...AppliedRuleTypeFragment
    }
    suggestionRefund {
      ...SuggestionRefundTypeFragment
    }
    suggestedRefund {
      ...SuggestedRefundTypeFragment
    }
    warehouseName
    shippedTo
    warehouse {
      ...WarehouseTypeFragment
    }
    storeCredits {
      ...StoreCreditTypeFragment
    }
    externalShippingLabelUrl
    items {
      ...ReturnItemFragment
    }
    exchangeItems {
      ...ExchangeItemFragment
    }
    handlingFeeCharged
    restockingFeeCharged
    shopifyOrderFulfillments {
      ...ShopifyFulfillmentTypeFragment
    }
    shopifyOrderTotalPrice
    availableActions
    shipmentCarrierName
    shipmentServiceName
    requestType
    resolvedAt
    originCountryCode
    orderId
    orderNumber
    orderDate
    returnDate
    isActive
    unitQuantity
    returnValueAmount
    resolvedStatus
    returnItemTypes
    returnTypeLabels
  }
}
Variables
{"returnId": "4"}
Response
{
  "data": {
    "getReturn": {
      "id": "4",
      "uuid": "xyz789",
      "customerFirstName": "xyz789",
      "customerLastName": "xyz789",
      "customerEmail": "abc123",
      "rmaNumber": "xyz789",
      "stageLabel": "xyz789",
      "stageUpdatedDate": "2007-12-03T10:15:30Z",
      "approvalRequired": false,
      "approvedAt": "2007-12-03T10:15:30Z",
      "rejectedAt": "2007-12-03T10:15:30Z",
      "rejectionReason": "xyz789",
      "notes": "xyz789",
      "allowResubmission": true,
      "receivedAt": "2007-12-03T10:15:30Z",
      "financialTerminalAt": "2007-12-03T10:15:30Z",
      "isArchived": true,
      "expiredAt": "2007-12-03T10:15:30Z",
      "shippingMethod": "FREE",
      "giftReturn": true,
      "giftReturnEmailAddress": "abc123",
      "trackingNumber": "xyz789",
      "deliveryDate": "2007-12-03T10:15:30Z",
      "deliveryStatus": "abc123",
      "labelCurrency": "xyz789",
      "shopCurrency": "xyz789",
      "noShippingRequired": false,
      "feesSentThroughReturnIntegration": false,
      "originalHandlingFeeCharged": Decimal,
      "actualHandlingFeeCharged": Decimal,
      "originalRestockingFeeCharged": Decimal,
      "actualRestockingFeeCharged": Decimal,
      "shopifyReturnId": "xyz789",
      "shopifyReturnName": "xyz789",
      "shopifyOrderId": "abc123",
      "shopifyOrderDate": "2007-12-03T10:15:30Z",
      "exchangeBalanceDue": Decimal,
      "exchangeBalancePaidAt": "2007-12-03T10:15:30Z",
      "shopifyOrderNumber": "xyz789",
      "customerAddress": ReturnAddressType,
      "destinationAddress": ReturnAddressType,
      "giftReturnAddress": ReturnAddressType,
      "rmaFormUrl": "abc123",
      "stageId": "4",
      "systemStage": 123,
      "statusId": "abc123",
      "statusLabel": "abc123",
      "labelUrl": "xyz789",
      "qrCodeUrl": "abc123",
      "qrCodeDownloadUrl": "abc123",
      "returnStatusPageUrl": "xyz789",
      "totalWeightGrams": Decimal,
      "createdAt": "2007-12-03T10:15:30Z",
      "refunds": [RefundType],
      "next": "xyz789",
      "previous": "xyz789",
      "nextReturn": Return,
      "previousReturn": Return,
      "exchangeOrders": [ExchangeOrder],
      "shipment": Shipment,
      "appliedRules": ["abc123"],
      "appliedRulesDetailed": [AppliedRuleType],
      "suggestionRefund": SuggestionRefundType,
      "suggestedRefund": SuggestedRefundType,
      "warehouseName": "xyz789",
      "shippedTo": "abc123",
      "warehouse": WarehouseType,
      "storeCredits": [StoreCreditType],
      "externalShippingLabelUrl": "xyz789",
      "items": [ReturnItem],
      "exchangeItems": [ExchangeItem],
      "handlingFeeCharged": Decimal,
      "restockingFeeCharged": Decimal,
      "shopifyOrderFulfillments": [
        ShopifyFulfillmentType
      ],
      "shopifyOrderTotalPrice": Decimal,
      "availableActions": ["DISCARD"],
      "shipmentCarrierName": "abc123",
      "shipmentServiceName": "xyz789",
      "requestType": "abc123",
      "resolvedAt": "2007-12-03T10:15:30Z",
      "originCountryCode": "xyz789",
      "orderId": "xyz789",
      "orderNumber": "abc123",
      "orderDate": "2007-12-03T10:15:30Z",
      "returnDate": "2007-12-03T10:15:30Z",
      "isActive": false,
      "unitQuantity": 123,
      "returnValueAmount": Decimal,
      "resolvedStatus": "RESOLVED",
      "returnItemTypes": ["abc123"],
      "returnTypeLabels": ["abc123"]
    }
  }
}

returns

Response

Returns a DashboardResponse

Arguments
Name Description
query - String Default = ""
stages - [Int]
status - ArchiveFilter
returnDate - DateFilterRange
orderDate - DateFilterRange
stageUpdatedDate - DateFilterRange
perPage - Int Default = 25
currentPage - Int Default = 0
sortBy - String Default = "-returnDate"
resolvedStatus - [ResolvedStatus]
returnItemTypes - [String]
warehouseIds - [Int] No filtering if not passed in or empty list. Use 0 to designate default, or no warehouse.
requestType - [String]

Example

Query
query returns(
  $query: String,
  $stages: [Int],
  $status: ArchiveFilter,
  $returnDate: DateFilterRange,
  $orderDate: DateFilterRange,
  $stageUpdatedDate: DateFilterRange,
  $perPage: Int,
  $currentPage: Int,
  $sortBy: String,
  $resolvedStatus: [ResolvedStatus],
  $returnItemTypes: [String],
  $warehouseIds: [Int],
  $requestType: [String]
) {
  returns(
    query: $query,
    stages: $stages,
    status: $status,
    returnDate: $returnDate,
    orderDate: $orderDate,
    stageUpdatedDate: $stageUpdatedDate,
    perPage: $perPage,
    currentPage: $currentPage,
    sortBy: $sortBy,
    resolvedStatus: $resolvedStatus,
    returnItemTypes: $returnItemTypes,
    warehouseIds: $warehouseIds,
    requestType: $requestType
  ) {
    id
    returns {
      ...ReturnFragment
    }
    totalCount
  }
}
Variables
{
  "query": "",
  "stages": [123],
  "status": "ACTIVE",
  "returnDate": DateFilterRange,
  "orderDate": DateFilterRange,
  "stageUpdatedDate": DateFilterRange,
  "perPage": 25,
  "currentPage": 0,
  "sortBy": "-returnDate",
  "resolvedStatus": ["RESOLVED"],
  "returnItemTypes": ["abc123"],
  "warehouseIds": [987],
  "requestType": ["abc123"]
}
Response
{
  "data": {
    "returns": {
      "id": "4",
      "returns": [Return],
      "totalCount": 123
    }
  }
}

shopifyUser

Response

Returns a ShopifyUser

Arguments
Name Description
id - ID!

Example

Query
query shopifyUser($id: ID!) {
  shopifyUser(id: $id) {
    id
    uuid
    shopifyId
    email
    firstName
    lastName
    shopifyRoles
  }
}
Variables
{"id": "4"}
Response
{
  "data": {
    "shopifyUser": {
      "id": "4",
      "uuid": "xyz789",
      "shopifyId": "xyz789",
      "email": "abc123",
      "firstName": "abc123",
      "lastName": "abc123",
      "shopifyRoles": "abc123"
    }
  }
}

Mutations

adminMarkReceived

Description

Preferred admin alias for returnReceived. Internally projects through the WMS Receipt lifecycle service so Receipt is the source of truth for receiving.

Response

Returns a ReceivedReturn

Arguments
Name Description
items - [ReceivedReturnItemInput!] Per-item receiving data with status, condition, and rejection reason
media - [WarehouseMediaInput!] Return-level warehouse media attached to the resulting Receipt
missingReturnItemIds - [ID] Legacy: List of return items that should be marked as missing
notes - [WarehouseNoteInput!] Return-level warehouse notes attached to the resulting Receipt
resolvedReturnItemIds - [ID] List of return items that should be marked as manually resolved
returnId - ID!

Example

Query
mutation adminMarkReceived(
  $items: [ReceivedReturnItemInput!],
  $media: [WarehouseMediaInput!],
  $missingReturnItemIds: [ID],
  $notes: [WarehouseNoteInput!],
  $resolvedReturnItemIds: [ID],
  $returnId: ID!
) {
  adminMarkReceived(
    items: $items,
    media: $media,
    missingReturnItemIds: $missingReturnItemIds,
    notes: $notes,
    resolvedReturnItemIds: $resolvedReturnItemIds,
    returnId: $returnId
  ) {
    error
    return {
      ...ReturnFragment
    }
  }
}
Variables
{
  "items": [ReceivedReturnItemInput],
  "media": [WarehouseMediaInput],
  "missingReturnItemIds": ["4"],
  "notes": [WarehouseNoteInput],
  "resolvedReturnItemIds": ["4"],
  "returnId": "4"
}
Response
{
  "data": {
    "adminMarkReceived": {
      "error": "abc123",
      "return": Return
    }
  }
}

archiveReturns

Use updateReturn or returnUpdateStatus mutations instead
Response

Returns an ArchiveReturns

Arguments
Name Description
archive - Boolean!
returnIds - [ID]!

Example

Query
mutation archiveReturns(
  $archive: Boolean!,
  $returnIds: [ID]!
) {
  archiveReturns(
    archive: $archive,
    returnIds: $returnIds
  ) {
    success
  }
}
Variables
{"archive": true, "returnIds": ["4"]}
Response
{"data": {"archiveReturns": {"success": false}}}

exchangeOrderBulkComplete

Use releaseExchangeItems instead
Description

Complete a list of exchange orders in Shopify and update the exchange order status in RZ

Response

Returns a ReleaseExchangeItemsMutation

Arguments
Name Description
exchangeItemIds - [ID!]
exchangeOrderIds - [ID!]
returnId - ID
returnItemIds - [ID!]

Example

Query
mutation exchangeOrderBulkComplete(
  $exchangeItemIds: [ID!],
  $exchangeOrderIds: [ID!],
  $returnId: ID,
  $returnItemIds: [ID!]
) {
  exchangeOrderBulkComplete(
    exchangeItemIds: $exchangeItemIds,
    exchangeOrderIds: $exchangeOrderIds,
    returnId: $returnId,
    returnItemIds: $returnItemIds
  ) {
    errors
    caveats
    exchangeOrders {
      ...ExchangeOrderFragment
    }
    exchangeItems {
      ...ExchangeItemFragment
    }
    return_ {
      ...ReturnFragment
    }
  }
}
Variables
{
  "exchangeItemIds": [4],
  "exchangeOrderIds": ["4"],
  "returnId": "4",
  "returnItemIds": ["4"]
}
Response
{
  "data": {
    "exchangeOrderBulkComplete": {
      "errors": ["xyz789"],
      "caveats": ["abc123"],
      "exchangeOrders": [ExchangeOrder],
      "exchangeItems": [ExchangeItem],
      "return_": Return
    }
  }
}

generatePortalImageUploadUrl

Response

Returns an GeneratePortalImageUploadURL

Arguments
Name Description
contentType - String!
filename - String!
imageType - String!

Example

Query
mutation generatePortalImageUploadUrl(
  $contentType: String!,
  $filename: String!,
  $imageType: String!
) {
  generatePortalImageUploadUrl(
    contentType: $contentType,
    filename: $filename,
    imageType: $imageType
  ) {
    errors {
      ...GQLErrorTypeFragment
    }
    uploadUrl {
      ...SignedUrlFragment
    }
    imagePath
  }
}
Variables
{
  "contentType": "xyz789",
  "filename": "xyz789",
  "imageType": "xyz789"
}
Response
{
  "data": {
    "generatePortalImageUploadUrl": {
      "errors": [GQLErrorType],
      "uploadUrl": SignedUrl,
      "imagePath": "xyz789"
    }
  }
}

generateUploadUrl

Use generate_shipping_label_upload_url instead
Response

Returns an GenerateShippingLabelUploadURL

Arguments
Name Description
contentType - String!
fileName - String!

Example

Query
mutation generateUploadUrl(
  $contentType: String!,
  $fileName: String!
) {
  generateUploadUrl(
    contentType: $contentType,
    fileName: $fileName
  ) {
    error
    url {
      ...SignedUrlFragment
    }
  }
}
Variables
{
  "contentType": "xyz789",
  "fileName": "xyz789"
}
Response
{
  "data": {
    "generateUploadUrl": {
      "error": "xyz789",
      "url": SignedUrl
    }
  }
}

questionCreate

Response

Returns a CreateOrUpdateQuestion

Arguments
Name Description
question - QuestionInput!

Example

Query
mutation questionCreate($question: QuestionInput!) {
  questionCreate(question: $question) {
    question {
      ...QuestionFragment
    }
  }
}
Variables
{"question": QuestionInput}
Response
{"data": {"questionCreate": {"question": Question}}}

questionDelete

Response

Returns a DeleteQuestion

Arguments
Name Description
questionId - ID!

Example

Query
mutation questionDelete($questionId: ID!) {
  questionDelete(questionId: $questionId) {
    success
  }
}
Variables
{"questionId": "4"}
Response
{"data": {"questionDelete": {"success": false}}}

questionUpdate

Response

Returns a CreateOrUpdateQuestion

Arguments
Name Description
question - QuestionInput!

Example

Query
mutation questionUpdate($question: QuestionInput!) {
  questionUpdate(question: $question) {
    question {
      ...QuestionFragment
    }
  }
}
Variables
{"question": QuestionInput}
Response
{"data": {"questionUpdate": {"question": Question}}}

releaseExchangeItems

Description

Release exchange items to be fulfilled.

Response

Returns a ReleaseExchangeItemsMutation

Arguments
Name Description
exchangeItemIds - [ID!]
exchangeOrderIds - [ID!]
returnId - ID
returnItemIds - [ID!]

Example

Query
mutation releaseExchangeItems(
  $exchangeItemIds: [ID!],
  $exchangeOrderIds: [ID!],
  $returnId: ID,
  $returnItemIds: [ID!]
) {
  releaseExchangeItems(
    exchangeItemIds: $exchangeItemIds,
    exchangeOrderIds: $exchangeOrderIds,
    returnId: $returnId,
    returnItemIds: $returnItemIds
  ) {
    errors
    caveats
    exchangeOrders {
      ...ExchangeOrderFragment
    }
    exchangeItems {
      ...ExchangeItemFragment
    }
    return_ {
      ...ReturnFragment
    }
  }
}
Variables
{
  "exchangeItemIds": [4],
  "exchangeOrderIds": ["4"],
  "returnId": "4",
  "returnItemIds": ["4"]
}
Response
{
  "data": {
    "releaseExchangeItems": {
      "errors": ["abc123"],
      "caveats": ["xyz789"],
      "exchangeOrders": [ExchangeOrder],
      "exchangeItems": [ExchangeItem],
      "return_": Return
    }
  }
}

returnApprove

Response

Returns an ApproveReturn

Arguments
Name Description
customRmaNumber - String
externalShippingLabelUrl - String
noShippingRequired - Boolean Default = null
returnId - ID!

Example

Query
mutation returnApprove(
  $customRmaNumber: String,
  $externalShippingLabelUrl: String,
  $noShippingRequired: Boolean,
  $returnId: ID!
) {
  returnApprove(
    customRmaNumber: $customRmaNumber,
    externalShippingLabelUrl: $externalShippingLabelUrl,
    noShippingRequired: $noShippingRequired,
    returnId: $returnId
  ) {
    error
    errorText
    return {
      ...ReturnFragment
    }
  }
}
Variables
{
  "customRmaNumber": "abc123",
  "externalShippingLabelUrl": "abc123",
  "noShippingRequired": null,
  "returnId": 4
}
Response
{
  "data": {
    "returnApprove": {
      "error": "xyz789",
      "errorText": "abc123",
      "return": Return
    }
  }
}

returnCreateStoreCredit

Response

Returns a CreateReturnStoreCreditMutation

Arguments
Name Description
amount - Decimal! Exact store-credit amount issued to the customer; fees are not deducted automatically
bonusCredit - Decimal Bonus credit amount to issue separately via storeCreditAccountCredit
handlingFee - Decimal Total handling fee to record; does not reduce amount
notifyCustomer - Boolean
refundShipping - Boolean!
restockingFee - Decimal Total restocking fee to record; does not reduce amount
returnItemIds - [ID!]!

Example

Query
mutation returnCreateStoreCredit(
  $amount: Decimal!,
  $bonusCredit: Decimal,
  $handlingFee: Decimal,
  $notifyCustomer: Boolean,
  $refundShipping: Boolean!,
  $restockingFee: Decimal,
  $returnItemIds: [ID!]!
) {
  returnCreateStoreCredit(
    amount: $amount,
    bonusCredit: $bonusCredit,
    handlingFee: $handlingFee,
    notifyCustomer: $notifyCustomer,
    refundShipping: $refundShipping,
    restockingFee: $restockingFee,
    returnItemIds: $returnItemIds
  ) {
    error
    errorText
    caveatError
    caveatErrorContext
    return {
      ...ReturnFragment
    }
    storeCredit {
      ...StoreCreditTypeFragment
    }
  }
}
Variables
{
  "amount": Decimal,
  "bonusCredit": Decimal,
  "handlingFee": Decimal,
  "notifyCustomer": false,
  "refundShipping": true,
  "restockingFee": Decimal,
  "returnItemIds": [4]
}
Response
{
  "data": {
    "returnCreateStoreCredit": {
      "error": "abc123",
      "errorText": "abc123",
      "caveatError": "xyz789",
      "caveatErrorContext": JSONString,
      "return": Return,
      "storeCredit": StoreCreditType
    }
  }
}

returnDispose

Description

Dispose a return items in Shopify. This will create disposition for each return item in Shopify. Used for restocking items and for marking items as missing in Return. This action is irreversible, once a return item is disposed it cannot be undone.

Response

Returns a DisposeReturn

Arguments
Name Description
dispositionAction - DispositionAction
dispositionType - DispositionType
items - [DisposeReturnItemMediaInput!] Per-item media/note evidence persisted on the resulting Disposition.
returnId - ID!
returnItemIds - [ID!]!
shopifyLocationId - ID!

Example

Query
mutation returnDispose(
  $dispositionAction: DispositionAction,
  $dispositionType: DispositionType,
  $items: [DisposeReturnItemMediaInput!],
  $returnId: ID!,
  $returnItemIds: [ID!]!,
  $shopifyLocationId: ID!
) {
  returnDispose(
    dispositionAction: $dispositionAction,
    dispositionType: $dispositionType,
    items: $items,
    returnId: $returnId,
    returnItemIds: $returnItemIds,
    shopifyLocationId: $shopifyLocationId
  ) {
    error
    return {
      ...ReturnFragment
    }
  }
}
Variables
{
  "dispositionAction": "RESTOCK",
  "dispositionType": "MISSING",
  "items": [DisposeReturnItemMediaInput],
  "returnId": 4,
  "returnItemIds": ["4"],
  "shopifyLocationId": 4
}
Response
{
  "data": {
    "returnDispose": {
      "error": "xyz789",
      "return": Return
    }
  }
}

returnItemMissingUpdate

Description

Used to update the line items of return isMissing field to true or false

Response

Returns an UpdateMissingReturnItems

Arguments
Name Description
isMissing - Boolean! Missing or not, this applies to all the return items
returnId - ID!
returnItemIds - [ID]! List of return items that should be updated

Example

Query
mutation returnItemMissingUpdate(
  $isMissing: Boolean!,
  $returnId: ID!,
  $returnItemIds: [ID]!
) {
  returnItemMissingUpdate(
    isMissing: $isMissing,
    returnId: $returnId,
    returnItemIds: $returnItemIds
  ) {
    error
    return {
      ...ReturnFragment
    }
  }
}
Variables
{
  "isMissing": true,
  "returnId": "4",
  "returnItemIds": [4]
}
Response
{
  "data": {
    "returnItemMissingUpdate": {
      "error": "abc123",
      "return": Return
    }
  }
}

returnRefund

Response

Returns a RefundReturn

Arguments
Name Description
handlingFee - Decimal Total handling fee to record; does not reduce refundFullAmount
notifyCustomer - Boolean!
refundCurrency - String!
refundFullAmount - Decimal! Exact amount refunded to the customer; fees are not deducted automatically
refundShipping - Boolean!
restockingFee - Decimal Total restocking fee to record; does not reduce refundFullAmount
returnId - ID!
returnItemIds - [ID!]!

Example

Query
mutation returnRefund(
  $handlingFee: Decimal,
  $notifyCustomer: Boolean!,
  $refundCurrency: String!,
  $refundFullAmount: Decimal!,
  $refundShipping: Boolean!,
  $restockingFee: Decimal,
  $returnId: ID!,
  $returnItemIds: [ID!]!
) {
  returnRefund(
    handlingFee: $handlingFee,
    notifyCustomer: $notifyCustomer,
    refundCurrency: $refundCurrency,
    refundFullAmount: $refundFullAmount,
    refundShipping: $refundShipping,
    restockingFee: $restockingFee,
    returnId: $returnId,
    returnItemIds: $returnItemIds
  ) {
    error
    return {
      ...ReturnFragment
    }
    refund {
      ...RefundTypeFragment
    }
  }
}
Variables
{
  "handlingFee": Decimal,
  "notifyCustomer": false,
  "refundCurrency": "abc123",
  "refundFullAmount": Decimal,
  "refundShipping": true,
  "restockingFee": Decimal,
  "returnId": "4",
  "returnItemIds": [4]
}
Response
{
  "data": {
    "returnRefund": {
      "error": "xyz789",
      "return": Return,
      "refund": RefundType
    }
  }
}

returnReject

Response

Returns a RejectReturn

Arguments
Name Description
allowResubmission - Boolean Default = false
rejectionReason - String
returnId - ID!

Example

Query
mutation returnReject(
  $allowResubmission: Boolean,
  $rejectionReason: String,
  $returnId: ID!
) {
  returnReject(
    allowResubmission: $allowResubmission,
    rejectionReason: $rejectionReason,
    returnId: $returnId
  ) {
    error
    return {
      ...ReturnFragment
    }
  }
}
Variables
{
  "allowResubmission": false,
  "rejectionReason": "abc123",
  "returnId": 4
}
Response
{
  "data": {
    "returnReject": {
      "error": "abc123",
      "return": Return
    }
  }
}

returnUpdateStatus

Response

Returns a ReturnUpdateStatus

Arguments
Name Description
filters - FiltersInput
isArchived - Boolean!
returnIds - [ID]! Specific return IDs to update. If empty, filters are used to resolve returns.

Example

Query
mutation returnUpdateStatus(
  $filters: FiltersInput,
  $isArchived: Boolean!,
  $returnIds: [ID]!
) {
  returnUpdateStatus(
    filters: $filters,
    isArchived: $isArchived,
    returnIds: $returnIds
  ) {
    success
    affectedReturnIds
  }
}
Variables
{
  "filters": FiltersInput,
  "isArchived": false,
  "returnIds": [4]
}
Response
{"data": {"returnUpdateStatus": {"success": true, "affectedReturnIds": [123]}}}

setReturnNotes

Response

Returns a SetReturnNotes

Arguments
Name Description
notes - String
returnId - ID!

Example

Query
mutation setReturnNotes(
  $notes: String,
  $returnId: ID!
) {
  setReturnNotes(
    notes: $notes,
    returnId: $returnId
  ) {
    error
    return {
      ...ReturnFragment
    }
  }
}
Variables
{
  "notes": "xyz789",
  "returnId": "4"
}
Response
{
  "data": {
    "setReturnNotes": {
      "error": "xyz789",
      "return": Return
    }
  }
}

taxNumbersDelete

Response

Returns a DeleteTaxNumbers

Arguments
Name Description
ids - [ID]!

Example

Query
mutation taxNumbersDelete($ids: [ID]!) {
  taxNumbersDelete(ids: $ids) {
    errors {
      ...GQLErrorTypeFragment
    }
  }
}
Variables
{"ids": [4]}
Response
{"data": {"taxNumbersDelete": {"errors": [GQLErrorType]}}}

taxNumbersPut

Response

Returns a PutTaxNumbers

Arguments
Name Description
taxNumbers - [TaxNumberInput]!

Example

Query
mutation taxNumbersPut($taxNumbers: [TaxNumberInput]!) {
  taxNumbersPut(taxNumbers: $taxNumbers) {
    errors {
      ...GQLErrorTypeFragment
    }
    taxNumbers {
      ...TaxNumberOutputFragment
    }
  }
}
Variables
{"taxNumbers": [TaxNumberInput]}
Response
{
  "data": {
    "taxNumbersPut": {
      "errors": [GQLErrorType],
      "taxNumbers": [TaxNumberOutput]
    }
  }
}

updateReturn

Response

Returns an UpdateReturn

Arguments
Name Description
isArchived - Boolean!
returnId - Int!
stageId - ID!

Example

Query
mutation updateReturn(
  $isArchived: Boolean!,
  $returnId: Int!,
  $stageId: ID!
) {
  updateReturn(
    isArchived: $isArchived,
    returnId: $returnId,
    stageId: $stageId
  ) {
    success
    ret {
      ...ReturnFragment
    }
  }
}
Variables
{
  "isArchived": true,
  "returnId": 123,
  "stageId": "4"
}
Response
{
  "data": {
    "updateReturn": {"success": false, "ret": Return}
  }
}

Types

AddressType

Fields
Field Name Description
id - ID
userName - String
company - String
street1 - String
phone - String
street2 - String
country - String
city - String
zip - String
state - String
Example
{
  "id": "4",
  "userName": "abc123",
  "company": "xyz789",
  "street1": "abc123",
  "phone": "abc123",
  "street2": "abc123",
  "country": "abc123",
  "city": "xyz789",
  "zip": "abc123",
  "state": "xyz789"
}

AnswerResponseType

Fields
Field Name Description
text - String
selectedChoices - [SelectedChoiceType]
Example
{
  "text": "xyz789",
  "selectedChoices": [SelectedChoiceType]
}

AppliedRuleType

Fields
Field Name Description
isSystemRule - Boolean!
name - String!
description - String!
Example
{
  "isSystemRule": false,
  "name": "abc123",
  "description": "xyz789"
}

ApproveReturn

Fields
Field Name Description
error - String
errorText - String
return - Return
Example
{
  "error": "abc123",
  "errorText": "abc123",
  "return": Return
}

ArchiveFilter

Values
Enum Value Description

ACTIVE

ARCHIVED

BOTH

Example
"ACTIVE"

ArchiveReturns

Fields
Field Name Description
success - Boolean
Example
{"success": false}

AuthenticatedShop

Description

Note, this is different from the public portal's PublicShop (returnzap.portal.graphql.types.shop) since we will expose things to an authenticated shop admin that we won't expose to the public portal APIs.

Fields
Field Name Description
uuid - String!
url - String!
primaryDomain - String!
timezone - String! IANA timezone string (e.g. America/New_York)
name - String!
onboardingCompletedAt - DateTime
currency - String! The default currency code from Shopify (e.g. USD, CAD)
isExchangeIntegrationEnabled - Boolean! Has the customer enabled integration with Shopify Exchange?
isStoreCreditIntegrationEnabled - Boolean! Has the customer enabled integration with Shopify Store Credit?
id - ID!
useNewAnalyticsUi - Boolean Analytics UI is now enabled for all shops.
useAsyncReturnProcessing - Boolean! Return processing is always asynchronous; field kept for cached pre-cutover bundles.
installedAt - DateTime
returnReasons - [ReturnReason]
stages - [Stage]
easyPostAccount - EasyPostAccountType
webhookUrl - String
webhookEvents - [WebhookEventType]
easypostApiKey - String Use easyPostAccount.apiKey instead
onboardingComplete - Boolean Use onboarding_completed_at instead
installDate - DateTime Use installed_at instead
exchangeIntegration - Boolean Use is_exchange_integration_enabled or check for feature instead
storeCreditIntegration - Boolean Use is_store_credit_integration_enabled or check for feature instead
Example
{
  "uuid": "xyz789",
  "url": "xyz789",
  "primaryDomain": "xyz789",
  "timezone": "xyz789",
  "name": "xyz789",
  "onboardingCompletedAt": "2007-12-03T10:15:30Z",
  "currency": "abc123",
  "isExchangeIntegrationEnabled": true,
  "isStoreCreditIntegrationEnabled": true,
  "id": "4",
  "useNewAnalyticsUi": true,
  "useAsyncReturnProcessing": true,
  "installedAt": "2007-12-03T10:15:30Z",
  "returnReasons": [ReturnReason],
  "stages": [Stage],
  "easyPostAccount": EasyPostAccountType,
  "webhookUrl": "abc123",
  "webhookEvents": ["RETURN_CREATED"],
  "easypostApiKey": "abc123",
  "onboardingComplete": true,
  "installDate": "2007-12-03T10:15:30Z",
  "exchangeIntegration": true,
  "storeCreditIntegration": true
}

AutomatedStoreCreditType

Description

An enumeration.

Values
Enum Value Description

DISCOUNT_CODE

GIFT_CARD_API

SHOPIFY_ACCOUNT_CREDIT

Example
"DISCOUNT_CODE"

Boolean

Description

The Boolean scalar type represents true or false.

Example
true

CreateOrUpdateQuestion

Fields
Field Name Description
question - Question
Example
{"question": Question}

CreateReturnStoreCreditMutation

Fields
Field Name Description
error - String
errorText - String
caveatError - String Locale key for a step that failed after Shopify already accepted part of the credit
caveatErrorContext - JSONString Values for the caveat_error message
return - Return
storeCredit - StoreCreditType
Example
{
  "error": "abc123",
  "errorText": "abc123",
  "caveatError": "abc123",
  "caveatErrorContext": JSONString,
  "return": Return,
  "storeCredit": StoreCreditType
}

DashboardResponse

Fields
Field Name Description
id - ID
returns - [Return]!
totalCount - Int
Example
{
  "id": "4",
  "returns": [Return],
  "totalCount": 987
}

Date

Description

The Date scalar type represents a Date value as specified by iso8601.

Example
"2007-12-03"

DateFilterRange

Fields
Input Field Description
since - String If null, date filter is ignored
startDate - Date
endDate - Date
Example
{
  "since": "abc123",
  "startDate": "2007-12-03",
  "endDate": "2007-12-03"
}

DateTime

Description

The DateTime scalar type represents a DateTime value as specified by iso8601.

Example
"2007-12-03T10:15:30Z"

Decimal

Description

The Decimal scalar type represents a python Decimal.

Example
Decimal

DeleteQuestion

Fields
Field Name Description
success - Boolean
Example
{"success": false}

DeleteTaxNumbers

Fields
Field Name Description
errors - [GQLErrorType]
Example
{"errors": [GQLErrorType]}

DisposeReturn

Fields
Field Name Description
error - String
return - Return
Example
{
  "error": "abc123",
  "return": Return
}

DisposeReturnItemMediaInput

Fields
Input Field Description
returnItemId - ID!
media - [WarehouseMediaInput!]
note - WarehouseNoteInput
Example
{
  "returnItemId": 4,
  "media": [WarehouseMediaInput],
  "note": WarehouseNoteInput
}

DispositionAction

Description

An enumeration.

Values
Enum Value Description

RESTOCK

RECYCLE

DESTROY

DONATE

LIQUIDATE

REFURBISH

RESELL

Example
"RESTOCK"

DispositionType

Description

An enumeration.

Values
Enum Value Description

MISSING

PROCESSING_REQUIRED

NOT_RESTOCKED

RESTOCKED

Example
"MISSING"

EasyPostAccountType

Fields
Field Name Description
id - ID!
shop - AuthenticatedShop!
managedByReturnzap - Boolean!
apiKey - String!
useIsReturn - Boolean! Sends EasyPost's is_return flag and swaps the from/to addresses so EasyPost builds a return label. Turn OFF for cross-border lanes such as CA->US, where carriers reject the return flag.
originCountries - [String!]! 2-letter ISO 3166-1 alpha-2 country codes for origin countries. Empty means all countries.
destinationCountries - [String!]! 2-letter ISO 3166-1 alpha-2 country codes for destination countries. Empty means all countries.
services - String Use EasyPostAccountCarrierServiceType.is_active field instead.
carriers - [EasyPostCarrierType]
Example
{
  "id": 4,
  "shop": AuthenticatedShop,
  "managedByReturnzap": true,
  "apiKey": "xyz789",
  "useIsReturn": true,
  "originCountries": ["xyz789"],
  "destinationCountries": ["abc123"],
  "services": "xyz789",
  "carriers": [EasyPostCarrierType]
}

EasyPostCarrierType

Example
{}

ExchangeItem

Fields
Field Name Description
id - ID!
returnItem - ReturnItem Use returnItemId instead
variantId - String! The Shopify variant id for the item the customer wants to exchange
title - String! Exchange item title
sku - String! Exchange item sku
quantity - Int The quantity of the item to exchange
imageUrl - String! Exchange item image url
presentmentOriginalAmount - Decimal The variant unit amount without discounts applied in presentment currency
presentmentDiscountedAmount - Decimal Actual variant unit amount customer paid in presentment currency
returnItemPresentmentOriginalUnitAmount - Decimal The catalog price of the returned item at the time of purchasing in presentment currency
presentmentNormalizationAdjustmentAmount - Decimal Price normalization adjustment amount in presentment currency.
presentmentCurrency - String!
releasedAt - DateTime
removedAt - DateTime Date removed from consolidated order exchange
expiredAt - DateTime
returnItemId - String The id of the return item this is exchanging for
exchangeOrderId - String The id of the exchange order
returnItemIsMissing - Boolean Whether the return item is missing
returnItemIsRejected - Boolean Whether the return item is rejected
isResolved - Boolean Whether the exchange item has been resolved
status - ExchangeOrderStatus Status of the exchange order
draftOrderNumber - String The number of the draft order in Shopify
completedOrderId - String The id of the completed order in Shopify
completedOrderNumber - String The number of the completed order in Shopify
statusLabel - String Status label for the exchange order Use status instead
completeOrderLink - String URL Link to the completed order in Shopify
exchangeVariantId - String The Shopify variant id for the item the customer wants to receive as replacement. Use variantId instead
Example
{
  "id": "4",
  "returnItem": ReturnItem,
  "variantId": "xyz789",
  "title": "xyz789",
  "sku": "xyz789",
  "quantity": 123,
  "imageUrl": "abc123",
  "presentmentOriginalAmount": Decimal,
  "presentmentDiscountedAmount": Decimal,
  "returnItemPresentmentOriginalUnitAmount": Decimal,
  "presentmentNormalizationAdjustmentAmount": Decimal,
  "presentmentCurrency": "abc123",
  "releasedAt": "2007-12-03T10:15:30Z",
  "removedAt": "2007-12-03T10:15:30Z",
  "expiredAt": "2007-12-03T10:15:30Z",
  "returnItemId": "xyz789",
  "exchangeOrderId": "abc123",
  "returnItemIsMissing": true,
  "returnItemIsRejected": true,
  "isResolved": true,
  "status": "DRAFT",
  "draftOrderNumber": "xyz789",
  "completedOrderId": "abc123",
  "completedOrderNumber": "xyz789",
  "statusLabel": "xyz789",
  "completeOrderLink": "abc123",
  "exchangeVariantId": "xyz789"
}

ExchangeOrder

Fields
Field Name Description
id - ID!
created - DateTime
consolidatedOrderExchange - Boolean! If True, the exchange order is part of a consolidated return. It uses the Shopify return integration instead of Draft order workflow
status - ExchangeOrderStatus Status of the exchange order
theReturn - Return
draftOrderId - String! The Shopify draft order id. Created when the customer requests an exchange
draftOrderNumber - String! The Shopify draft order number e.g #D66
shopifyExchangeShipmentOrderId - String! When we facilitate fulfillment with another order, this is the Shopify order id of that order
shopifyExchangeShipmentOrderName - String! ...and this is the Shopify order name of that order
completedOrderId - String! The Shopify completed order id. This is only set when the order is completed by the shop
completedOrderNumber - String! The Shopify completed order number e.g #1218
completedOrderAt - DateTime
invoiceSentAt - DateTime
exchangeItems - [ExchangeItem!]
statusLabel - String Status label for the exchange order
completeOrderLink - String URL Link to the completed order in Shopify
draftOrderLink - String URL Link to the draft order in Shopify
consolidatedOrderLink - String URL Link to the original order in Shopify
Example
{
  "id": "4",
  "created": "2007-12-03T10:15:30Z",
  "consolidatedOrderExchange": true,
  "status": "DRAFT",
  "theReturn": Return,
  "draftOrderId": "xyz789",
  "draftOrderNumber": "abc123",
  "shopifyExchangeShipmentOrderId": "xyz789",
  "shopifyExchangeShipmentOrderName": "abc123",
  "completedOrderId": "abc123",
  "completedOrderNumber": "abc123",
  "completedOrderAt": "2007-12-03T10:15:30Z",
  "invoiceSentAt": "2007-12-03T10:15:30Z",
  "exchangeItems": [ExchangeItem],
  "statusLabel": "xyz789",
  "completeOrderLink": "xyz789",
  "draftOrderLink": "xyz789",
  "consolidatedOrderLink": "abc123"
}

ExchangeOrderStatus

Description

An enumeration.

Values
Enum Value Description

DRAFT

COMPLETED

DELETED

Example
"DRAFT"

FiltersInput

Fields
Input Field Description
query - String
stages - [Int]
status - ArchiveFilter
returnDate - DateFilterRange
orderDate - DateFilterRange
stageUpdatedDate - DateFilterRange
perPage - Int
currentPage - Int
sortBy - String
resolvedStatus - [ResolvedStatus]
returnItemTypes - [String]
warehouseIds - [Int]
requestType - [String]
Example
{
  "query": "xyz789",
  "stages": [123],
  "status": "ACTIVE",
  "returnDate": DateFilterRange,
  "orderDate": DateFilterRange,
  "stageUpdatedDate": DateFilterRange,
  "perPage": 123,
  "currentPage": 123,
  "sortBy": "xyz789",
  "resolvedStatus": ["RESOLVED"],
  "returnItemTypes": ["abc123"],
  "warehouseIds": [123],
  "requestType": ["xyz789"]
}

GQLErrorEnum

Description

Enum for all GQL errors Important: Prefix all errors with name of the integration (e.g. RZ_, SHOPIFY_, EASYPOST_, etc)

Values
Enum Value Description

RZ_RULES_ERROR

RZ_RETURN_ITEMS_MISSING

RZ_DUPLICATE_RMA_NUMBER

RZ_PRICE_CHECK_FAILED

RZ_PAYMENT_FAILED

RZ_ZAP_ORDER_NOT_FOUND

RZ_RANDOMNESS_ERROR

RZ_SHOP_NOT_FOUND

RZ_CONSOLIDATED_RETURN_ORDER_NOT_FOUND

RZ_RETURN_INTEGRATION_ERROR

RZ_RETURN_INTEGRATION_UNSUPPORTED_ERROR

RZ_VALIDATION_ERROR

RZ_CALCULATE_RETURN_ERROR

RZ_BUY_LABEL_ERROR

RZ_COUNTRY_NOT_FOUND

RZ_LABEL_REIMBURSEMENT_ERROR

RZ_NO_RATES_FOUND

RZ_PRODUCT_NOT_FOUND

RZ_NO_VARIANTS_IN_PRICE_RANGE

RZ_EXCHANGE_VARIANT_NOT_FOUND

RZ_RETURN_NOT_FOUND

RZ_RETURN_NOT_PROCESSING

RZ_RETURN_INVALID_STATE

RZ_RETURN_PAYMENT_CLEANUP_FAILED

RZ_RETURN_INVALID_SHIPPING_METHOD

SHOPIFY_ITEM_ALREADY_RETURNED

SENDCLOUD_LABEL_ERROR

EASYPOST_INSUFFICIENT_FUND

EASYPOST_BUY_LABEL_ERROR

SHIPPO_LABEL_ERROR

SHIPPO_TRANSACTION_STATUS_ERROR

SHIPSTATION_CREATE_SHIPMENT_LABEL_ERROR

SEKO_BUY_LABEL_ERROR

RZ_TOO_MANY_REQUESTS

UNKNOWN_ERROR

Example
"RZ_RULES_ERROR"

GQLErrorType

Fields
Field Name Description
errorCode - GQLErrorEnum The code for the error
message - String Human readable textual error representation (do not use for machine logic)
traceId - String Trace ID for the error, you can share this with the ReturnZap customer support
debugTrace - String Debug information for the error We don't send backend debug info to frontend.
Example
{
  "errorCode": "RZ_RULES_ERROR",
  "message": "abc123",
  "traceId": "abc123",
  "debugTrace": "xyz789"
}

GeneratePortalImageUploadURL

Fields
Field Name Description
errors - [GQLErrorType]
uploadUrl - SignedUrl
imagePath - String
Example
{
  "errors": [GQLErrorType],
  "uploadUrl": SignedUrl,
  "imagePath": "abc123"
}

GenerateShippingLabelUploadURL

Fields
Field Name Description
error - String
url - SignedUrl
Example
{
  "error": "xyz789",
  "url": SignedUrl
}

ID

Description

The ID scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as "4") or integer (such as 4) input value will be accepted as an ID.

Example
"4"

ImageUploadsSetting

Description

An enumeration.

Values
Enum Value Description

DISABLE_IMAGE_UPLOAD

OPTIONAL_IMAGE_UPLOAD

REQUIRE_IMAGE_UPLOAD

Example
"DISABLE_IMAGE_UPLOAD"

Int

Description

The Int scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.

Example
987

ItemCondition

Description

An enumeration.

Values
Enum Value Description

GRADE_A

GRADE_B

GRADE_C

Example
"GRADE_A"

JSONString

Description

Allows use of a JSON String for input / output from the GraphQL schema.

Use of this type is not recommended as you lose the benefits of having a defined, static schema (one of the key benefits of GraphQL).

Example
JSONString

Money

Fields
Field Name Description
amount - Decimal!
currencyCode - String!
Example
{
  "amount": Decimal,
  "currencyCode": "xyz789"
}

MoneySet

Fields
Field Name Description
presentmentMoney - Money!
shopMoney - Money!
Example
{
  "presentmentMoney": Money,
  "shopMoney": Money
}

ProcessingStatusAction

Description

An enumeration.

Values
Enum Value Description

DISCARD

CONVERT_SHIPPING

RETRY

WAIVE_BALANCE

RESEND_BALANCE_INVOICE

POST_ACTIVATION_ACTIONS

Example
"DISCARD"

PutTaxNumbers

Fields
Field Name Description
errors - [GQLErrorType]
taxNumbers - [TaxNumberOutput]
Example
{
  "errors": [GQLErrorType],
  "taxNumbers": [TaxNumberOutput]
}

Question

Fields
Field Name Description
id - UUID!
questionType - QuestionType
order - Int!
text - String!
isRequired - Boolean!
flow - QuestionFlow
dependentOnReturnReason - Boolean! Only show after a return reason is selected
dependentOnQuestion - Question
choices - [QuestionChoice]
dependentOnReturnReasons - [ReturnReason]
dependentOnQuestionChoices - [QuestionChoice]
isActive - Boolean
Example
{
  "id": "cc14463d-6a06-4740-a3d8-380aacfa0644",
  "questionType": "LONG_TEXT",
  "order": 987,
  "text": "abc123",
  "isRequired": true,
  "flow": "STANDARD",
  "dependentOnReturnReason": true,
  "dependentOnQuestion": Question,
  "choices": [QuestionChoice],
  "dependentOnReturnReasons": [ReturnReason],
  "dependentOnQuestionChoices": [QuestionChoice],
  "isActive": false
}

QuestionChoice

Fields
Field Name Description
id - UUID!
question - Question!
order - Int!
text - String!
Example
{
  "id": "cc14463d-6a06-4740-a3d8-380aacfa0644",
  "question": Question,
  "order": 987,
  "text": "abc123"
}

QuestionChoiceInput

Fields
Input Field Description
id - ID
order - Int!
text - String!
Example
{"id": 4, "order": 987, "text": "xyz789"}

QuestionFlow

Values
Enum Value Description

STANDARD

WITHDRAWAL

Example
"STANDARD"

QuestionInput

Fields
Input Field Description
id - ID
order - Int!
questionType - QuestionType!
text - String!
isRequired - Boolean!
flow - QuestionFlow
isActive - Boolean!
deleted - Boolean
choices - [QuestionChoiceInput]
dependentOnReturnReasons - [ID]
dependentOnQuestion - ID
dependentOnQuestionChoices - [ID]
Example
{
  "id": "4",
  "order": 987,
  "questionType": "LONG_TEXT",
  "text": "xyz789",
  "isRequired": false,
  "flow": "STANDARD",
  "isActive": false,
  "deleted": true,
  "choices": [QuestionChoiceInput],
  "dependentOnReturnReasons": ["4"],
  "dependentOnQuestion": 4,
  "dependentOnQuestionChoices": [4]
}

QuestionType

Values
Enum Value Description

LONG_TEXT

CHOICE

FILE_UPLOAD

SHORT_TEXT

NUMBER

DATE

BOOLEAN

DISPLAY_CUSTOM_MESSAGE

Example
"LONG_TEXT"

ReceivedReturn

Fields
Field Name Description
error - String
return - Return
Example
{
  "error": "xyz789",
  "return": Return
}

ReceivedReturnItemInput

Fields
Input Field Description
returnItemId - ID!
receivingStatus - ReceivingStatus!
condition - ItemCondition
rejectionReason - RejectionReason
media - [WarehouseMediaInput!]
note - WarehouseNoteInput
Example
{
  "returnItemId": 4,
  "receivingStatus": "RECEIVED",
  "condition": "GRADE_A",
  "rejectionReason": "WAREHOUSE_REJECTED",
  "media": [WarehouseMediaInput],
  "note": WarehouseNoteInput
}

ReceivingStatus

Description

An enumeration.

Values
Enum Value Description

RECEIVED

MISSING

REJECTED

Example
"RECEIVED"

RefundReturn

Fields
Field Name Description
error - String
return - Return
refund - RefundType
Example
{
  "error": "abc123",
  "return": Return,
  "refund": RefundType
}

RefundType

Fields
Field Name Description
shopifyRefundId - String! Shopify's id for the refund.
requestedTotalRefundAmount - Decimal Presentment amount ReturnZap asked Shopify to refund — the refundFullAmount passed to returnRefund. Known as soon as the refund is created.
requestedCurrencyCode - String! Presentment currency of requestedTotalRefundAmount.
presentmentTotalAmountRefunded - Decimal Net cash Shopify refunded, in presentment currency. Populated asynchronously from Shopify and can read 0.00 on a completed refund until the transactions settle; a nightly backfill heals it. Use requestedTotalRefundAmount for the amount just requested.
presentmentCurrencyCode - String! Currency the customer paid in, as reported by Shopify.
presentmentSubtotalRefundAmount - Decimal Line-item subtotal refunded, excluding tax and shipping, in presentment currency.
presentmentTaxRefundAmount - Decimal Line-item tax refunded, in presentment currency.
presentmentShippingSubtotalRefundAmount - Decimal Shipping refunded, excluding tax, in presentment currency.
presentmentShippingTaxRefundAmount - Decimal Shipping tax refunded, in presentment currency.
shopTotalAmountRefunded - Decimal Net cash Shopify refunded, converted to the shop's own currency. Same asynchronous population as presentmentTotalAmountRefunded. Use this only to aggregate across orders.
shopRefundCurrencyCode - String! The shop's own currency.
shopSubtotalRefundAmount - Decimal Line-item subtotal refunded, excluding tax and shipping, in shop currency.
shopTaxRefundAmount - Decimal Line-item tax refunded, in shop currency.
shopShippingSubtotalRefundAmount - Decimal Shipping refunded, excluding tax, in shop currency.
shopShippingTaxRefundAmount - Decimal Shipping tax refunded, in shop currency.
currencyCode - String Use presentmentCurrencyCode instead
totalAmountRefunded - Decimal Use presentmentTotalAmountRefunded instead
Example
{
  "shopifyRefundId": "abc123",
  "requestedTotalRefundAmount": Decimal,
  "requestedCurrencyCode": "abc123",
  "presentmentTotalAmountRefunded": Decimal,
  "presentmentCurrencyCode": "abc123",
  "presentmentSubtotalRefundAmount": Decimal,
  "presentmentTaxRefundAmount": Decimal,
  "presentmentShippingSubtotalRefundAmount": Decimal,
  "presentmentShippingTaxRefundAmount": Decimal,
  "shopTotalAmountRefunded": Decimal,
  "shopRefundCurrencyCode": "abc123",
  "shopSubtotalRefundAmount": Decimal,
  "shopTaxRefundAmount": Decimal,
  "shopShippingSubtotalRefundAmount": Decimal,
  "shopShippingTaxRefundAmount": Decimal,
  "currencyCode": "abc123",
  "totalAmountRefunded": Decimal
}

RejectReturn

Fields
Field Name Description
error - String
return - Return
Example
{
  "error": "abc123",
  "return": Return
}

RejectionReason

Description

An enumeration.

Values
Enum Value Description

WAREHOUSE_REJECTED

NOT_IN_ORIGINAL_CONDITION

ITEM_DAMAGED_OR_WORN

MISSING_COMPONENTS

WRONG_ITEM_RETURNED

RETURN_WINDOW_EXPIRED

SIGNS_OF_USE

OTHER

Example
"WAREHOUSE_REJECTED"

ReleaseExchangeItemsMutation

Fields
Field Name Description
errors - [String]
caveats - [String]
exchangeOrders - [ExchangeOrder] Use exchange_items instead
exchangeItems - [ExchangeItem]
return_ - Return
Example
{
  "errors": ["abc123"],
  "caveats": ["xyz789"],
  "exchangeOrders": [ExchangeOrder],
  "exchangeItems": [ExchangeItem],
  "return_": Return
}

ResolutionStatus

Description

An enumeration.

Values
Enum Value Description

AUTO

EXCHANGED

EXPIRED

MANUALLY

MISSING

REFUNDED

REJECTED

STORE_CREDIT

Example
"AUTO"

ResolvedStatus

Description

An enumeration.

Values
Enum Value Description

RESOLVED

UNRESOLVED

PARTIALLY_RESOLVED

Example
"RESOLVED"

Return

Fields
Field Name Description
id - ID!
uuid - String!
customerFirstName - String!
customerLastName - String!
customerEmail - String!
rmaNumber - String!
stageLabel - String!
stageUpdatedDate - DateTime
approvalRequired - Boolean
approvedAt - DateTime
rejectedAt - DateTime
rejectionReason - String
notes - String
allowResubmission - Boolean When True, this return's items are excluded from returnable quantity enforcement in the portal.
receivedAt - DateTime
financialTerminalAt - DateTime
isArchived - Boolean
expiredAt - DateTime
shippingMethod - ShippingMethod
giftReturn - Boolean
giftReturnEmailAddress - String
trackingNumber - String!
deliveryDate - DateTime
deliveryStatus - String!
labelCurrency - String!
shopCurrency - String!
noShippingRequired - Boolean!
feesSentThroughReturnIntegration - Boolean! In issue #1545 we started sending shipping and restocking fees to Shopify when creating a return.
originalHandlingFeeCharged - Decimal The handling fee charged to the customer when the return was created
actualHandlingFeeCharged - Decimal The handling fee actually charged to the customer through ReturnZap resolutions
originalRestockingFeeCharged - Decimal The restocking fee charged to the customer when the return was created
actualRestockingFeeCharged - Decimal The restocking fee actually charged to the customer through ReturnZap resolutions
shopifyReturnId - String
shopifyReturnName - String!
shopifyOrderId - String!
shopifyOrderDate - DateTime
exchangeBalanceDue - Decimal The balance due for the exchange
exchangeBalancePaidAt - DateTime
shopifyOrderNumber - String!
customerAddress - ReturnAddressType
destinationAddress - ReturnAddressType
giftReturnAddress - ReturnAddressType
rmaFormUrl - String
stageId - ID
systemStage - Int
statusId - String
statusLabel - String
labelUrl - String
qrCodeUrl - String
qrCodeDownloadUrl - String
returnStatusPageUrl - String
totalWeightGrams - Decimal
createdAt - DateTime
refunds - [RefundType]
next - String Use nextReturn instead
previous - String Use previousReturn instead
nextReturn - Return
previousReturn - Return
exchangeOrders - [ExchangeOrder!]
shipment - Shipment
appliedRules - [String] Use appliedRulesDetailed instead for structured rule data
appliedRulesDetailed - [AppliedRuleType]
suggestionRefund - SuggestionRefundType Use suggestedRefund instead
Arguments
returnItemIds - [ID]!
refundShipping - Boolean
suggestedRefund - SuggestedRefundType
Arguments
returnItemIds - [ID]!
refundShipping - Boolean
warehouseName - String
shippedTo - String Use warehouseName
warehouse - WarehouseType
storeCredits - [StoreCreditType]
externalShippingLabelUrl - String
items - [ReturnItem]
exchangeItems - [ExchangeItem]
handlingFeeCharged - Decimal Use (actual|original)_handling_fee_charged instead
restockingFeeCharged - Decimal Use (actual|original)_restocking_fee_charged instead
shopifyOrderFulfillments - [ShopifyFulfillmentType]
shopifyOrderTotalPrice - Decimal
availableActions - [ProcessingStatusAction!]!
shipmentCarrierName - String
shipmentServiceName - String
requestType - String
resolvedAt - DateTime
originCountryCode - String
orderId - String! Use shopifyOrderId instead
orderNumber - String! Use shopifyOrderNumber instead
orderDate - DateTime Use shopifyOrderDate instead
returnDate - DateTime Use createdAt instead
isActive - Boolean Use isArchived instead
unitQuantity - Int
returnValueAmount - Decimal Sum of items (item quantity * item discounted amount)
resolvedStatus - ResolvedStatus Status indicating the resolution state of the return items
returnItemTypes - [String] List of return item types e.g. ["REFUND", "CREDIT", "EXCHANGE"]
returnTypeLabels - [String] List of return item type labels e.g. ["Refund", "Store Credit", "Exchange"]
Example
{
  "id": "4",
  "uuid": "xyz789",
  "customerFirstName": "abc123",
  "customerLastName": "xyz789",
  "customerEmail": "abc123",
  "rmaNumber": "xyz789",
  "stageLabel": "xyz789",
  "stageUpdatedDate": "2007-12-03T10:15:30Z",
  "approvalRequired": true,
  "approvedAt": "2007-12-03T10:15:30Z",
  "rejectedAt": "2007-12-03T10:15:30Z",
  "rejectionReason": "abc123",
  "notes": "abc123",
  "allowResubmission": false,
  "receivedAt": "2007-12-03T10:15:30Z",
  "financialTerminalAt": "2007-12-03T10:15:30Z",
  "isArchived": true,
  "expiredAt": "2007-12-03T10:15:30Z",
  "shippingMethod": "FREE",
  "giftReturn": true,
  "giftReturnEmailAddress": "xyz789",
  "trackingNumber": "abc123",
  "deliveryDate": "2007-12-03T10:15:30Z",
  "deliveryStatus": "xyz789",
  "labelCurrency": "xyz789",
  "shopCurrency": "abc123",
  "noShippingRequired": true,
  "feesSentThroughReturnIntegration": true,
  "originalHandlingFeeCharged": Decimal,
  "actualHandlingFeeCharged": Decimal,
  "originalRestockingFeeCharged": Decimal,
  "actualRestockingFeeCharged": Decimal,
  "shopifyReturnId": "abc123",
  "shopifyReturnName": "abc123",
  "shopifyOrderId": "xyz789",
  "shopifyOrderDate": "2007-12-03T10:15:30Z",
  "exchangeBalanceDue": Decimal,
  "exchangeBalancePaidAt": "2007-12-03T10:15:30Z",
  "shopifyOrderNumber": "abc123",
  "customerAddress": ReturnAddressType,
  "destinationAddress": ReturnAddressType,
  "giftReturnAddress": ReturnAddressType,
  "rmaFormUrl": "xyz789",
  "stageId": "4",
  "systemStage": 987,
  "statusId": "abc123",
  "statusLabel": "abc123",
  "labelUrl": "xyz789",
  "qrCodeUrl": "xyz789",
  "qrCodeDownloadUrl": "xyz789",
  "returnStatusPageUrl": "abc123",
  "totalWeightGrams": Decimal,
  "createdAt": "2007-12-03T10:15:30Z",
  "refunds": [RefundType],
  "next": "xyz789",
  "previous": "xyz789",
  "nextReturn": Return,
  "previousReturn": Return,
  "exchangeOrders": [ExchangeOrder],
  "shipment": Shipment,
  "appliedRules": ["xyz789"],
  "appliedRulesDetailed": [AppliedRuleType],
  "suggestionRefund": SuggestionRefundType,
  "suggestedRefund": SuggestedRefundType,
  "warehouseName": "abc123",
  "shippedTo": "abc123",
  "warehouse": WarehouseType,
  "storeCredits": [StoreCreditType],
  "externalShippingLabelUrl": "abc123",
  "items": [ReturnItem],
  "exchangeItems": [ExchangeItem],
  "handlingFeeCharged": Decimal,
  "restockingFeeCharged": Decimal,
  "shopifyOrderFulfillments": [ShopifyFulfillmentType],
  "shopifyOrderTotalPrice": Decimal,
  "availableActions": ["DISCARD"],
  "shipmentCarrierName": "xyz789",
  "shipmentServiceName": "abc123",
  "requestType": "xyz789",
  "resolvedAt": "2007-12-03T10:15:30Z",
  "originCountryCode": "abc123",
  "orderId": "xyz789",
  "orderNumber": "xyz789",
  "orderDate": "2007-12-03T10:15:30Z",
  "returnDate": "2007-12-03T10:15:30Z",
  "isActive": true,
  "unitQuantity": 123,
  "returnValueAmount": Decimal,
  "resolvedStatus": "RESOLVED",
  "returnItemTypes": ["abc123"],
  "returnTypeLabels": ["abc123"]
}

ReturnAddressType

Fields
Field Name Description
name - String!
company - String!
street1 - String!
street2 - String!
city - String!
state - String!
zip - String!
phone - String!
email - String!
country - String
warehouseId - ID
Example
{
  "name": "xyz789",
  "company": "xyz789",
  "street1": "abc123",
  "street2": "xyz789",
  "city": "abc123",
  "state": "xyz789",
  "zip": "xyz789",
  "phone": "abc123",
  "email": "xyz789",
  "country": "abc123",
  "warehouseId": 4
}

ReturnItem

Fields
Field Name Description
id - ID!
shopifyLineItemId - String!
shopifyVariantId - String!
sku - String!
barcode - String
productTitle - String!
variantTitle - String!
variantDisplayName - String!
quantity - Int!
value - Decimal Full unit price in shop currency
presentmentOriginalAmount - Decimal The variant unit amount without discounts applied in presentment currency
discountedAmount - Decimal Actual amount customer paid in shop currency
presentmentDiscountedAmount - Decimal Actual amount customer paid per unit in presentment currency
presentmentCurrency - String!
vendor - String! The name of the vendor who made the variant from Shopify.
isPartOfBundle - Boolean Whether this line item belongs to a Shopify bundle (lineItemGroup)
bundleTitle - String Title of the bundle this item belongs to, from Shopify lineItemGroup
bundleGroupId - String Stable Shopify lineItemGroup ID for the bundle
returnReason - String!
comment - String!
exchangeOrder - ExchangeOrder The exchange order created for this return item
isMissing - Boolean! Is missing from return package
receivingStatus - ReturnsReturnItemReceivingStatusChoices Set during receiving: received, missing, or rejected. Supersedes is_missing.
condition - ReturnsReturnItemConditionChoices Item condition assessed at receiving time (Grade A/B/C)
rejectionReason - ReturnsReturnItemRejectionReasonChoices Required when receiving_status is rejected
restockingFee - Decimal The current shop restocking fee applied to the item
handlingFee - Decimal The current shop handling fee applied to the item
storeCreditIncentiveAmount - Decimal The current shop store credit's incentive amount applied to the item
fulfillmentLocationId - String!
fulfillmentLocationName - String!
expiredAt - DateTime
actuallyResolvedAt - DateTime Date the admin has resolved this item.
returnEligibilityExpiresAt - DateTime
variant - String Use variantTitle instead
title - String Use variantDisplayName instead
titleClean - String Use productTitle instead
returnType - ReturnType
returnTypeLabel - String
returnReasonId - Int
returnReasonLabel - String
images - [String]
files - [ReturnItemFileType]
answers - [ReturnItemAnswerType]
isRefunded - Boolean
currency - String Shop currency code e.g. USD
dispositionType - String Shopify disposition type e.g. RESTOCKED, NOT_RESTOCKED, MISSING, PROCESSING_REQUIRED
imageUrl - String
exchangeItem - ExchangeItem
resolvedAt - DateTime
resolutionStatus - ResolutionStatus
productHsCode - String
productCountryOfOrigin - String
totalWeightGrams - Decimal
discountAllocations - [ReturnItemDiscountAllocationType]
preTaxPriceSet - MoneySet
postTaxPriceSet - MoneySet
taxRate - Decimal
restockLocationId - String
Example
{
  "id": 4,
  "shopifyLineItemId": "xyz789",
  "shopifyVariantId": "abc123",
  "sku": "xyz789",
  "barcode": "xyz789",
  "productTitle": "abc123",
  "variantTitle": "abc123",
  "variantDisplayName": "abc123",
  "quantity": 987,
  "value": Decimal,
  "presentmentOriginalAmount": Decimal,
  "discountedAmount": Decimal,
  "presentmentDiscountedAmount": Decimal,
  "presentmentCurrency": "xyz789",
  "vendor": "xyz789",
  "isPartOfBundle": false,
  "bundleTitle": "xyz789",
  "bundleGroupId": "abc123",
  "returnReason": "xyz789",
  "comment": "xyz789",
  "exchangeOrder": ExchangeOrder,
  "isMissing": false,
  "receivingStatus": "RECEIVED",
  "condition": "GRADE_A",
  "rejectionReason": "WAREHOUSE_REJECTED",
  "restockingFee": Decimal,
  "handlingFee": Decimal,
  "storeCreditIncentiveAmount": Decimal,
  "fulfillmentLocationId": "abc123",
  "fulfillmentLocationName": "xyz789",
  "expiredAt": "2007-12-03T10:15:30Z",
  "actuallyResolvedAt": "2007-12-03T10:15:30Z",
  "returnEligibilityExpiresAt": "2007-12-03T10:15:30Z",
  "variant": "abc123",
  "title": "abc123",
  "titleClean": "xyz789",
  "returnType": "REFUND",
  "returnTypeLabel": "xyz789",
  "returnReasonId": 987,
  "returnReasonLabel": "xyz789",
  "images": ["xyz789"],
  "files": [ReturnItemFileType],
  "answers": [ReturnItemAnswerType],
  "isRefunded": false,
  "currency": "xyz789",
  "dispositionType": "xyz789",
  "imageUrl": "abc123",
  "exchangeItem": ExchangeItem,
  "resolvedAt": "2007-12-03T10:15:30Z",
  "resolutionStatus": "AUTO",
  "productHsCode": "abc123",
  "productCountryOfOrigin": "abc123",
  "totalWeightGrams": Decimal,
  "discountAllocations": [
    ReturnItemDiscountAllocationType
  ],
  "preTaxPriceSet": MoneySet,
  "postTaxPriceSet": MoneySet,
  "taxRate": Decimal,
  "restockLocationId": "xyz789"
}

ReturnItemAnswerChoiceType

Fields
Field Name Description
id - UUID!
order - Int!
questionChoiceText - String!
Example
{
  "id": "cc14463d-6a06-4740-a3d8-380aacfa0644",
  "order": 123,
  "questionChoiceText": "xyz789"
}

ReturnItemAnswerType

Fields
Field Name Description
id - UUID!
questionType - QuestionType
order - Int!
questionText - String!
answer - String!
questionId - String
isRequired - Boolean
response - AnswerResponseType
answerChoices - [ReturnItemAnswerChoiceType]
Example
{
  "id": "cc14463d-6a06-4740-a3d8-380aacfa0644",
  "questionType": "LONG_TEXT",
  "order": 123,
  "questionText": "abc123",
  "answer": "abc123",
  "questionId": "abc123",
  "isRequired": true,
  "response": AnswerResponseType,
  "answerChoices": [ReturnItemAnswerChoiceType]
}

ReturnItemDiscountAllocationType

Fields
Field Name Description
id - ID!
title - String Discount application title (e.g. 'BOGO 50% Off')
code - String Discount code if applicable, null for automatic discounts
allocationMethod - ReturnsReturnItemDiscountAllocationAllocationMethodChoices How the discount is allocated: ACROSS, EACH, or ONE
amount - Decimal Raw line-item-level allocated amount in shop currency
presentmentAmount - Decimal Raw line-item-level allocated amount in presentment currency
lineItemQuantity - Int Line item quantity at time of allocation, for computing per-unit amounts
Example
{
  "id": 4,
  "title": "abc123",
  "code": "abc123",
  "allocationMethod": "ACROSS",
  "amount": Decimal,
  "presentmentAmount": Decimal,
  "lineItemQuantity": 987
}

ReturnItemFileType

Fields
Field Name Description
id - ID!
contentType - String!
url - String
Example
{
  "id": "4",
  "contentType": "abc123",
  "url": "abc123"
}

ReturnReason

Fields
Field Name Description
id - Int!
uuid - ID
reason - String!
imageUploads - ImageUploadsSetting
order - Int
Example
{
  "id": 987,
  "uuid": 4,
  "reason": "abc123",
  "imageUploads": "DISABLE_IMAGE_UPLOAD",
  "order": 987
}

ReturnType

Description

An enumeration.

Values
Enum Value Description

REFUND

CREDIT

EXCHANGE

Example
"REFUND"

ReturnUpdateStatus

Fields
Field Name Description
success - Boolean
affectedReturnIds - [Int]!
Example
{"success": true, "affectedReturnIds": [987]}

ReturnsReturnItemConditionChoices

Description

An enumeration.

Values
Enum Value Description

GRADE_A

Excellent

GRADE_B

Acceptable

GRADE_C

Damaged or Poor
Example
"GRADE_A"

ReturnsReturnItemDiscountAllocationAllocationMethodChoices

Description

An enumeration.

Values
Enum Value Description

ACROSS

Across

EACH

Each

ONE

One
Example
"ACROSS"

ReturnsReturnItemReceivingStatusChoices

Description

An enumeration.

Values
Enum Value Description

RECEIVED

Received

MISSING

Missing

REJECTED

Rejected
Example
"RECEIVED"

ReturnsReturnItemRejectionReasonChoices

Description

An enumeration.

Values
Enum Value Description

WAREHOUSE_REJECTED

Warehouse rejected

NOT_IN_ORIGINAL_CONDITION

Not in original condition

ITEM_DAMAGED_OR_WORN

Item damaged or worn

MISSING_COMPONENTS

Missing components or accessories

WRONG_ITEM_RETURNED

Wrong item returned

RETURN_WINDOW_EXPIRED

Return window expired

SIGNS_OF_USE

Signs of use beyond inspection

OTHER

Other
Example
"WAREHOUSE_REJECTED"

SelectedChoiceType

Fields
Field Name Description
id - String
text - String
Example
{
  "id": "xyz789",
  "text": "abc123"
}

SetReturnNotes

Fields
Field Name Description
error - String
return - Return
Example
{
  "error": "abc123",
  "return": Return
}

Shipment

Fields
Field Name Description
trackingCode - String
trackingUrl - String
status - String
refunded - Boolean
canBeVoided - Boolean
commercialInvoiceUrl - String
Example
{
  "trackingCode": "abc123",
  "trackingUrl": "xyz789",
  "status": "xyz789",
  "refunded": false,
  "canBeVoided": false,
  "commercialInvoiceUrl": "xyz789"
}

ShipmentStatus

Description

An enumeration.

Values
Enum Value Description

UNKNOWN

PRE_TRANSIT

IN_TRANSIT

OUT_FOR_DELIVERY

DELIVERED

AVAILABLE_FOR_PICKUP

FAILURE

CANCELLED

ERROR

Example
"UNKNOWN"

ShippingMethod

Description

An enumeration.

Values
Enum Value Description

FREE

PAY

SELF

STORE

Example
"FREE"

ShopPaymentMethod

Fields
Field Name Description
id - UUID!
createdAt - DateTime!
brand - String! Card brand (visa, mastercard) or bank name
lastFour - String! Last 4 digits of card or account number
expMonth - Int Expiration month for cards (1-12)
expYear - Int Expiration year for cards
bankName - String! Bank name for ACH payments
isActive - Boolean! Whether this payment method is active and can be used
isDefault - Boolean! Whether this is the default payment method for auto-recharge
isExpired - Boolean
Example
{
  "id": "cc14463d-6a06-4740-a3d8-380aacfa0644",
  "createdAt": "2007-12-03T10:15:30Z",
  "brand": "abc123",
  "lastFour": "xyz789",
  "expMonth": 123,
  "expYear": 987,
  "bankName": "xyz789",
  "isActive": false,
  "isDefault": true,
  "isExpired": false
}

ShopifyFulfillmentType

Fields
Field Name Description
id - String
name - String
status - String
deliveredAt - DateTime
totalQuantity - Int
trackingInfo - [ShopifyTrackingInfoType]
Example
{
  "id": "abc123",
  "name": "abc123",
  "status": "xyz789",
  "deliveredAt": "2007-12-03T10:15:30Z",
  "totalQuantity": 123,
  "trackingInfo": [ShopifyTrackingInfoType]
}

ShopifyTrackingInfoType

Fields
Field Name Description
company - String
number - String
Example
{
  "company": "abc123",
  "number": "xyz789"
}

ShopifyUser

Fields
Field Name Description
id - ID!
uuid - String!
shopifyId - String
email - String!
firstName - String!
lastName - String!
shopifyRoles - String Not used anymore
Example
{
  "id": 4,
  "uuid": "xyz789",
  "shopifyId": "abc123",
  "email": "xyz789",
  "firstName": "abc123",
  "lastName": "xyz789",
  "shopifyRoles": "abc123"
}

SignedUrl

Fields
Field Name Description
url - String!
fields - String!
filePath - String!
filename - String!
Example
{
  "url": "abc123",
  "fields": "xyz789",
  "filePath": "xyz789",
  "filename": "xyz789"
}

Stage

Fields
Field Name Description
id - ID!
systemStage - SystemStage
label - String!
tags - [String!]! Tags to apply to the Shopify Order when return is moved to this stage.
order - Int! Display order for the stage in the pipeline. Lower values appear first.
uuid - ID!
behavior - SystemStage
shipmentStatus - ShipmentStatus Use shipment_statuses instead.
shipmentStatuses - [ShipmentStatus]
Example
{
  "id": 4,
  "systemStage": "AUTOMATICALLY_APPROVED",
  "label": "xyz789",
  "tags": ["abc123"],
  "order": 123,
  "uuid": 4,
  "behavior": "AUTOMATICALLY_APPROVED",
  "shipmentStatus": "UNKNOWN",
  "shipmentStatuses": ["UNKNOWN"]
}

StoreCreditType

Fields
Field Name Description
id - ID!
created - DateTime
storeCreditType - AutomatedStoreCreditType
shopifyId - String! Shopify id of the corresponding shopify object, dependent on store credit type
code - String!
shopAmount - Decimal!
shopCurrency - String!
presentmentAmount - Decimal
presentmentCurrency - String!
returnItems - [ReturnItem!]!
amount - Decimal Amount in shop currency (alias for shop_amount)
currency - String Currency code (alias for shop_currency)
Example
{
  "id": "4",
  "created": "2007-12-03T10:15:30Z",
  "storeCreditType": "DISCOUNT_CODE",
  "shopifyId": "abc123",
  "code": "abc123",
  "shopAmount": Decimal,
  "shopCurrency": "xyz789",
  "presentmentAmount": Decimal,
  "presentmentCurrency": "xyz789",
  "returnItems": [ReturnItem],
  "amount": Decimal,
  "currency": "abc123"
}

String

Description

The String scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.

Example
"xyz789"

SuggestedRefundType

Fields
Field Name Description
productsSet - MoneySet
taxesSet - MoneySet
subtotalSet - MoneySet
exchangesSet - MoneySet
normalizationAdjustmentSet - MoneySet Price normalization adjustment. Positive = price increased (reduces cost), Negative = price decreased (increases cost)
shippingSet - MoneySet
availableForRefundSet - MoneySet Maximum refundable on the order; a gross ceiling, not the payable amount. Use netRefundPayableSet.
suggestedRefundSet - MoneySet Gross suggested refund before outstanding handling and restocking fees
netRefundPayableSet - MoneySet Amount payable after outstanding handling and restocking fees. Optional shipping reimbursement and store-credit incentives are not included.
handlingFeeChargedSet - MoneySet
handlingFeeSuggestedSet - MoneySet
restockingFeeChargedSet - MoneySet
restockingFeeSuggestedSet - MoneySet
storeCreditIncentiveAmountSet - MoneySet
Example
{
  "productsSet": MoneySet,
  "taxesSet": MoneySet,
  "subtotalSet": MoneySet,
  "exchangesSet": MoneySet,
  "normalizationAdjustmentSet": MoneySet,
  "shippingSet": MoneySet,
  "availableForRefundSet": MoneySet,
  "suggestedRefundSet": MoneySet,
  "netRefundPayableSet": MoneySet,
  "handlingFeeChargedSet": MoneySet,
  "handlingFeeSuggestedSet": MoneySet,
  "restockingFeeChargedSet": MoneySet,
  "restockingFeeSuggestedSet": MoneySet,
  "storeCreditIncentiveAmountSet": MoneySet
}

SuggestionRefundType

Fields
Field Name Description
taxesIncluded - Boolean Whether taxes are included in the subtotal price of the order.
currency - String Currency code e.g. USD
shopCurrency - String Shop currency code e.g. USD
discountedSubtotalAmount - Decimal The sum of all the discounted prices of the line items being refunded.
shopDiscountedSubtotalAmount - Decimal The sum of all the discounted prices of the line items being refunded in Shop currency.
totalTaxAmount - Decimal Total tax amount on original order
shopTotalTaxAmount - Decimal Total tax amount on original order in shop currency
totalTaxAmountForReturnedItems - Decimal Total tax amount for the items being returned
shopTotalTaxAmountForReturnedItems - Decimal Total tax amount for the items being returned in shop currency
shippingAmount - Decimal Shipping amount to refund for the selected line items
shopShippingAmount - Decimal Shipping shop amount to refund for the selected line items
shippingTaxAmount - Decimal Shipping tax amount to refund for the selected line items
shopTaxShippingAmount - Decimal Shipping shop tax amount to refund for the selected line items
shippingTaxAmountForReturnedItems - Decimal Shipping tax amount for the items being returned
shopShippingTaxAmountForReturnedItems - Decimal Shipping shop tax amount for the items being returned in shop currency
totalAmount - Decimal Total amount to refund for the selected line items + shipping amount
shopTotalAmount - Decimal Total shop amount to refund for the selected line items + shipping amount
suggestedAmountForReturnedItems - Decimal Suggested refund for the returned items
shopSuggestedAmountForReturnedItems - Decimal Suggested refund for the returned items in shop currency
Example
{
  "taxesIncluded": true,
  "currency": "abc123",
  "shopCurrency": "xyz789",
  "discountedSubtotalAmount": Decimal,
  "shopDiscountedSubtotalAmount": Decimal,
  "totalTaxAmount": Decimal,
  "shopTotalTaxAmount": Decimal,
  "totalTaxAmountForReturnedItems": Decimal,
  "shopTotalTaxAmountForReturnedItems": Decimal,
  "shippingAmount": Decimal,
  "shopShippingAmount": Decimal,
  "shippingTaxAmount": Decimal,
  "shopTaxShippingAmount": Decimal,
  "shippingTaxAmountForReturnedItems": Decimal,
  "shopShippingTaxAmountForReturnedItems": Decimal,
  "totalAmount": Decimal,
  "shopTotalAmount": Decimal,
  "suggestedAmountForReturnedItems": Decimal,
  "shopSuggestedAmountForReturnedItems": Decimal
}

SystemStage

Description

An enumeration.

Values
Enum Value Description

AUTOMATICALLY_APPROVED

PENDING_APPROVAL

APPROVED

REJECTED

RECEIVED

Example
"AUTOMATICALLY_APPROVED"

TaxNumberInput

Fields
Input Field Description
id - ID
taxNumberType - TaxNumberType!
country - String!
value - String!
Example
{
  "id": 4,
  "taxNumberType": "VAT",
  "country": "xyz789",
  "value": "xyz789"
}

TaxNumberOutput

Fields
Field Name Description
id - UUID!
taxNumberType - TaxNumberType!
country - String!
value - String!
errors - [GQLErrorType]
Example
{
  "id": "cc14463d-6a06-4740-a3d8-380aacfa0644",
  "taxNumberType": "VAT",
  "country": "xyz789",
  "value": "abc123",
  "errors": [GQLErrorType]
}

TaxNumberType

Description

An enumeration.

Values
Enum Value Description

VAT

EIN

GST

SSN

EORI

DUN

FED

STA

CNP

IE

INN

KPP

OGR

OKP

IOSS

FTZ

DAN

TAN

DTF

RGP

DLI

NID

PAS

MID

UKIMS

Example
"VAT"

UUID

Description

Leverages the internal Python implementation of UUID (uuid.UUID) to provide native UUID objects in fields, resolvers and input.

Example
"cc14463d-6a06-4740-a3d8-380aacfa0644"

UpdateMissingReturnItems

Fields
Field Name Description
error - String
return - Return
Example
{
  "error": "xyz789",
  "return": Return
}

UpdateReturn

Fields
Field Name Description
success - Boolean
ret - Return
Example
{"success": false, "ret": Return}

WarehouseEvidenceKind

Description

An enumeration.

Values
Enum Value Description

IMAGE

VIDEO

NOTE

DOCUMENT

Example
"IMAGE"

WarehouseMediaInput

Fields
Input Field Description
kind - WarehouseEvidenceKind!
storageKey - String!
mimeType - String
sizeBytes - Int
checksum - String
capturedAt - DateTime
Example
{
  "kind": "IMAGE",
  "storageKey": "xyz789",
  "mimeType": "xyz789",
  "sizeBytes": 987,
  "checksum": "xyz789",
  "capturedAt": "2007-12-03T10:15:30Z"
}

WarehouseNoteInput

Fields
Input Field Description
text - String!
capturedAt - DateTime
Example
{
  "text": "abc123",
  "capturedAt": "2007-12-03T10:15:30Z"
}

WarehouseType

Fields
Field Name Description
id - ID!
name - String!
isShopifyManaged - Boolean
address - AddressType
Example
{
  "id": 4,
  "name": "xyz789",
  "isShopifyManaged": false,
  "address": AddressType
}

WebhookEventType

Description

An enumeration.

Values
Enum Value Description

RETURN_CREATED

RETURN_UPDATED

Example
"RETURN_CREATED"