Hey,
I am building the bulk return order mutation and using this article:
https://shopify.dev/docs/api/usage/api-exploration/admin-graphiql-explorer
However, the first step uses the returnable fulfillment line items from a fulfilled order.
Order:
{
“order”: {
“id”: 6265162170669,
“admin_graphql_api_id”: “gid://shopify/Order/6265162170669”,
“app_id”: 1354745,
“browser_ip”: “43.240.10.154”,
“buyer_accepts_marketing”: true,
“cancel_reason”: null,
“cancelled_at”: null,
“cart_token”: null,
“checkout_id”: 38924435882285,
“checkout_token”: “70cd2b14bbc872da09a39f877f1ed549”,
“client_details”: {
“accept_language”: null,
“browser_height”: null,
“browser_ip”: “43.240.10.154”,
“browser_width”: null,
“session_hash”: null,
“user_agent”: “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36”
},
“closed_at”: “2025-03-25T03:47:02-04:00”,
“company”: {
“id”: 2952102189,
“location_id”: 3205923117
},
“confirmation_number”: “1FP5M9Y5T”,
“confirmed”: true,
“contact_email”: “roshni@praella.com”,
“created_at”: “2025-03-25T03:33:45-04:00”,
“currency”: “USD”,
“current_subtotal_price”: “349.98”,
“current_subtotal_price_set”: {
“shop_money”: {
“amount”: “349.98”,
“currency_code”: “USD”
},
“presentment_money”: {
“amount”: “349.98”,
“currency_code”: “USD”
}
},
“current_total_additional_fees_set”: null,
“current_total_discounts”: “0.00”,
“current_total_discounts_set”: {
“shop_money”: {
“amount”: “0.00”,
“currency_code”: “USD”
},
“presentment_money”: {
“amount”: “0.00”,
“currency_code”: “USD”
}
},
“current_total_duties_set”: null,
“current_total_price”: “349.98”,
“current_total_price_set”: {
“shop_money”: {
“amount”: “349.98”,
“currency_code”: “USD”
},
“presentment_money”: {
“amount”: “349.98”,
“currency_code”: “USD”
}
},
“current_total_tax”: “0.00”,
“current_total_tax_set”: {
“shop_money”: {
“amount”: “0.00”,
“currency_code”: “USD”
},
“presentment_money”: {
“amount”: “0.00”,
“currency_code”: “USD”
}
},
“customer_locale”: “en”,
“device_id”: null,
“discount_codes”: ,
“email”: “roshni@praella.com”,
“estimated_taxes”: false,
“financial_status”: “paid”,
“fulfillment_status”: “fulfilled”,
“landing_site”: null,
“landing_site_ref”: null,
“location_id”: 102955942189,
“merchant_of_record_app_id”: null,
“name”: “#1009”,
“note”: null,
“note_attributes”: ,
“number”: 9,
“order_number”: 1009,
“order_status_url”: “https://demo-tejas.myshopify.com/90943389997/orders/6bc214b30337439afed2d3327b1608aa/authenticate?key=e5c9af2dd14c204934a23bf8254bbce1”,
“original_total_additional_fees_set”: null,
“original_total_duties_set”: null,
“payment_gateway_names”: [
“manual”
],
“phone”: null,
“po_number”: null,
“presentment_currency”: “USD”,
“processed_at”: “2025-03-25T03:33:45-04:00”,
“reference”: null,
“referring_site”: null,
“source_identifier”: null,
“source_name”: “shopify_draft_order”,
“source_url”: null,
“subtotal_price”: “349.98”,
“subtotal_price_set”: {
“shop_money”: {
“amount”: “349.98”,
“currency_code”: “USD”
},
“presentment_money”: {
“amount”: “349.98”,
“currency_code”: “USD”
}
},
“tags”: “”,
“tax_exempt”: false,
“tax_lines”: ,
“taxes_included”: false,
“test”: false,
“token”: “6bc214b30337439afed2d3327b1608aa”,
“total_discounts”: “0.00”,
“total_discounts_set”: {
“shop_money”: {
“amount”: “0.00”,
“currency_code”: “USD”
},
“presentment_money”: {
“amount”: “0.00”,
“currency_code”: “USD”
}
},
“total_line_items_price”: “349.98”,
“total_line_items_price_set”: {
“shop_money”: {
“amount”: “349.98”,
“currency_code”: “USD”
},
“presentment_money”: {
“amount”: “349.98”,
“currency_code”: “USD”
}
},
“total_outstanding”: “0.00”,
“total_price”: “349.98”,
“total_price_set”: {
“shop_money”: {
“amount”: “349.98”,
“currency_code”: “USD”
},
“presentment_money”: {
“amount”: “349.98”,
“currency_code”: “USD”
}
},
“total_shipping_price_set”: {
“shop_money”: {
“amount”: “0.00”,
“currency_code”: “USD”
},
“presentment_money”: {
“amount”: “0.00”,
“currency_code”: “USD”
}
},
“total_tax”: “0.00”,
“total_tax_set”: {
“shop_money”: {
“amount”: “0.00”,
“currency_code”: “USD”
},
“presentment_money”: {
“amount”: “0.00”,
“currency_code”: “USD”
}
},
“total_tip_received”: “0.00”,
“total_weight”: 0,
“updated_at”: “2025-03-25T03:47:02-04:00”,
“user_id”: null,
“billing_address”: null,
“customer”: {
“id”: 8610840805677,
“email”: “roshni@praella.com”,
“created_at”: “2025-02-21T00:37:21-05:00”,
“updated_at”: “2025-03-25T03:33:45-04:00”,
“first_name”: “test”,
“last_name”: “praella”,
“state”: “disabled”,
“note”: null,
“verified_email”: true,
“multipass_identifier”: null,
“tax_exempt”: false,
“phone”: null,
“email_marketing_consent”: {
“state”: “subscribed”,
“opt_in_level”: “single_opt_in”,
“consent_updated_at”: “2025-02-21T00:37:22-05:00”
},
“sms_marketing_consent”: null,
“tags”: “shopify-forms-332807”,
“currency”: “USD”,
“tax_exemptions”: ,
“admin_graphql_api_id”: “gid://shopify/Customer/8610840805677”
},
“discount_applications”: ,
“fulfillments”: [
{
“id”: 5510278840621,
“admin_graphql_api_id”: “gid://shopify/Fulfillment/5510278840621”,
“created_at”: “2025-03-25T03:47:01-04:00”,
“location_id”: 102955942189,
“name”: “#1009.1”,
“order_id”: 6265162170669,
“origin_address”: {},
“receipt”: {},
“service”: “manual”,
“shipment_status”: null,
“status”: “success”,
“tracking_company”: null,
“tracking_number”: null,
“tracking_numbers”: ,
“tracking_url”: null,
“tracking_urls”: ,
“updated_at”: “2025-03-25T03:47:01-04:00”,
“line_items”: [
{
“id”: 15526023659821,
“admin_graphql_api_id”: “gid://shopify/LineItem/15526023659821”,
“attributed_staffs”: ,
“current_quantity”: 2,
“fulfillable_quantity”: 0,
“fulfillment_service”: “manual”,
“fulfillment_status”: “fulfilled”,
“gift_card”: false,
“grams”: 0,
“name”: “Farmhouse Play Kitchen with EZ Kraft Assembly™ (Copy)”,
“price”: “174.99”,
“price_set”: {
“shop_money”: {
“amount”: “174.99”,
“currency_code”: “USD”
},
“presentment_money”: {
“amount”: “174.99”,
“currency_code”: “USD”
}
},
“product_exists”: true,
“product_id”: 9929141682477,
“properties”: ,
“quantity”: 2,
“requires_shipping”: true,
“sku”: null,
“taxable”: true,
“title”: “Farmhouse Play Kitchen with EZ Kraft Assembly™ (Copy)”,
“total_discount”: “0.00”,
“total_discount_set”: {
“shop_money”: {
“amount”: “0.00”,
“currency_code”: “USD”
},
“presentment_money”: {
“amount”: “0.00”,
“currency_code”: “USD”
}
},
“variant_id”: 50396015362349,
“variant_inventory_management”: “shopify”,
“variant_title”: null,
“vendor”: “Demo-Chirag-khunt”,
“tax_lines”: ,
“duties”: ,
“discount_allocations”:
}
]
}
],
“line_items”: [
{
“id”: 15526023659821,
“admin_graphql_api_id”: “gid://shopify/LineItem/15526023659821”,
“attributed_staffs”: ,
“current_quantity”: 2,
“fulfillable_quantity”: 0,
“fulfillment_service”: “manual”,
“fulfillment_status”: “fulfilled”,
“gift_card”: false,
“grams”: 0,
“name”: “Farmhouse Play Kitchen with EZ Kraft Assembly™ (Copy)”,
“price”: “174.99”,
“price_set”: {
“shop_money”: {
“amount”: “174.99”,
“currency_code”: “USD”
},
“presentment_money”: {
“amount”: “174.99”,
“currency_code”: “USD”
}
},
“product_exists”: true,
“product_id”: 9929141682477,
“properties”: ,
“quantity”: 2,
“requires_shipping”: true,
“sku”: null,
“taxable”: true,
“title”: “Farmhouse Play Kitchen with EZ Kraft Assembly™ (Copy)”,
“total_discount”: “0.00”,
“total_discount_set”: {
“shop_money”: {
“amount”: “0.00”,
“currency_code”: “USD”
},
“presentment_money”: {
“amount”: “0.00”,
“currency_code”: “USD”
}
},
“variant_id”: 50396015362349,
“variant_inventory_management”: “shopify”,
“variant_title”: null,
“vendor”: “Demo-Chirag-khunt”,
“tax_lines”: ,
“duties”: ,
“discount_allocations”:
}
],
“payment_terms”: null,
“refunds”: ,
“shipping_address”: null,
“shipping_lines”:
}
}
Graphql query for return the returnable fulmilments:
query returnableFulfillmentsQuery {
returnableFulfillments(orderId: “gid://shopify/Order/6265162170669”, first: 10) {
edges {
node {
id
fulfillment {
id
}
# Return the first ten returnable fulfillment line items that belong to the order.
returnableFulfillmentLineItems(first: 10) {
edges {
node {
fulfillmentLineItem {
id
}
quantity
}
}
}
}
}
}
}
response:
{
“data”: {
“returnableFulfillments”: {
“edges”:
}
},
“extensions”: {
“cost”: {
“requestedQueryCost”: 50,
“actualQueryCost”: 2,
“throttleStatus”: {
“maximumAvailable”: 2000,
“currentlyAvailable”: 1998,
“restoreRate”: 100
}
}
}
}
The issue is that I am getting the empty array of returnable fulfillment items.