question

webforte avatar image
webforte asked David Marginian commented

Discount Api Error

HI

WHen apply discount showing 401 error.

Please checking what i do something wrong.


1636365111789.png

e-commerce api
1636365111789.png (53.5 KiB)
10 |2000 characters needed characters left characters exceeded

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

David Marginian avatar image
David Marginian answered

https://clover.com is not the correct base url, you need to be using https://api.clover.com.. This is discussed in the link I previously sent - https://docs.clover.com/docs/401-unauthorized.

10 |2000 characters needed characters left characters exceeded

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

David Marginian avatar image
David Marginian answered

The Orders Write permission is required to add a discount. More information on solving 401s can be found here - https://docs.clover.com/docs/401-unauthorized.

10 |2000 characters needed characters left characters exceeded

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

webforte avatar image
webforte answered David Marginian commented

Hi
Checked with all api
But i am using ecom api same issue . when i am try to get discount to entire order. showing 401 error
1636453636178.png1636453786539.png

and unable to checked this checkbox.


1636453636178.png (51.4 KiB)
1636453786539.png (66.6 KiB)
4 comments
10 |2000 characters needed characters left characters exceeded

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

All that is required is Orders write, I just tested. In the screenshot in your original post you have hard-coded "mid" and "orderid" in the url. Those are obviouisly not valid, so I assume that is your problem. You need to pass the actual Clover merchant uuid and the Clover order uuid.

0 Likes 0 ·
webforte avatar image webforte David Marginian ♦♦ ·

i am using actual Clover merchant uuid and the Clover order uuid.
its just for not show to public

0 Likes 0 ·
webforte avatar image webforte David Marginian ♦♦ ·

HI

please reply


0 Likes 0 ·

Please see the accepted answer.

0 Likes 0 ·

Welcome to the
Clover Developer Community