Demandware OCAPI reorder

I created a small program that helps identify orders in Demandware that have the wrong status, for example: (status: new, open, completed and delivery status: not sent, sent).

I just use order_search from OCAPI and compare the results with our ERP.

However, now I want to automate some status fixing, which will require me to use the calls / orders / {order_no} GET and PATCH, however when I do this, I get the following message:

{ type: 'AccessWithoutUserForbiddenException', message: 'An authenticated user is required in order to access resource.' } 

According to the docs, the OAUTH for order_search uses: “Authentication through the OAuth token.”, However orders / {order_no} use: “Authentication through the OAuth token. A valid user is required.”

So, what would be the right strategy for becoming a valid user?

+5
source share
1 answer

The valid user for obtaining oAuth tokens is the Business Manager user. Therefore, please log in to Business Manager and create a new user for your use cases and provide the necessary permissions.

After that, you will be able to perform certain resources.

Christian

+1
source

Source: https://habr.com/ru/post/1260380/


All Articles