How do I create a customer access token if I don’t know the customer’s password? Additionally, my shop is b2b so uses the new login method that doesn’t use a password and sends a link directly to the email.
Hi! Are you looking to query the Customer Account API from within a customer account UI extension? If so, since the extension is already operating within the context of a logged in Customer, you don’t need to worry about dealing with the token.
You can check here for details on how to query the Customer Account API from inside your extension.
I’m actually looking to query it from Storefront API. I need to get the fulfillment statuses of the order, but customer account seems to only have fulfillments of the orders and not the status
I don’t think you can create a customer access token with Storefront API if you’re using new customer accounts.
You will need to use the Customer Account API, however as you mentioned the order object from the Customer Account API does not include fulfillmentStatus
whereas the Storefront API does.
This is a limitation that we also hit in a project and looks like an API limitation / gap?
You do have access the status
field of the Fulfilment object via the Customer Account API which may meet your needs.
You also do have access to the Storefront API from customer account extensions.
Hopefully this helps!
But I need the fulfillment status (like if it is on hold), and the only way to do that in storefront API is to get a customer access token (used as an argument), which like Lukeclifton said above doesn’t seem to be feasible? Is this just a limitation then?
You mention about access from within a customer account extension, but our use case was within a headless storefront where the API’s are not automatically authenticated.
Ah, so a limitation then. I was looking but I only saw shipping statuses, fulfillments, and even status on fulfillments didn’t have onHold as an option