question

chiragpatel avatar image
chiragpatel asked chiragpatel commented

create an order using rest api in postman

Hi,
i am trying to create an order using postman POST method with below URL and parameters

https://apisandbox.dev.clover.com/v3/merchants/mid/orders?access_token=token#
i am getting 401 Unauthorized in postman

i have also try with,
Authorization: bearer Token
state:open

but still showing error.
can you please provide examples or guidelines to create order ?
Orders
10 |2000

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

Dan avatar image
Dan answered Frank Faustino Deactivated commented
The link below has an example of how to test your token with curl, as well as showing how it should appear in the request header. If that works, then presumably something is wrong with how you are formatting your request.
https://docs.clover.com/clover-platform/docs/401-u...
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.

chiragpatel avatar image chiragpatel commented ·

i have already done this thing but it's not working.
i want to create an order but showing 401 unauthorized.

0 Likes 0 ·
Frank Faustino avatar image Frank Faustino ♦♦ chiragpatel commented ·

Try replacing "mid" in the URL with your merchant's ID, which you can find on the developer dashboard (see screenshot below).

0 Likes 0 ·
Lee Tickett avatar image
Lee Tickett answered chiragpatel commented
Where did you get the token from? Your app or manually generated? Make sure the token has the Orders->Write permission.
7 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.

chiragpatel avatar image chiragpatel commented ·

I am using postman to check or generate token and order.

I have generated token through postman. Also have read and write permission.

0 Likes 0 ·
Lee Tickett avatar image Lee Tickett chiragpatel commented ·

I don't quite follow. How do you generate a token in postman?

0 Likes 0 ·
chiragpatel avatar image chiragpatel Lee Tickett commented ·

https://apisandbox.dev.clover.com/oauth/token?client_id=<APP_ID>&client_secret=<APP_SECRET>&code=<CODE>;

by using above URL i have generated a token in postman.

Now, i am trying to use below URL to create order but it's getting 401 Unauthorized error.

https://apisandbox.dev.clover.com/v3/merchants/<MERCHANT_ID>/orders?access_token=<TOKEN>;

Also tried with "Authorization":"Bearer <Token>"

0 Likes 0 ·
Show more comments

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