Requires write_orders access scope.
For more info , refer to:
POST https://{handle}.myshopline.com/admin/openapi/v20230301/order/refund.json
handle : The store's unique identifier, which is the prefix of the store's domain name. For example, if a store's domain name is open001.myshopline.com , the store handle is open001 .
Request Headers
  • Content-Type required
    The value of this field is fixed to application/json; charset=utf-8
  • Authorization string required
    The access token for the API. Please refer to App authorization to obtain the access token, and then put the obtained access token into the API request header in Bearer Token.
    Example:
    Bearer eyJhbGciOiJIUzUxMiJ9.eyJhcHBLZXkiOiJmMjM3OWQyMTYyOGMzM2QxMWRiMWZkYjY5N2EzZjdjMjZlNGMwYTA5Iiwic2VsbGVySWQiOiIyMDAwMjM0ODgwIiwic3RvcmVJZCI6IjE2NzIzNjk3Mjk2MDYiLCJ2ZXJzaW9uIjoiVjIiLCJkb21haW4iOiJodHRwczovL3NsLW9wZW4tc2cubXlzaG9wbGluZS5jb20iLCJ0aW1lc3RhbXAiOjE2NzUzMTk0OTI0MzksImlzcyI6Inlzb3VsIiwiZXhwIjoxNzY5OTI3NDkyfQ.UwQzomM2veGCUaOZ0paUxq5dpc7DXuhHYFvsQ_uIAKduzWcb_j2E4q_36El83sp145D4cKbpcE5KCeeIz-JNQw
Request Body
  • note string
    Refund Notes
    Example: Refund
  • notify boolean
    Send message notifications ( logic with existing b-end refund message )
    Example: true
  • order_id string required
    Order id
    Example: 21057520029298437725452511
  • refund_line_itemsobject[]
    Refund Product line information , can be associated with multiple Product lines
  • line_item_id long
    Product row id
    Example: 601
  • location_id string
    Product stock back place
    Example: 5409714787218633772
  • quantity long
    Trial refund Product quantity
    Example: 1
  • restock_type string
    Product inventory processing
    Example: return
  • type string required
    When making a refund in Product , you need to provide a Product delivery status Unshipped : Product has not shipped; Returned : the product has been returned;
    Example: Shipped
  • shippingobject
    Refund policy for shipping amount
  • amount string
    Specify refund amount
    Example: 1.23
  • full_refund boolean
    Return shipping fee or not
    Example: true
  • transactionsobject[] required
    Payment slip refund information
  • amount string
    Refund amount
    Example: 2.34
  • gateway string
    Payment channels
    Example: Paypal
  • id string
    Payment slip number , start with 230
    Example: 23057520029306658561302511
  • kind string
    Payment slip type
    Example: refund
  • type boolean
    Refund type , ture : refund on the original road
    Example: true
Response
For more information about status codes, see Http status code.

Response Headers
  • traceId
    traceId
Response Body
  • dataobject
    Data return body
  • create_at string
    Refund single creation time
    Example: 1673404700862
  • id string
    Refund id , unique recognition
    Example: 2605755870074105241861
  • note string
    Refund Notes
    Example: Notes
  • order_adjustmentsobject[]
    Adjust the order information
  • amount string
    Adjust the single amount
    Example: 2.34
  • amount_setobject
    Adjust the single amount according to the store currency and transaction currency
  • presentment_moneyobject
    Marketplace amount information
  • amount string
    Marketplace amount
    Example: 2.34
  • currency_code string
    Market currency
    Example: USD
  • shop_moneyobject
    Store amount information
  • amount string
    Store amount
    Example: 2.34
  • currency_code string
    Store currency
    Example: USD
  • id string
    Adjust single size
  • kind string
    Adjustment single type : refund_discrepancy、shipping_refund
    Example: refund_discrepancy
  • order_id string
    Order number for this adjustment of the single link
    Example: 21057520029298437725452511
  • reason string
    Adjustment reason : Refund discrepancy、shipping_refund
    Example: refund_discrepancy
  • refund_id string
    Refund id , unique recognition
  • tax_amount string
    Adjust the single tax amount
    Example: 978
  • tax_amount_setobject
    Adjust the single tax amount according to the store currency and transaction currency
  • presentment_moneyobject
    Marketplace amount information
  • amount string
    Marketplace amount information
    Example: 2.34
  • currency_code string
    Market currency
    Example: USD
  • shop_moneyobject
    Store amount information
  • amount string
    Store amount
    Example: 3.45
  • currency_code string
    Store currency
    Example: USD
  • order_id string
    Order number associated with this refund order
    Example: 21057520029298437725452511
  • refund_line_itemsobject[]
    Refund related Product line information
  • id long
    Product row id
  • line_item_id long
    The ID of the product snapshot table, generated by the system, uniquely confirms a product with the order number
    Example: 601
  • quantity long
    Refund Product quantity
    Example: 1
  • restock_type string
    Return- returns only not back
    Example: return
  • subtotal string
    Refund Product row total amount , accuracy 2
    Example: 3.45
  • subtotal_setobject
    Total amount of refund Product bank by store currency and transaction currency
  • presentment_moneyobject
    Marketplace amount information
  • amount string
    Marketplace amount
    Example: 1.23
  • currency_code string
    Market currency
    Example: USD
  • shop_moneyobject
    Store currency amount information
  • amount string
    Store amount
    Example: 2.36
  • currency_code string
    Store currency
    Example: USD
  • total_tax string
    Refund Product row tax total amount , accuracy 2
    Example: 4.56
  • total_tax_setobject
    Total amount of refund Product bank tax , sold in store currency and transaction currency
  • presentment_moneyobject
    Marketplace amount information
  • amount string
    Store amount
    Example: 3.24
  • currency_code string
    Store currency
    Example: USD
  • shop_moneyobject
    Store currency amount information
  • amount string
    Store amount
    Example: 6.14
  • currency_code string
    Store currency
    Example: USD
  • transactionsobject[]
    Refund payment slip information
  • amount long
    Refund amount , accuracy 2
  • create_at string
    Creation time
    Example: 1673404700862
  • currency string
    Payment currency
    Example: USD
  • id string
    Payment slip number
    Example: 23057520029306658561302511
  • kind string
    Payment slip type , here is only refund
    Example: refund
  • order_id string
    Order number for this adjustment of the single link
    Example: 21057520029298437725452511
  • processed_at string
    Refund order update time
    Example: 1673404700862
  • status string
    Handling status, pending, failure, success, and error
    Example: pending
API Explorer
https://openapiceshidianpu.myshopline.com/admin/openapi/v20230301

ParamOptions

— header required

Body

required
{
  "note": "Refund",
  "notify": true,
  "order_id": "21057520029298437725452511",
  "refund_line_items": [
    {
      "line_item_id": 601,
      "location_id": "5409714787218633772",
      "quantity": 1,
      "restock_type": "return",
      "type": "Shipped"
    }
  ],
  "shipping": {
    "amount": "1.23",
    "full_refund": true
  },
  "transactions": [
    {
      "amount": "2.34",
      "gateway": "Paypal",
      "id": "23057520029306658561302511",
      "kind": "refund",
      "type": true
    }
  ]
}

Language

curl --request POST \
--url https://openapiceshidianpu.myshopline.com/admin/openapi/v20230301/order/refund.json \
--header 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJhcHBLZXkiOiJmMjM3OWQyMTYyOGMzM2QxMWRiMWZkYjY5N2EzZjdjMjZlNGMwYTA5Iiwic2VsbGVySWQiOiIyMDAwMjM0ODgwIiwic3RvcmVJZCI6IjE2NzIzNjk3Mjk2MDYiLCJ2ZXJzaW9uIjoiVjIiLCJkb21haW4iOiJodHRwczovL3NsLW9wZW4tc2cubXlzaG9wbGluZS5jb20iLCJ0aW1lc3RhbXAiOjE2NzUzMTk0OTI0MzksImlzcyI6Inlzb3VsIiwiZXhwIjoxNzY5OTI3NDkyfQ.UwQzomM2veGCUaOZ0paUxq5dpc7DXuhHYFvsQ_uIAKduzWcb_j2E4q_36El83sp145D4cKbpcE5KCeeIz-JNQw' \
--header 'Content-Type: application/json; charset=utf-8' \
--header 'accept: application/json'
Was this article helpful to you?

Error loading component.

Error loading component.