RandySK
RandySK

Reputation: 23

BigCommerce API Order Update What Scope is Required?

I am trying to update the status of an order.

curl -X PUT 
-H "Content-Type: application/json" 
-H "Accept: application/json" 
-H "X-Auth-Client: <auth client>" 
-H "X-Auth-Token: <auth token>" 
-H "X-Custom-Auth-Header: <auth header>" 
https://api.bigcommerce.com/stores/<store hash>/v2/orders/14222 
-d '{"status_id":2}'

I am getting the error:

{"status":403,"title":"You don't have a required scope to access the     endpoint","type":"https://developer.bigcommerce.com/api-docs/getting-started/api-status-codes","errors":{}}

We are using the same authorization that we use on all our other commands, which work fine.

Any ideas why it's saying we don't have the required scope?

Upvotes: 0

Views: 279

Answers (1)

Vishal Kumar
Vishal Kumar

Reputation: 1378

Update: Try this Code with your Creds

Note: Check the value of Auth Token & Auth Client ID. Or, try by removing Auth Client ID (If invalid) as it is optional to BigCommerce APIs.

curl --request PUT \
--url https://api.bigcommerce.com/stores/<storehash>/v2/orders/14222 \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'x-auth-token: <OAuthToken Value>' \
--data '{"status_id":11}'  

OR

curl -X PUT \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-Auth-Token: <oauth_token>" \
-H "X-Custom-Auth-Header: <custom_header_value>" \
https://api.bigcommerce.com/stores/<store_hash>/v2/orders/14222 \
-d '{"status_id":2}'

Upvotes: 1

Related Questions