With what you have you can take the return_order_id
and get this itemized return if it is an itemized return. For the above order its:
{
"order": {
"id": "SDnqjKI0sstON1XTi3qBIx2eV",
"location_id": "5JTA18FX53G3M",
"created_at": "2024-04-06T13:40:13.000Z",
"updated_at": "2024-04-06T14:06:03.000Z",
"state": "COMPLETED",
"total_tax_money": {
"amount": 0,
"currency": "USD"
},
"total_discount_money": {
"amount": 0,
"currency": "USD"
},
"total_tip_money": {
"amount": 0,
"currency": "USD"
},
"total_money": {
"amount": 0,
"currency": "USD"
},
"closed_at": "2024-04-06T14:06:03.000Z",
"total_service_charge_money": {
"amount": 0,
"currency": "USD"
},
"returns": [
{
"source_order_id": "zls8ETfFzvdngiJ9HJO1EtUVaaPZY",
"return_line_items": [
{
"uid": "cce8b174-a8a7-4291-b50f-60b60e7d6273",
"source_line_item_uid": "4b216b84-bb69-42ce-bac0-095f6338960b",
"name": "The Charlotte Mason Elementary Arithmetic Series, Book 5",
"quantity": "1",
"catalog_object_id": "C5E7SGJFLS5ZWRP7XLDVMWAU",
"catalog_version": 1710868042730,
"variation_name": "Regular",
"item_type": "ITEM",
"applied_taxes": [
{
"uid": "5f28485a-7f85-4cf5-9b4e-0bdf26335159",
"tax_uid": "5f28485a-7f85-4cf5-9b4e-0bdf26335159",
"applied_money": {
"amount": 460,
"currency": "USD"
}
}
],
"base_price_money": {
"amount": 5900,
"currency": "USD"
},
"variation_total_price_money": {
"amount": 5900,
"currency": "USD"
},
"gross_return_money": {
"amount": 5900,
"currency": "USD"
},
"total_tax_money": {
"amount": 460,
"currency": "USD"
},
"total_discount_money": {
"amount": 0,
"currency": "USD"
},
"total_money": {
"amount": 6360,
"currency": "USD"
},
"total_service_charge_money": {
"amount": 0,
"currency": "USD"
}
}
],
"return_taxes": [
{
"uid": "5f28485a-7f85-4cf5-9b4e-0bdf26335159",
"catalog_object_id": "5AJT7TEVPIM6MZNEGXAVDERG",
"catalog_version": 1712074131960,
"name": "Cincinnati, OH",
"type": "ADDITIVE",
"percentage": "7.8",
"applied_money": {
"amount": 460,
"currency": "USD"
},
"scope": "LINE_ITEM"
}
]
}
],
"return_amounts": {
"total_money": {
"amount": 6360,
"currency": "USD"
},
"tax_money": {
"amount": 460,
"currency": "USD"
},
"discount_money": {
"amount": 0,
"currency": "USD"
},
"tip_money": {
"amount": 0,
"currency": "USD"
},
"service_charge_money": {
"amount": 0,
"currency": "USD"
}
},
"net_amounts": {
"total_money": {
"amount": -6360,
"currency": "USD"
},
"tax_money": {
"amount": -460,
"currency": "USD"
},
"discount_money": {
"amount": 0,
"currency": "USD"
},
"tip_money": {
"amount": 0,
"currency": "USD"
},
"service_charge_money": {
"amount": 0,
"currency": "USD"
}
},
"refunds": [
{
"id": "YakFtkIkBd7iSlgO1Lr1nXXjFuuvCBAJJUlyshO85tO",
"location_id": "5JTA18FX53G3M",
"transaction_id": "zls8ETfFzvdngiJ9HJO1EtUVaaPZY",
"tender_id": "H3aI00JtO5aCWUhkyXWjdF9e0gTZY",
"created_at": "2024-04-06T13:40:13Z",
"reason": "Returned Goods",
"amount_money": {
"amount": 6360,
"currency": "USD"
},
"status": "APPROVED"
}
],
"source": {},
"net_amount_due_money": {
"amount": 0,
"currency": "USD"
}
}
}