How to Create order using Rest API Magento 2?

Magento 2 is robust, scalable and multi feature enable eCommerce platform. You can create Sales Order Using a third party software to Magento 2 backend.
Using below payload you can create sales order using any third party platform to Magento 2. you Just need to pass below payload in your request with PUT data. I have pass data like shipping method with flatrate shipping, Added Custom discount Shopping cart Rule and COD as a payment method in payload request.

Once Order Create using API,

Check Create Invoice Using Magento 2 REST API
Check Create Shipment Using Magento 2 REST API

 

We have taken reference for “Push It Messenger Bag” simple product in Magento 2 from Sample data.

Request: {YOUR_URL}/rest/V1/orders/create

Type: PUT

Body:

When you run API using above payload,
You got the response from success order data with order_increment id as below format.

 

3 Replies to “How to Create order using Rest API Magento 2?”

Leave a Reply

Your email address will not be published. Required fields are marked *