Operations on shopping cart

Get sidebar shopping cart
GET /Component/Index?Name=SidebarShoppingCart

Request Type: GET

Enter the request URL: http://StoreURL/Component/Index?Name=SidebarShoppingCart

Headers: X-Response-View: Json, Content-Type: application/json

Auth type: Bearer Token - paste the token generated in the previous steps

How to get current shopping cart?
GET /cart

Request Type: GET

Enter the request URL:  http://StoreURL/cart

Headers: X-Response-View: Json, Content-Type: application/json

Auth type: Bearer Token - paste the token generated in the previous steps

As a result we will get whole shopping cart with additional informations, settings and products that customer added.

How to add product to the cart
POST /addproducttocart/details/{productid}/1

POST /addproducttocart/catalog/{productid}/1?quantity=1

Request Type: POST

Enter the request URL:  http://storeurl/addproducttocart/details/{productid}/1 / http://storeurl/addproducttocart/catalog/{productid}/1?quantity=1

Headers: X-Response-View: Json, Content-Type: application/json

Auth type: Bearer Token - paste the token generated in the previous steps

Body: In the case of the first example, which adds the product to the cart directly from the product details page, you need to use the "form-data" type of body field. In the key field, you should enter addtocart_productid.EnteredQuantity and in the value field, you should enter the quantity that you would like to add to the cart. In the second case, when you want to add the product to the cart directly from catalog pages, you just need to provide the additional parameter "quantity" and change the URL part from "details" to "catalog". Adding products to the cart from the products details page gives you the possibility to add them with selected attributes. 

How to add product to the wishlist
POST /addproducttocart/details/{productid}/2

POST /addproducttocart/catalog/{productid}/2?quantity=1

Request Type: POST

Enter the request URL:  http://storeurl/addproducttocart/details/{productid}/2 / http://storeurl/addproducttocart/catalog/{productid}/2?quantity=1

Headers: X-Response-View: Json, Content-Type: application/json

Auth type: Bearer Token - paste the token generated in the previous steps

Body: In the case of the first example, which adds the product to the wishlist directly from the product details page, you need to use the "form-data" type of body field. In the key field, you should enter addtocart_productid.EnteredQuantity and in the value field, you should enter the quantity that you would like to add to the wishlist. In the second case, when you want to add the product to the wishlist directly from catalog pages, you just need to provide the additional parameter "quantity" and change the URL part from "details" to "catalog". Adding products to the wishlist from the products details page gives you the possibility to add them with selected attributes. 


How to make an order via API

How to save shipping address

POST /checkout/SaveShipping/

Request Type: POST

Enter the request URL:  http://StoreURL/checkout/SaveShipping/

Headers: X-Response-View: Json, Content-Type: application/json

Auth type: Bearer Token - paste the token generated in the previous steps

Body: In the body field, use form-data, we need to specify some fields, that are required to save shipping address. The exact match of fields depends on your in-store configuration. However, in the default installation, below fields should work:

BillToTheSameAddress : true/false

shipping_address_id: 

ShippingNewAddress.Id: 

ShippingNewAddress.FirstName: 

ShippingNewAddress.LastName: 

ShippingNewAddress.Email: 

ShippingNewAddress.Company: 

ShippingNewAddress.CountryId: 

ShippingNewAddress.StateProvinceId: 

ShippingNewAddress.City: 

ShippingNewAddress.Address1: 

ShippingNewAddress.Address2: 

ShippingNewAddress.ZipPostalCode: 

ShippingNewAddress.PhoneNumber: 

PickUpInStore: false/true

How to save shipping method

POST /checkout/SaveShippingMethod/

Request Type: POST

Enter the request URL:  http://storeurl/checkout/SaveShippingMethod/

Headers: X-Response-View: Json, Content-Type: application/json

Auth type: Bearer Token - paste the token generated in the previous steps

Body: In the body field, use form-data, we need to specify some fields, that are required to save shipping method.

shippingoption: Ground___Shipping.FixedRate (or any other available shipping method)

How to save payment method

POST /checkout/SavePaymentMethod/

Request Type: POST

Enter the request URL:  http://storeurl/checkout/SavePaymentMethod/

Headers: X-Response-View: Json, Content-Type: application/json

Auth type: Bearer Token - paste the token generated in the previous steps

Body: In the body field, use form-data, we need to specify some fields, that are required to save payment method.

paymentmethod: Payments.CashOnDelivery

How to save payment info

POST /checkout/SavePaymentInfo/

Request Type: POST

Enter the request URL:  http://storeurl/checkout/SavePaymentInfo/

Headers: X-Response-View: Json, Content-Type: application/json

Auth type: Bearer Token - paste the token generated in the previous steps

How to confirm order

POST /checkout/ConfirmOrder/

Request Type: POST

Enter the request URL:  http://storeurl/checkout/ConfirmOrder

Headers: X-Response-View: Json, Content-Type: application/json

Auth type: Bearer Token - paste the token generated in the previous steps