0

Create New Order in Magento Store via Soap API call

The Magento provide official SOAP APIs, using with you can easily manage the your eCommerce store with resources like Products, Sales, Customers etc. In our previous post explained How to Integrate Magento API in PHP.

In this post we will explain you How to Create New Order in Magento Store as guest customer using soap api calls. Magento api has some cart api steps to achieve this.

Add New Sales Order in Magento Via Soap API

Step 1 :- First you need to create an empty cart using magento cart.create api request. Two arguments is required for this one is sessionId and other is your store id.

Step 2 :- Next step is set customer as guest for order using cart_customer.set api call. below are the required
parameters for that.

Step 3 :- Now set customer address for billing and shipping using cart_customer.addresses magento api call. Its guest user addresses, use below arguments for that.

Step 4 :- Now add shipping method and payment method for new magento order. Make sure shipping and payment method value belong to your magento store.

Step 5 :- Next step is adding order item in cart. Create an array which contain productID and Qty of cart item and
set it in api request using cart_product.add soap call.

Step 6 :- Last steps to create new order in magento store through cart.order api call. This will add an order data into magento store.

Complete Code To Add New Order in Magento Store Via SOAP API

For complete Magento API Documentation Follow this link:
http://devdocs.magento.com/guides/m1x/api/soap/introduction.html

Harish

I am professional web developer and blogger. Use this blog to share own api and other web development experience with you. I do accept paid work. Write to me to start working on your dream project - codefixup@gmail.com

Leave a Reply

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