View Single Post
  #4  
Old 01-31-2019, 05:23 AM
  tony_sologubov's Avatar 
tony_sologubov tony_sologubov is offline
 

X-Cart team
  
Join Date: Jan 2009
Posts: 2,431
 

Default Re: Add to cart with api

Hi @georgio,

Here is the example of the request of adding a product to cart via REST API:

Code:
admin.php?target=RESTAPI&_key=test&_path=orderitem/0&_method=post&model[order][order_id]=8&model[object][product_id]=13&model[discountedSubtotal]=10.00

8 is the ID of the order/cart, 13 is the ID of the product, 10.00 is the price of a product, with which it will be added into the cart.

Hopefully, it will help.

Tony
__________________
Found a bug in X-Cart? Post it to our bug tracker!
Know how to make X-Cart better? Suggest an idea!
Reply With Quote