raja
raja

Reputation: 189

How to get all orders in bigcommerce API 3

Hi I am using java to call rest api of Bigcommerce. How to get all orders from BIg commerce in api V3.

I know for V2. But I could not find the same in V3.I want to get all orders without providing order id.

Upvotes: 2

Views: 1165

Answers (2)

talexb
talexb

Reputation: 135

So I know this is a little late, but I thought I'd pass along how I got this to work just now. The part that doesn't seem to be conveyed very clearly is that the v2 API is available for stores that are required to use the v3 API -- you just have to use the v3 authentication in your request.

A v2 request uses (User, Password) in the basic authorization header, and in my case, for an existing v2 store, I use this URL:

https://www.mystore.com/api/v2/orders/78225

to get an order (where mystore is the real name).

A v3 request uses (X-Auth-Client, X-Auth-Token) in the header, and in my case, for a new v3 store, I use this URL:

https://api.bigcommerce.com/stores/mystorehash/v2/orders/722003

to get an order (where mystorehash is the store_hash that the BC documentation talks about).

Upvotes: 0

Karen White
Karen White

Reputation: 2153

There isn't currently a v3 equivalent for the v2 Orders endpoint. In v3 you can get transaction/payment data, but not the full order. We do have plans to build out the orders resource on the v3 API in the future.

In the meantime, best practice is to use v3 for resources that are available through v3, but use v2 for any resources that are still on v2 only (like Orders). The API is designed with interoperability in mind, and both versions of the API can be used within the same application.

Upvotes: 3

Related Questions