cancel
Showing results for 
Search instead for 
Did you mean: 

REST API Place Order

   Did you know you can see the translated content as per your choice?

Translation is in progress. Please check again after few minutes.

REST API Place Order

Hi There

 

I am using Magento 2 REST API to place an order I have called following APIs (on the default cart):

 

1. rest/V1/carts/$cartID/billing-address - Returns ID

2. rest/V1/carts/$cartID/shipping-information - Returns payment methods and etc

3. rest/V1/carts/$cartID/shipping-methods - Returns shipping methods & rate

4.rest/V1/carts/$cartID/order - ERROR

 

All working perfectly fine apart from the order API where I keep getting the following error message:

 

"stdClass Object ( [message] => Please enter a customer email. [trace] => #0 /var/www/test/vendor/magento/module-eav/Model/Entity/VersionControl/AbstractEntity.php(90): ".

 

Thanks!!

2 REPLIES 2

Re: REST API Place Order

Hi @abhimarkan

 

Do you mind to share how you create Quote?

Re: REST API Place Order

At first glance it would look like you are missing a POST request to 

rest/default/V1/guest-carts/$cartID/payment-information

OR

rest/default/V1/carts/mine/payment-information

(for a logged in user)

which in the standard checkout would trigger the creation of the order.