question

mankee10200 avatar image
mankee10200 asked David Marginian Deactivated commented

Update Discount on Order Returns Code 200 and does not update

I'm using the following endpoint to update an order: https://docs.clover.com/reference/orderupdateorder

I'm sending the following payload:

orderCart: {
    discounts: [
        {
            amount: -200,
            name: 'My Discount',
        },
    ],
},

I also tried:

    discounts: [
        {
            amount: -200,
            name: 'My Discount',
        },
    ],

According to the docs, this should work - but I just get a 200 response and no discount shows up on the order.

OrdersREST APIDiscounts
10 |2000

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

1 Answer

·
David Marginian avatar image
David Marginian Deactivated answered David Marginian Deactivated commented

orderCart? orderCart is not a property the endpoint you are using understands. The recommended API for creating orders is https://docs.clover.com/reference/ordercreateatomicorder more documentation on creating orders/discounts can be found here - https://docs.clover.com/docs/working-with-orders. If you need to add a discount to an exiting order you need to follow the documentation here - https://docs.clover.com/docs/creating-custom-orders#adding-discounts.

2 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.

mankee10200 avatar image mankee10200 commented ·
Alright - in that case I'd recommend updating that endpoint. It says it accepts "discount" as a parameter and it sends back a 200 without performing an update - it is very confusing.
0 Likes 0 ·
David Marginian avatar image David Marginian ♦♦ mankee10200 commented ·
I understand, and unfortunately this is something you will see through-out our documentation. The issue is well known but unfortunately not easy to fix.
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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

Welcome to the
Clover Developer Community