Requires write_orders access scope.
For more info, refer to:
POST https://{handle}.myshopline.com/admin/openapi/v20260301/orders/order_edit_remove_line_item_discount.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 string required
    The field must be set to the fixed value application/json; charset=utf-8.
  • Authorization string required
    The access token for the API resource. Refer to App authorization to obtain the access token, and then pass the obtained token in the Bearer format.
    Example:
    Bearer eyJhbGciOiJIUzUxMiJ9.eyJhcHBLZXkiOiJmMjM3OWQyMTYyOGMzM2QxMWRiMWZkYjY5N2EzZjdjMjZlNGMwYTA5Iiwic2VsbGVySWQiOiIyMDAwMjM0ODgwIiwic3RvcmVJZCI6IjE2NzIzNjk3Mjk2MDYiLCJ2ZXJzaW9uIjoiVjIiLCJkb21haW4iOiJodHRwczovL3NsLW9wZW4tc2cubXlzaG9wbGluZS5jb20iLCJ0aW1lc3RhbXAiOjE2NzUzMTk0OTI0MzksImlzcyI6Inlzb3VsIiwiZXhwIjoxNzY5OTI3NDkyfQ.UwQzomM2veGCUaOZ0paUxq5dpc7DXuhHYFvsQ_uIAKduzWcb_j2E4q_36El83sp145D4cKbpcE5KCeeIz-JNQw
Request Body
  • requestobject required
    Request body
  • discount_application_id string required
    Discount id
    Example: 6067339620932655420
  • id string required
    Edit order draft order id , you can get it from call order editing-start interface return parameters
    Example: 21098923432423423423
Status Codes
For the complete list of codes and messages, see Http status code.

Response Headers
  • traceId
    A globally unique identifier for the request. It is used to track the request flow throughout the system, allowing for easy location and debugging when issues arise.
Response Body
  • user_errorsobject[]
    Error prompt information of this editor , if there is an error in the execution , it will be return in this field , and the call can be tried again according to the error code ( note : try again and need to start the interface from the order_edit.json order editing to start the whole set of
  • message string
    Error message
    Example: unauthorized access
  • code string
    The wrong code , if the implementation result is wrong , it will be return the wrong code through this field , and the call can be tried again according to the wrong code ( note : try again and need to start the interface from the order_edit.json order editing to start the whole set of editing order
    Example: UNAUTHORIZED_ACCESS
  • field array
    The path to the input field that caused the error. leads to the path of incorrect input fields
    Example: ["[\"id\"]"]
  • calculated_line_itemobject
    Product information for this editor
  • added_discount_staged_changeobject
    Product line custom discount information
  • percent_value string
    Percentage Discount value , two decimal points between 0-1 , such as 0.2=20%off as the discount is the percentage type , this item is worth it
    Example: 0
  • description string
    Discount description
    Example: customized discount
  • fixed_valueobject
    The Discount value of the fixed amount supports two decimal points . the discount is the fixed amount type , which is worthwhile
  • currency_code string
    Currency
    Example: USD
  • amount string
    Amount , two precision double type strings
    Example: 5.99
  • id string
    Discount id
    Example: 6068787948765604961
  • id string
    Order editing Product line id in draft order
    Example: 6068787943765994592
  • original_unit_price_setobject
    Original price , no application favorable price
  • presentment_moneyobject
    Market currency amount information
  • currency_code string
    Currency
    Example: USD
  • amount string
    Value of amount , 2- bit accuracy string
    Example: 10.0
  • shop_moneyobject
    Store currency amount information
  • amount string
    Value of amount , 2- bit accuracy string
    Example: 10.0
  • currency_code string
    Currency
    Example: USD
  • quantity string
    Quantity
    Example: 11
  • required_shipping boolean
    Shipping or not
    Example: true
  • taxable boolean
    Tax or not required
    Example: true
  • title string
    Product title
    Example: normal item
  • variant_id string
    Product sku
    Example: 18057243001210740422372124
  • calculated_orderobject
    Edit order draft order information
  • committed boolean
    Have submitted save to order or not
    Example: true
  • id string
    Order editing draft order id
    Example: 2106068787725276328168095160459272
API Explorer
https://openapiceshidianpu.myshopline.com/admin/openapi/v20260301

ParamOptions

header required

Body

required
{
  "request": {
    "discount_application_id": "6067339620932655420",
    "id": "21098923432423423423"
  }
}

Language

curl --request POST \
--url https://openapiceshidianpu.myshopline.com/admin/openapi/v20260301/orders/order_edit_remove_line_item_discount.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?