Reputation: 241
I am using the Shopware 6 B2b Suite and i want to access the budgets api. I call this url http://localhost/store-api/b2b/debtor/{debtorIdentifier}/budget which points to b2b_budget.api_controller::getList
I set the header sw-access-key
But the response is :
{
"errors": [
{
"status": "403",
"code": "CHECKOUT__CUSTOMER_NOT_LOGGED_IN",
"title": "Forbidden",
"detail": "Customer is not logged in.",
"meta": {
"parameters": []
}
}
]
}
Can you tell me what i am missing ? how can i log in as a customer when making an api call (in this case with postman) ?
Upvotes: 0
Views: 141
Reputation: 1022
It seems that you first need to login first.
Use the following endpoint to login: {{host}}/store-api/account/login
Then pass the context-token in addition to the sw-access-key:
Upvotes: 0