How to use Group By and Having Clause SQL query in magento 2?

Magento Group By SQL query used to fetch the same set of values from a specified column. While We use group by clause with aggregate function

We must have to use the Having clause and where clause is not used with Group By Aggregrate functions. Continue reading “How to use Group By and Having Clause SQL query in magento 2?”

How to fixed GraphQl response The account sign-in was incorrect or your account is disabled temporarily in Magento?

Magento has added new features called GraphQl from the Magento 2.3 version.

While working with Magento GraphQl feature for the generating customer token, you might be facing the error, Continue reading “How to fixed GraphQl response The account sign-in was incorrect or your account is disabled temporarily in Magento?”

How to delete customer group id by REST Web API Magento 2?

Customer is assigned to customer group id in Magento. By default when you create a customer, it has assigned to Default (General) Customer group id.

If you want to delete a customer group id without going to the admin panel, you need to help of REST web API to delete it.

Magento REST Web API provides the Out of the box feature to delete customer group id by its Id.

You have to pass Header as Admin Token to delete customer group id in Magento.

INTERESTING FACTS:
You can’t delete customer group id with 0 (NOT LOGGED IN) and 1 (DEFAULT(GENERAL)).

EndPoint URL: <HOST_URL>/rest/V1/customerGroups/:id
(http://127.0.0.1/magento243/rest//V1/customerGroups/5 Where 5 is the customer group id to delete.)

Action: DELETE

Header: Authorization Bearer <Admin_TOKEN>

Payload Body: None

Response: True/False.

Once you delete the customer group id, the customer has been assigned automatically to the Default(General).