Order return created via API is not displayed in web admin

Valentine_K
New Member
2 0 0

Hello.

I created order refund with item return via API POST /admin/api/2021-04/orders/{order_id}/refunds.json, with body

{
  "shipping": {
    "amount": "0.00",
    "tax": "0.00",
    "maximum_refundable": "0.00"
  },
  "duties": [],
  "total_duties_set": {
    "shop_money": {
      "amount": "0.00",
      "currency_code": "USD"
    },
    "presentment_money": {
      "amount": "0.00",
      "currency_code": "USD"
    }
  },
  "refund_line_items": [
    {
      "quantity": 1,
      "line_item_id": 10119360086167,
      "location_id": 61327245463,
      "restock_type": "return",
      "price": "12.95",
      "subtotal": "12.95",
      "total_tax": "0.00",
      "discounted_price": "12.95",
      "discounted_total_price": "129.50",
      "total_cart_discount_amount": "0.00"
    }
  ],
  "transactions": [
    {
      "order_id": 3973428510871,
      "kind": "refund",
      "gateway": "manual",
      "parent_id": 4894922506391,
      "amount": 12.95,
      "currency": "USD",
      "maximum_refundable": "17.70"
    }
  ],
  "currency": "USD",
  "notify": true
}


Refund is displayed in web admin. but return is not.
When I created return via web admin, it is displayed.

When get order data via API, I see both refunds and them line items have restock type "return".

0 Likes