question

tekwi avatar image
tekwi asked chanel Deactivated commented

** Unable to delete a lineitem within an order

I am trying to delete a lineitem created within an order. API method called - DELETE /v3/merchants/{mId}/orders/{orderId}/line_items/{lineItemId} returned an empty object. Also, the lineitem was not deleted in that order.
Am I missing anything?
OrdersLineItems
8 comments
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

keithryanwong avatar image keithryanwong commented ·

Hi @tekwi, can you post the related code?

Thanks,

Keith

0 Likes 0 ·
tekwi avatar image tekwi commented ·
Hi Keith,
curl -H "Content-Type: application/json" -X DELETE https://api.clover.com:443/v3/merchants/xys/orders/xyz
/line_items/xyz?access_token=xyz
0 Likes 0 ·
keithryanwong avatar image keithryanwong tekwi commented ·

Are you testing on a sandbox account? If so the URL you want to use is https://apisandbox.clover.com:443/..., instead of https://api.clover.com:443/...

Please let me know if this helps.

0 Likes 0 ·
tekwi avatar image tekwi keithryanwong commented ·

It's a live account. I created and order, and added lineitems just fine. Delete wouldn't work.

0 Likes 0 ·
tekwi avatar image tekwi commented ·
Has anyone had this issue? I'm able to delete an order; not the lineitems within the order.
0 Likes 0 ·
chanel avatar image chanel tekwi commented ·

Getting an empty object is expected and the line item should have been removed from the original order. Can you make sure that you're modifying an open order ("state": "open")? How are you checking if the line item is deleted afterwards?

0 Likes 0 ·
tekwi avatar image tekwi chanel commented ·

When I do a get order, the line items are shown even after deleting them

0 Likes 0 ·
Show more comments

0 Answers

Welcome to the
Clover Developer Community