In this blog, We going to to create customer using REST API.First we need to admin token to get customer info.We can refer blog for generate admin tokenhttps://www.magedad.com/magento-2-how-to-generate-admin-token-using-rest-api/ Rest API endpoint = https://domain.test/rest/V1/customersRest API endpoint for store(default is store code) = https://domain.test/rest/default/V1/customers Method = POSTContent type = Content-Type:application/jsonHeader = Authorization: Bearer xxxx_admin_token_xxxx Post Data = Examples:The following image shows a customer create by a REST client: Here is simple php code for call API. This…
In this blog we will get customer data by customer id using REST API.First we need to admin token to get customer info.We can refer blog for generate admin tokenhttps://www.magedad.com/magento-2-how-to-generate-admin-token-using-rest-api/ Rest API endpoint = https://domain.test/rest/V1/customers/:customerIdRest API endpoint for store(default is store code) = https://domain.test/rest/default/V1/customers/:customerId Method = GETContent type = Content-Type:application/jsonHeader = Authorization: Bearer xxxx_admin_token_xxxx Examples:The following image shows a get customer using customer id by a REST client: Here is simple php code for call…
In this blog, we will call rest api for get customer list in magento2.First we need to generate admin token to get customer.You can refer blog for generate admin tokenhttps://www.magedad.com/magento-2-how-to-generate-admin-token-using-rest-api/ Rest API endpoint = https://domain.test/rest/V1/customers/searchMethod = GETContent type = Content-Type:application/jsonHeader = Authorization: Bearer xxxx_token_xxxxParams =searchCriteria[sortOrders][0][field]=entity_idsearchCriteria[sortOrders][0][direction]=ascExample:The following image shows a get customer list using a REST client. I hope this blog is useful to get customer list using Rest API. In case, I missed anything or…
TES
In this blog I will show you how we can generate admin token using REST API.Rest API endpoint = https://domain.test/rest/V1/integration/admin/tokenMethod: POSTContent type = Content-Type:application/jsonPost Data = {“username”:”<USER-NAME>”, “password”:”<PASSWORD>”} Example:The following image shows a token request for the admin account using a REST client: We can refer adobe commerce document for generate tokens.I hope this blog is useful to generate admin token using Rest API. In case, I missed anything or need to add some more…