The addItemToOrder
actor-chain is used to add a single item to a customer’s shopping cart. It also is used to add an item from a customer’s gift/wish list to a shopping cart, as well as adding an item to an in-store pickup order:
Parameter | Description |
---|---|
| The catalog reference ID. |
| The ID of the product to add to the shopping cart. |
| The number of each product being added to the shopping cart. For example, two sweaters or four pairs of shoes. |
| Identifies the site associated with the product. |
| Used only for in-store pickup, identifies the location of the store. |
| This Boolean parameter is used only for adding wish list items to the shopping cart. |
| Used only for adding gift/wish list items. Identifies the list item ID. |
| The ID of the gift list. |
Add Item to Customer’s Order Example
curl -L -v -b agent_cookies.txt -H "Content-Type: application/json" -d "{ "catalogRefIds": "xsku1043","productId": "xprod1015","quantity": 1}" "http://localhost:8280/rest/model/atg/commerce/custsvc/order/CartModifierActor/ addItemToOrder"
Add Item to Customer’s In-Store Pickup Example
Note the use of the locationId
to identify the store from where the item will be picked up.
curl -L -v -b agent_cookies.txt -H "Content-Type: application/json" -d "{ "catalogRefIds" : "xsku2085", "productId" : "prod10004", "locationId" : "AventuraMall", "quantity": 8}" "http://localhost:8280/rest/model/atg/commerce/ custsvc/order/CartModifierActor/addItemToOrder"
Add Item From Customer’s Gift List Example
Note the use of the giftlistId
and the giftlistItemId
.
curl -L -v -b agent_cookies.txt -H "Content-Type: application/json" -d "{ "catalogRefIds" : "xsku2085", "productId" : "xprod2085", "giftlistId" : "gl40007", "giftlistItemId" : "gi40001", "quantity": 1}" "http://localhost:8280/rest/model/ atg/commerce/custsvc/order/CartModifierActor/addItemToOrder"
Add Item From Customer’s Wish List Example
This example is similar to the Gift List example, however it uses the addToWishlist
instead of the giftlistId
.
curl -L -v -b agent_cookies.txt -H "Content-Type: application/json" -d "{ "addToWishlist" : "true", "catalogRefIds" : "xsku2085", "productId" : "xprod2085", "giftlistItemId" : "gi40001", "quantity": 1}" "http://localhost:8280/rest/ model/atg/commerce/custsvc/order/CartModifierActor/addItemToOrder"