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.

 

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

  1. One silly question: how did you know the “region_id”: 19 ? The other ones can be found, but if i have another application and i want to integrate with this, how do i know then?

  2. Thank you so much, it works but I have questions:
    – Why product quantity does not decrease after place order?
    – How to buy configurable products?

  3. How to place order store wise using API? In my case there are 2 stores.
    1. English
    2. Arabic store

    Now, I want to place order on arabic store using API.

    Can you please help me with this issue?

Leave a Reply