How to create access token for Magento 2 Rest api programmatically?

For Access Magento 2 REST API, you need to first generate an access token. Access token used for synchronization with Magento to another third-party platform.

Without Access token, you can’t communicate with Magento 2. For Create access token you need to call POST action with Request payload. Your request URL will be rest/V1/integration/admin/token append to your site URL.

Continue reading “How to create access token for Magento 2 Rest api programmatically?”

Get sales order data using Graphql in Magento 2.

GraphQL is a new concept from Magento 2.3 version in Magento eCommerce. Using Graphql we can get sales order data. There are many default core module uses GraphQl for getting data like, Product, CMS Page, and Block, Customer module uses Graphql for getting data of a specific entity. Magento Doesn’t use GraphQl for Sales Specific entity in core module.

I have just demonstrated how to get order data using GraphQl in Magento 2 based on order id. We can get details of Order basic entity, billing address and shipping address and Used items in Order.

Continue reading “Get sales order data using Graphql in Magento 2.”