Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.

Adobe Commerce | Using Magento Commerce APIs to fetch Customer ID

Avatar

Level 7

Hi all,
I was using Adobe Commerce Integration Framework in my AEM instance along with Commerce OOTB react SPA object. We were using Magento APIs for fetching user data at multiple places in the website. 
While using the graphql queries of magento , when we were fetching ID using the query 

 

query Customer { customer { id email firstname middlename lastname date_of_birth gender }}

In the documentation it give id as deprecated. And thus id parallel to customers comes null.

Is this what is its returning generally now that its deprecated or is there an issue from our side?
Or is there any other approach that we need to follow now to fetch customer ID from magento?

I was able to find one approach in which I would need to use the Magento rest API with query parameters to fetch user info using Admin Credentials.

{magento-domain}/rest/V1/customers/search?searchCriteria[filterGroups][0][filters][0][field]=email&searchCriteria[filterGroups][0][filters][0][value]=demouser1@test.com&searchCriteria[filterGroups][0][filters][0][conditionType]=eq

 

Which I don't think is appropriate.

0 Replies