Hello @siddhant _jain
Request: {YOUR_URL}/rest/V1/orders/create
Type: PUT
Body:
{
"entity": {
"base_currency_code": "USD",
"base_discount_amount": -4.5,
"base_grand_total": 45.5,
"base_shipping_amount": 5,
"base_subtotal": 45,
"base_tax_amount": 0,
"customer_email": "rakesh@rakeshjesadiya.com",
"customer_firstname": "rakesh",
"customer_group_id": 1,
"customer_id": 2,
"customer_is_guest": 0,
"customer_lastname": "jesadiya",
"customer_note_notify": 1,
"discount_amount": -4.5,
"email_sent": 1,
"coupon_code": "Test1",
"discount_description": "Test1",
"grand_total": 45.5,
"is_virtual": 0,
"order_currency_code": "USD",
"shipping_amount": 5,
"shipping_description": "Flat Rate - Fixed",
"state": "new",
"status": "pending",
"store_currency_code": "USD",
"store_id": 1,
"store_name": "Main Website\nMain Website Store\n",
"subtotal": 45,
"subtotal_incl_tax": 45,
"tax_amount": 0,
"total_item_count": 1,
"total_qty_ordered": 1,
"weight": 1,
"items": [
{
"base_discount_amount": 4.5,
"base_original_price": 45,
"base_price": 45,
"base_price_incl_tax": 45,
"base_row_invoiced": 0,
"base_row_total": 45,
"base_tax_amount": 0,
"base_tax_invoiced": 0,
"discount_amount": 4.5,
"discount_percent": 10,
"free_shipping": 0,
"is_virtual": 0,
"name": "Push It Messenger Bag",
"original_price": 45,
"price": 45,
"price_incl_tax": 45,
"product_id": 14,
"product_type": "simple",
"qty_ordered": 1,
"row_total": 45,
"row_total_incl_tax": 45,
"sku": "24-WB04",
"store_id": 1
}
],
"billing_address": {
"address_type": "billing",
"city": "Ahmedabad",
"company": "Rbj",
"country_id": "US",
"email": "rakesh@rakeshjesadiya.com",
"firstname": "rakesh",
"lastname": "jesadiya",
"postcode": "30332",
"region": "Georgia",
"region_code": "GA",
"region_id": 19,
"street": [
"Street 1",
"Street 2"
],
"telephone": "123456"
},
"payment": {
"method": "cashondelivery" // Change payment method according to you
},
"extension_attributes": {
"shipping_assignments": [
{
"shipping": {
"address": {
"address_type": "shipping",
"city": "Ahmedabad",
"company": "Rbj",
"country_id": "US",
"customer_address_id": 2,
"email": "rakesh@rakeshjesadiya.com",
"firstname": "rakesh",
"lastname": "jesadiya",
"postcode": "30332",
"region": "Georgia",
"region_code": "GA",
"region_id": 19,
"street": [
"Street 1",
"Street 2"
],
"telephone": "123456"
},
"method": "flatrate_flatrate"
}
}
]
}
}
}
Take reference from here :
https://www.rakeshjesadiya.com/how-to-create-order-using-rest-api-magento-2/#:~:text=Using%20below%2...
Problem Solved ? Click on 'Kudos' & Accept as Solution !