Query the order for fulfillment GIDs and line item quantities using the order GraphQL query, then identify eligible lines for return
Call the returnCreate mutation with the fulfillmentLineItems array specifying quantity and returnReason for each line
After the return is created, call reverseDeliveryCreateWithShipping mutation with the return GID to generate a return shipping label and associate tracking
Once the return is received, call reverseFulfillmentOrderDispose mutation to mark each line as restocked or not-restocked based on condition inspection
Issue the refund by calling refundCreate with the refund line items, shipping amount if applicable, and transactions referencing the original payment gateway transaction
Known gotchas
returnCreate requires the order to have at least one fulfillment; unfulfilled line items must be refunded directly via refundCreate without going through the return flow
reverseDeliveryCreateWithShipping only supports carriers configured on the shop; if the carrier is unsupported, create the label externally and attach it via reverseDeliveryCreate with a trackingInfo input instead
Restocking via reverseFulfillmentOrderDispose is required before inventory levels reflect the returned items; skipping this step leaves inventory counts understated
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp