Fields_to_clear not updating the order

I’m using the updateOrder (2023-03-15) API with fields_to_clear array and trying to clear an applied discount on a line item but it won’t clear. I have tried it from my application and the API Explorer. I’m passing in the uid of the line item and the uid of the applied discount.

{
“order”: {
“fields_to_clear”: [
“line_items[HpdyBC1qNXUxL45lLuFsEC].applied_discounts[fCcgLE60H3cKIt5vkPhpVB]”
],

I’m not getting an error but it also isn’t updating. What am I missing?

What’s the order_id your trying to update? :slightly_smiling_face:

Looks like what I did was put the fields_to_clear under order and it should be on the same level as order. Fixed it.

Glad to hear you figured it out. :slightly_smiling_face: