Number of APIs: 6
1. Get cart
GET {{baseUrl}}/cart
Service urls:
http://yourdomain.com/api/rest/cart
OR
http://yourdomain.com/index.php?route=rest/cart/cart
POST {{baseUrl}}/cart
Service urls:
http://yourdomain.com/api/rest/cart
OR
http://yourdomain.com/index.php?route=rest/cart/cart
Sample cart item object:
productid=34 (iPod Shuffle)
productoptionid =235 (Size)
productoptionvalueid = 30 (Large){
product_id
: 34
,
quantity
: 1
,
option
:
{
235
: 30
}
}
Add recurring item to the cart: {
product_id
: 43
,
quantity
: 1
,
recurring_id
: 2
}
Option for text field:
br>Option for date field:option
: {
238
:demo text
}option
: {
238
:2014-10-15
}
Option for checkbox field:option
: {
236
: [33
]
}
Option for checkbox field ( multiple selected ):option
: {
236
: [33
, 32
]
}
Option for select field:option
: {
235
:30
}
Option for radio field:option
: {
237
:35
}
And all together:option
: {
235
: 30
,
237
:34
,
238
:demo text
,
239
:2014-11-20
,
236
: [33
]
}
PUT {{baseUrl}}/cart
Service urls:
http://yourdomain.com/api/rest/cart
OR
http://yourdomain.com/index.php?route=rest/cart/cart
DELETE {{baseUrl}}/cart
Service urls:
http://yourdomain.com/api/rest/cart
OR
http://yourdomain.com/index.php?route=rest/cart/cart
The product key can be found in the response of the GET /cart API call.
DELETE {{baseUrl}}/cart/:key
Service urls:
http://yourdomain.com/api/rest/cart/{key}
OR
http://yourdomain.com/index.php?route=rest/cart/cart&key={key}
The product key can be found in the response of the GET /cart API call.
6. Empty cart
DELETE {{baseUrl}}/cart/empty
Service urls:
http://yourdomain.com/api/rest/cart/empty
OR
http://yourdomain.com/index.php?route=rest/cart/emptycart
ENDPOINTS