question

wisk avatar image
wisk asked David Marginian Deactivated answered

Trying to pull discounts but getting 403 forbidden even though we have read permissions on orders

Expanding on the question title,
We can pull line items no problem using the code:
https://api.clover.com/v3/merchants/Y3MRE510Q2XP1/orders?filter=modifiedTime>1630029803000&filter=modifiedTime<1630116203000&limit=1000&expand=lineItems

but when we try and add &expand=discounts to the end we receive a 403 forbidden error

We do have read permissions on orders which should include "For orders data, such as line items, order types, and discounts "

So any help would be grateful here as to where we are going wrong with this.

REST APILineItemsDiscounts
10 |2000

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 Deactivated answered

I just confirmed in the code that Payment Read is required for the discounts expansion. I Iwill create an issue for our documentation team.

1 comment
10 |2000

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

wisk avatar image wisk commented ·
Thank you!
0 Likes 0 ·
David Marginian avatar image
David Marginian Deactivated answered

In addition to orders read, I believe you need inventory read to retrieve discounts. When you add inventory read you will need to uninstall/re-install your app from the dashboard and obtain a new token.

10 |2000

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

wisk avatar image
wisk answered David Marginian Deactivated converted comment to answer

Hey David,
We currently have read/write permission on inventory also. We only dont have permission on payments and customers

1 comment
10 |2000

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 ♦♦ commented ·
Ok, the expansion permissions can be a bit tricky, I am guessing you need payments as well. Try adding that and then let me know and I will create an issue to get our documentation updated.


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