A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
Hi,
I am trying to get return/refund reasons of order items via api. In api documentation there is "order_adjustments" and "note" field, but in my response empty array or null. How can i get reason of refunded/returned order item?
From documentation;
"note": "Item was damaged during shipping",
"order_adjustments": [
{
"id": 4221763620,
"kind": "shipping_refund",
"amount": "-8.00",
"reason": "Shipping refund",
"order_id": 171016912932,
"refund_id": 8244756516,
"amount_set": {
"shop_money": {
"amount": 10.99,
"currency_code": "USD"
},
"presentment_money": {
"amount": 12.95,
"currency_code": "CAD"
}
},
"tax_amount": "0.00",
"tax_amount_set": {
"shop_money": {
"amount": 1.67,
"currency_code": "USD"
},
"presentment_money": {
"amount": 2.32,
"currency_code": "CAD"
}
}
}
]
my response:
note: null,
"order_adjustments": []
doc url: https://shopify.dev/api/admin-rest/2021-10/resources/refund#resource_object
my refunded order object;
{
"order": {
"id": 4490240884898,
"admin_graphql_api_id": "gid://shopify/Order/4490240884898",
"app_id": 1354745,
"browser_ip": null,
"buyer_accepts_marketing": false,
"cancel_reason": null,
"cancelled_at": null,
"cart_token": null,
"checkout_id": 21309073260706,
"checkout_token": "a4fef565eae06c58c7b17ecb7bb7d9ff",
"client_details": {
"accept_language": null,
"browser_height": null,
"browser_ip": null,
"browser_width": null,
"session_hash": null,
"user_agent": null
},
"closed_at": null,
"confirmed": true,
"contact_email": "ersen.kaya@path.com.tr",
"created_at": "2021-11-02T12:37:37Z",
"currency": "GBP",
"current_subtotal_price": "0.00",
"current_subtotal_price_set": {
"shop_money": {
"amount": "0.00",
"currency_code": "GBP"
},
"presentment_money": {
"amount": "0.00",
"currency_code": "GBP"
}
},
"current_total_discounts": "0.00",
"current_total_discounts_set": {
"shop_money": {
"amount": "0.00",
"currency_code": "GBP"
},
"presentment_money": {
"amount": "0.00",
"currency_code": "GBP"
}
},
"current_total_duties_set": null,
"current_total_price": "0.00",
"current_total_price_set": {
"shop_money": {
"amount": "0.00",
"currency_code": "GBP"
},
"presentment_money": {
"amount": "0.00",
"currency_code": "GBP"
}
},
"current_total_tax": "0.00",
"current_total_tax_set": {
"shop_money": {
"amount": "0.00",
"currency_code": "GBP"
},
"presentment_money": {
"amount": "0.00",
"currency_code": "GBP"
}
},
"customer_locale": "en",
"device_id": null,
"discount_codes": [
],
"email": "ersen.kaya@path.com.tr",
"estimated_taxes": false,
"financial_status": "refunded",
"fulfillment_status": "fulfilled",
"gateway": "manual",
"landing_site": null,
"landing_site_ref": null,
"location_id": null,
"name": "#1010",
"note": "order note for testing",
"note_attributes": [
],
"number": 10,
"order_number": 1010,
"order_status_url": "https://sazy.com/57663094946/orders/91cec70a37f7d90f973483e9ceaaac73/authenticate?key=83145a73a40250...",
"original_total_duties_set": null,
"payment_gateway_names": [
"manual"
],
"phone": "+905305282784",
"presentment_currency": "GBP",
"processed_at": "2021-11-02T12:37:37Z",
"processing_method": "manual",
"reference": null,
"referring_site": null,
"source_identifier": null,
"source_name": "shopify_draft_order",
"source_url": null,
"subtotal_price": "30.00",
"subtotal_price_set": {
"shop_money": {
"amount": "30.00",
"currency_code": "GBP"
},
"presentment_money": {
"amount": "30.00",
"currency_code": "GBP"
}
},
"tags": "",
"tax_lines": [
{
"price": "4.58",
"rate": 0.18,
"title": "KDV",
"price_set": {
"shop_money": {
"amount": "4.58",
"currency_code": "GBP"
},
"presentment_money": {
"amount": "4.58",
"currency_code": "GBP"
}
},
"channel_liable": false
}
],
"taxes_included": true,
"test": false,
"token": "91cec70a37f7d90f973483e9ceaaac73",
"total_discounts": "0.00",
"total_discounts_set": {
"shop_money": {
"amount": "0.00",
"currency_code": "GBP"
},
"presentment_money": {
"amount": "0.00",
"currency_code": "GBP"
}
},
"total_line_items_price": "30.00",
"total_line_items_price_set": {
"shop_money": {
"amount": "30.00",
"currency_code": "GBP"
},
"presentment_money": {
"amount": "30.00",
"currency_code": "GBP"
}
},
"total_outstanding": "0.00",
"total_price": "30.00",
"total_price_set": {
"shop_money": {
"amount": "30.00",
"currency_code": "GBP"
},
"presentment_money": {
"amount": "30.00",
"currency_code": "GBP"
}
},
"total_price_usd": "40.97",
"total_shipping_price_set": {
"shop_money": {
"amount": "0.00",
"currency_code": "GBP"
},
"presentment_money": {
"amount": "0.00",
"currency_code": "GBP"
}
},
"total_tax": "4.58",
"total_tax_set": {
"shop_money": {
"amount": "4.58",
"currency_code": "GBP"
},
"presentment_money": {
"amount": "4.58",
"currency_code": "GBP"
}
},
"total_tip_received": "0.00",
"total_weight": 0,
"updated_at": "2021-11-02T14:03:10Z",
"user_id": 77509361826,
"billing_address": {
"first_name": "Ersen",
"address1": "Şirinevler mh. Yakut 2 sk.",
"phone": "+905305282784",
"city": "İstanbul",
"zip": "34034",
"province": null,
"country": "Turkey",
"last_name": "Kaya",
"address2": "Batuhan Apt. No:6, Daire: 2",
"company": "Path Digital Experiences",
"latitude": null,
"longitude": null,
"name": "Ersen Kaya",
"country_code": "TR",
"province_code": null
},
"customer": {
"id": 5620986380450,
"email": "ersen.kaya@path.com.tr",
"accepts_marketing": false,
"created_at": "2021-09-08T12:04:13Z",
"updated_at": "2021-11-02T14:03:13Z",
"first_name": "Ersen",
"last_name": "Kaya",
"orders_count": 4,
"state": "disabled",
"total_spent": "30.00",
"last_order_id": 4490240884898,
"note": "",
"verified_email": true,
"multipass_identifier": null,
"tax_exempt": false,
"phone": "+905305282784",
"tags": "",
"last_order_name": "#1010",
"currency": "GBP",
"accepts_marketing_updated_at": "2021-09-08T12:04:13Z",
"marketing_opt_in_level": null,
"admin_graphql_api_id": "gid://shopify/Customer/5620986380450",
"default_address": {
"id": 6813443227810,
"customer_id": 5620986380450,
"first_name": "Ersen",
"last_name": "Kaya",
"company": "Path Digital Experiences",
"address1": "Şirinevler mh. Yakut 2 sk.",
"address2": "Batuhan Apt. No:6, Daire: 2",
"city": "İstanbul",
"province": "",
"country": "Turkey",
"zip": "34034",
"phone": "+905305282784",
"name": "Ersen Kaya",
"province_code": null,
"country_code": "TR",
"country_name": "Turkey",
"default": true
}
},
"discount_applications": [
],
"fulfillments": [
{
"id": 3986666586274,
"admin_graphql_api_id": "gid://shopify/Fulfillment/3986666586274",
"created_at": "2021-11-02T12:38:05Z",
"location_id": 64806092962,
"name": "#1010.1",
"order_id": 4490240884898,
"origin_address": {
},
"receipt": {
},
"service": "sazy_mira",
"shipment_status": null,
"status": "success",
"tracking_company": "FSC",
"tracking_number": "MNG1345677",
"tracking_numbers": [
"MNG1345677"
],
"tracking_url": "https://tms.futuresupplychains.com/GUI/Tracking_New/Website/DocketTrack.aspx?st_Docnolist=MNG1345677",
"tracking_urls": [
"https://tms.futuresupplychains.com/GUI/Tracking_New/Website/DocketTrack.aspx?st_Docnolist=MNG1345677"
],
"updated_at": "2021-11-02T12:38:05Z",
"line_items": [
{
"id": 10975999656098,
"admin_graphql_api_id": "gid://shopify/LineItem/10975999656098",
"destination_location": {
"id": 3168232636578,
"country_code": "TR",
"province_code": "",
"name": "Ersen Kaya",
"address1": "Şirinevler mh. Yakut 2 sk.",
"address2": "Batuhan Apt. No:6, Daire: 2",
"city": "İstanbul",
"zip": "34034"
},
"fulfillable_quantity": 0,
"fulfillment_service": "sazy_mira",
"fulfillment_status": "fulfilled",
"gift_card": false,
"grams": 0,
"name": "Oriental Area Rug, Terra",
"origin_location": {
"id": 3168232603810,
"country_code": "TR",
"province_code": "",
"name": "sazy.com",
"address1": "Esentepe Mahallesi, Talatpasa Caddesi, Sisli",
"address2": "Kolektif House Levent No:5/1 Sisli",
"city": "İstanbul",
"zip": "34394"
},
"price": "30.00",
"price_set": {
"shop_money": {
"amount": "30.00",
"currency_code": "GBP"
},
"presentment_money": {
"amount": "30.00",
"currency_code": "GBP"
}
},
"product_exists": true,
"product_id": 7197034250402,
"properties": [
],
"quantity": 1,
"requires_shipping": true,
"sku": "10205013001",
"taxable": true,
"title": "Oriental Area Rug, Terra",
"total_discount": "0.00",
"total_discount_set": {
"shop_money": {
"amount": "0.00",
"currency_code": "GBP"
},
"presentment_money": {
"amount": "0.00",
"currency_code": "GBP"
}
},
"variant_id": 41159044464802,
"variant_inventory_management": "shopify",
"variant_title": "",
"vendor": "Onka",
"tax_lines": [
{
"channel_liable": false,
"price": "4.58",
"price_set": {
"shop_money": {
"amount": "4.58",
"currency_code": "GBP"
},
"presentment_money": {
"amount": "4.58",
"currency_code": "GBP"
}
},
"rate": 0.18,
"title": "KDV"
}
],
"duties": [
],
"discount_allocations": [
]
}
]
}
],
"line_items": [
{
"id": 10975999656098,
"admin_graphql_api_id": "gid://shopify/LineItem/10975999656098",
"destination_location": {
"id": 3168232636578,
"country_code": "TR",
"province_code": "",
"name": "Ersen Kaya",
"address1": "Şirinevler mh. Yakut 2 sk.",
"address2": "Batuhan Apt. No:6, Daire: 2",
"city": "İstanbul",
"zip": "34034"
},
"fulfillable_quantity": 0,
"fulfillment_service": "sazy_mira",
"fulfillment_status": "fulfilled",
"gift_card": false,
"grams": 0,
"name": "Oriental Area Rug, Terra",
"origin_location": {
"id": 3168232603810,
"country_code": "TR",
"province_code": "",
"name": "sazy.com",
"address1": "Esentepe Mahallesi, Talatpasa Caddesi, Sisli",
"address2": "Kolektif House Levent No:5/1 Sisli",
"city": "İstanbul",
"zip": "34394"
},
"price": "30.00",
"price_set": {
"shop_money": {
"amount": "30.00",
"currency_code": "GBP"
},
"presentment_money": {
"amount": "30.00",
"currency_code": "GBP"
}
},
"product_exists": true,
"product_id": 7197034250402,
"properties": [
],
"quantity": 1,
"requires_shipping": true,
"sku": "10205013001",
"taxable": true,
"title": "Oriental Area Rug, Terra",
"total_discount": "0.00",
"total_discount_set": {
"shop_money": {
"amount": "0.00",
"currency_code": "GBP"
},
"presentment_money": {
"amount": "0.00",
"currency_code": "GBP"
}
},
"variant_id": 41159044464802,
"variant_inventory_management": "shopify",
"variant_title": "",
"vendor": "Onka",
"tax_lines": [
{
"channel_liable": false,
"price": "4.58",
"price_set": {
"shop_money": {
"amount": "4.58",
"currency_code": "GBP"
},
"presentment_money": {
"amount": "4.58",
"currency_code": "GBP"
}
},
"rate": 0.18,
"title": "KDV"
}
],
"duties": [
],
"discount_allocations": [
]
}
],
"payment_terms": null,
"refunds": [
{
"id": 822772367522,
"admin_graphql_api_id": "gid://shopify/Refund/822772367522",
"created_at": "2021-11-02T14:03:10Z",
"note": null,
"order_id": 4490240884898,
"processed_at": "2021-11-02T14:03:10Z",
"restock": true,
"total_duties_set": {
"shop_money": {
"amount": "0.00",
"currency_code": "GBP"
},
"presentment_money": {
"amount": "0.00",
"currency_code": "GBP"
}
},
"user_id": 77509361826,
"order_adjustments": [
],
"transactions": [
{
"id": 5250658861218,
"admin_graphql_api_id": "gid://shopify/OrderTransaction/5250658861218",
"amount": "30.00",
"authorization": null,
"created_at": "2021-11-02T14:03:10Z",
"currency": "GBP",
"device_id": null,
"error_code": null,
"gateway": "manual",
"kind": "refund",
"location_id": null,
"message": "Refunded 30.00 from manual gateway",
"order_id": 4490240884898,
"parent_id": 5250530771106,
"processed_at": "2021-11-02T14:03:10Z",
"receipt": {
},
"source_name": "1830279",
"status": "success",
"test": false,
"user_id": null
}
],
"refund_line_items": [
{
"id": 315150860450,
"line_item_id": 10975999656098,
"location_id": 64806092962,
"quantity": 1,
"restock_type": "return",
"subtotal": 30.0,
"subtotal_set": {
"shop_money": {
"amount": "30.00",
"currency_code": "GBP"
},
"presentment_money": {
"amount": "30.00",
"currency_code": "GBP"
}
},
"total_tax": 4.58,
"total_tax_set": {
"shop_money": {
"amount": "4.58",
"currency_code": "GBP"
},
"presentment_money": {
"amount": "4.58",
"currency_code": "GBP"
}
},
"line_item": {
"id": 10975999656098,
"admin_graphql_api_id": "gid://shopify/LineItem/10975999656098",
"destination_location": {
"id": 3168232636578,
"country_code": "TR",
"province_code": "",
"name": "Ersen Kaya",
"address1": "Şirinevler mh. Yakut 2 sk.",
"address2": "Batuhan Apt. No:6, Daire: 2",
"city": "İstanbul",
"zip": "34034"
},
"fulfillable_quantity": 0,
"fulfillment_service": "sazy_mira",
"fulfillment_status": "fulfilled",
"gift_card": false,
"grams": 0,
"name": "Oriental Area Rug, Terra",
"origin_location": {
"id": 3168232603810,
"country_code": "TR",
"province_code": "",
"name": "sazy.com",
"address1": "Esentepe Mahallesi, Talatpasa Caddesi, Sisli",
"address2": "Kolektif House Levent No:5/1 Sisli",
"city": "İstanbul",
"zip": "34394"
},
"price": "30.00",
"price_set": {
"shop_money": {
"amount": "30.00",
"currency_code": "GBP"
},
"presentment_money": {
"amount": "30.00",
"currency_code": "GBP"
}
},
"product_exists": true,
"product_id": 7197034250402,
"properties": [
],
"quantity": 1,
"requires_shipping": true,
"sku": "10205013001",
"taxable": true,
"title": "Oriental Area Rug, Terra",
"total_discount": "0.00",
"total_discount_set": {
"shop_money": {
"amount": "0.00",
"currency_code": "GBP"
},
"presentment_money": {
"amount": "0.00",
"currency_code": "GBP"
}
},
"variant_id": 41159044464802,
"variant_inventory_management": "shopify",
"variant_title": "",
"vendor": "Onka",
"tax_lines": [
{
"channel_liable": false,
"price": "4.58",
"price_set": {
"shop_money": {
"amount": "4.58",
"currency_code": "GBP"
},
"presentment_money": {
"amount": "4.58",
"currency_code": "GBP"
}
},
"rate": 0.18,
"title": "KDV"
}
],
"duties": [
],
"discount_allocations": [
]
}
}
],
"duties": [
]
}
],
"shipping_address": {
"first_name": "Ersen",
"address1": "Şirinevler mh. Yakut 2 sk.",
"phone": "+905305282784",
"city": "İstanbul",
"zip": "34034",
"province": null,
"country": "Turkey",
"last_name": "Kaya",
"address2": "Batuhan Apt. No:6, Daire: 2",
"company": "Path Digital Experiences",
"latitude": null,
"longitude": null,
"name": "Ersen Kaya",
"country_code": "TR",
"province_code": null
},
"shipping_lines": [
]
}
}