Mapping of REST services to storefront checkout actions
The Aurora starter store uses REST services throughout the checkout process. The actions for each page map to a REST service. The following pages are included:
- Shopping cart page (B2C)
- Current order page (B2B)
- Shipping and billing method page (B2C)
- Shipping and billing method page (B2B)
- Order summary page (B2C)
- Order summary page (B2B)
- Quick order page
- Free gift page
- Quick checkout page
Note: The Free gift page is included only if the promotion type is available to customers.
Shopping cart page (B2C)
Checkout actions:Checkout actions
Page action HTTP URL Sample parameters More information Change Attributes POST AjaxRESTOrderItemDelete calculationUsage=-1,-2,-3,-4,-5,-6,-7 catalogId=10052 langId=-1 orderId=. orderItemId=40001 requesttype=ajax storeId=10001
AjaxRESTOrderItemDelete deletes the order item for which the attributes need to be changed. POST AjaxRESTOrderItemAdd calculationUsage=-1,-2,-3,-4,-5,-6,-7 catEntryId=10056 catalogId=10052 langId=-1 orderId=. quantity=1 requesttype=ajax storeId=10001
AjaxRESTOrderItemAdd adds a new order item using the SKU for the changed attributes. Select your free gift POST AjaxRESTOrderRewardOptionUpdate calculationUsage=-1,-2,-5,-6,-7 catEntryId=10094 catEntryId=10040 orderId=15001 quantity=1 requesttype=ajax rewardOptionId=1 storeId=10001
- AjaxRESTOrderRewardOptionUpdate adds the selected SKU as a free gift into the cart.
- Multiple gifts can be applied by repeating the catEntryId parameter.
Continue Checkout GET RESTOrderItemUpdate URL=https://hostname/webapp/wcs/stores/ servlet/UnregisteredCheckoutView?catalogId=10052 allocate=*** backorder=*** calculateOrder=1 calculationUsage=-1,-2,-3,-4,-5,-6,-7 check=*n errorViewName=AjaxOrderItemDisplayView guestChkout=1 langId=1 orderId=. orderItemId=30004 remerge=*** storeId=10001
- Check out as guest.
- RESTOrderItemUpdate performs order calculation and inventory checks.
- The following parameters control ATP inventory: allocate, backorder, check. See OrderItemUpdate URL.
- The following order abbreviations are used: ***, *n. See Order abbreviations.
- UnregisteredCheckoutView is the first page of the guest user checkout flow. It enables users to enter shipping and billing information for the order.
Logon and Checkout POST Logon URL=https://hostname/webapp/wcs/stores/ servlet/RESTMoveOrderItem?updatePrices=0 &calculationUsageId=-1&createIfEmpty=1 &deleteIfEmpty=*&continue=1&toOrderId=. &fromOrderId=* &URL=RESTOrderCalculate%3FURL=https://hostname /webapp/wcs/stores/servlet/OrderShippingBillingView ?shipmentType=single&catalogId=10052&langId=-1&storeId =10001&calculationUsageId=-1&calculationUsageId=-2 &calculationUsageId=-7 catalogId=10052 errorViewName=AjaxOrderItemDisplayView logonId=xxxx logonPassword=xxxxxxx reLogonURL=AjaxOrderItemDisplayView storeId=10001
- Check out as registered user.
- Use the URL parameter to form a command chain. First Logon, then RESTMoveOrderItem merges the guest cart with the registered user's cart, and then OrderShippingBillingView displays the shopping cart.
URL to API mapping:
URL to API mapping
URL REST resource REST method Link to API Command mapping RESTOrderItemUpdate cart PUT /store/{storeId}/cart/@self/update_order_item cart OrderItemUpdateCmd RESTMoveOrderItem cart PUT /store/{storeId}/cart/move_order_item cart OrderItemMoveCmd AjaxRESTOrderItemDelete cart PUT /store/{storeId}/cart/@self/delete_order_item cart OrderItemUpdateCmd AjaxRESTOrderItemAdd cart POST /store/{storeId}/cart cart OrderItemAddCmd AjaxRESTOrderRewardOptionUpdate cart PUT /store/{storeId}/cart/@self/update_reward_option cart RewardChoiceUpdateCmd
Current order page (B2B)
Checkout actions:Checkout actions
Page action HTTP URL Sample parameters More information Change Attributes POST AjaxRESTOrderItemDelete calculationUsage=-1,-2,-3,-4,-5,-6,-7 catalogId=10052 langId=-1 orderId=. orderItemId=40001 requesttype=ajax storeId=10001
AjaxRESTOrderItemDelete deletes the order item for which the attributes need to be changed. POST AjaxRESTOrderItemAdd calculationUsage=-1,-2,-3,-4,-5,-6,-7 catEntryId=10056 catalogId=10052 langId=-1 orderId=. quantity=1 requesttype=ajax storeId=10001
AjaxRESTOrderItemAdd adds a new order item using the SKU for the changed attributes. Select your free gift POST AjaxRESTOrderRewardOptionUpdate calculationUsage=-1,-2,-5,-6,-7 catEntryId=10094 orderId=15001 quantity=1 requesttype=ajax rewardOptionId=1 storeId=10001
AjaxRESTOrderRewardOptionUpdate adds the selected SKU as a free gift into the cart. Check out GET RESTOrderItemUpdate remerge=*** check=*n allocate=*** backorder=*** calculationUsage=-1,-2,-3,-4,-5,-6,-7 calculateOrder=1 orderItemId=35001 errorViewName=AjaxOrderItemDisplayView orderId=. URL=https://localhost/webapp/wcs/stores/servlet/ OrderShippingBillingView?shipmentType=single &catalogId=10251&langId=-1&storeId=10801
- Check out as registered B2B user.
- RESTOrderItemUpdate performs order calculation and inventory check.
- The following parameters control ATP inventory: allocate, backorder, check. See OrderItemUpdate URL
- The following order abbreviations are used: ***, *n. See Order abbreviations.
- The URL parameter is used to construct a command chain. For example, when RESTOrderItemUpdate is finished, it forwards to OrderShippingBillingView to show the shopping cart.
URL to API mapping:
URL to API mapping
URL REST resource REST method Link to API Command mapping RESTOrderItemUpdate cart PUT /store/{storeId}/cart/@self/update_order_item cart OrderItemUpdateCmd AjaxRESTOrderItemDelete cart PUT /store/{storeId}/cart/@self/delete_order_item cart OrderItemUpdateCmd AjaxRESTOrderItemAdd cart POST /store/{storeId}/cart cart OrderItemAddCmd AjaxRESTOrderRewardOptionUpdate cart PUT /store/{storeId}/cart/@self/update_reward_option cart RewardChoiceUpdateCmd
Shipping and billing method page (B2C)
Checkout actions:Checkout actions
Page action HTTP URL Sample parameters More information Select your free gift POST AjaxRESTOrderRewardOptionUpdate calculationUsage=-1,-2,-3,-4,-5,-6,-7 catEntryId=18044 orderId=14001 quantity=1 requesttype=ajax rewardOptionId=3 storeId=10801
AjaxRESTOrderRewardOptionUpdate changes the SKU as a free gift in the cart. Apply promotion code POST AjaxRESTPromotionCodeApply catalogId=10251 finalView=AjaxOrderItemDisplayView langId=-1 orderId=14001 promoCode=gggt requesttype=ajax storeId=10801 taskType=A
- AjaxRESTPromotionCodeApply applies a promotion code to the current order (shopping cart).
- taskType = A denotes an Apply operation.
Next POST AjaxRESTOrderPrepare catalogId=10251 langId=-1 requesttype=ajax storeId=10801
AjaxRESTOrderPrepare finalizes the order, including price, shipping, tax, and promotions. Then, it locks the order so that it is ready for submission. POST AjaxRESTOrderPIAdd account=4111111111111111 authToken=3006%2CQB64kwGO0u0CPr9d%2FMdUA9ZOoxw%3D billing_address_id=12304 catalogId=10251 cc_brand=MasterCard cc_cvc=555 expire_month=09 expire_year=2024 langId=-1 payMethodId=Master Card piAmount=13.09000 requesttype=ajax storeId=10801
AjaxRESTOrderPIAdd creates a payment instruction, including payment method and amount. An order can be paid for using multiple payment methods, each covering part of the order total amount. URL to API mapping:
URL to API mapping
URL REST resource REST method Link to API Command mapping AjaxRESTPromotionCodeApply assigned_promotion_code POST /store/{storeId}/cart/@self/assigned_promotion_code assigned_promotion_code PromotionCodeAddRemoveControllerCmd AjaxRESTOrderPrepare cart PUT /store/{storeId}/cart/@self/precheckout cart OrderPrepareCmd AjaxRESTOrderPIAdd payment_instruction POST /store/{storeId}/cart/@self/payment_instruction payment_instruction PIAddCmd AjaxRESTOrderRewardOptionUpdate cart PUT /store/{storeId}/cart/@self/update_reward_option cart RewardChoiceUpdateCmd
Shipping and billing method page (B2B)
Checkout actions:Checkout actions
Page action HTTP URL Sample parameters More information Change your free gift POST AjaxRESTOrderRewardOptionUpdate calculationUsage=-1,-2,-3,-4,-5,-6,-7 catEntryId=18044 orderId=14001 quantity=1 requesttype=ajax rewardOptionId=3 storeId=10801
AjaxRESTOrderRewardOptionUpdate changes the SKU as a free gift in the cart. Apply promotion code POST AjaxRESTPromotionCodeApply catalogId=10251 finalView=AjaxOrderItemDisplayView langId=-1 orderId=14001 promoCode=gggt requesttype=ajax storeId=10801 taskType=A
- AjaxRESTPromotionCodeApply applies a promotion code to the current order (shopping cart).
- taskType = A denotes an Apply operation.
Next POST AjaxRESTOrderPrepare catalogId=10251 langId=-1 requesttype=ajax storeId=10801
AjaxRESTOrderPrepare finalizes the order, including price, shipping, tax, and promotions. Then, it locks the order so that it is ready for submission. POST AjaxRESTOrderPIAdd account=4111111111111111 authToken=3006%2CQB64kwGO0u0CPr9d%2FMdUA9ZOoxw%3D billing_address_id=12304 catalogId=10251 cc_brand=MasterCard cc_cvc=555 expire_month=09 expire_year=2024 langId=-1 payMethodId=Master Card piAmount=13.09000 requesttype=ajax storeId=10801
AjaxRESTOrderPIAdd creates a payment instruction, including payment method and amount. An order can be paid for using multiple payment methods, each covering part of the order total amount. URL to API mapping:
URL to API mapping
URL REST resource REST method Link to API Command mapping AjaxRESTPromotionCodeApply assigned_promotion_code POST /store/{storeId}/cart/@self/assigned_promotion_code assigned_promotion_code PromotionCodeAddRemoveControllerCmd AjaxRESTOrderPrepare cart PUT /store/{storeId}/cart/@self/precheckout cart OrderPrepareCmd AjaxRESTOrderPIAdd payment_instruction POST /store/{storeId}/cart/@self/payment_instruction payment_instruction PIAddCmd AjaxRESTOrderRewardOptionUpdate cart PUT /store/{storeId}/cart/@self/update_reward_option cart RewardChoiceUpdateCmd
Order summary page (B2C)
Checkout actions:Checkout actions
Page action HTTP URL Sample parameters More information Order POST AjaxRESTOrderSubmit catalogId=10052 langId=-1 notifyMerchant=1 notifyOrderSubmitted=1 notifyShopper=1 orderId=13001 requesttype=ajax storeId=10001
- AjaxRESTOrderSubmit submits the order by reserving inventory and authorizing payment, and changing the order status.
- The following parameters notify others of the order: notifyMerchant, notifyOrderSubmitted, notifyShopper.
URL to API mapping:
URL to API mapping
URL REST resource REST method Link to API Command mapping AjaxRESTOrderSubmit cart POST /store/{storeId}/cart/@self/checkout cart OrderProcessCmd
Order summary page (B2B)
Checkout actions:Checkout actions
Page action HTTP URL Sample parameters More information Order POST AjaxRESTOrderSubmit catalogId=10052 langId=-1 notifyMerchant=1 notifyOrderSubmitted=1 notifyShopper=1 orderId=13001 requesttype=ajax storeId=10001
- AjaxRESTOrderSubmit submits the order by reserving inventory and authorizing payment, and changing the order status.
- The following parameters notify others of the order: notifyMerchant, notifyOrderSubmitted, notifyShopper.
URL to API mapping:
URL to API mapping
URL REST resource REST method Link to API Command mapping AjaxRESTOrderSubmit cart POST /store/{storeId}/cart/@self/checkout cart OrderProcessCmd
Quick order page
Checkout actions:Checkout actions
Page action HTTP URL Sample parameters More information Order POST AjaxRESTOrderAddPreConfigurationToCart calculateOrder=0 catalogId=10052 langId=-1 partNumber_1=HVT038_380201 quantity_1=1 requesttype=ajax storeId=10001
AjaxRESTOrderAddPreConfigurationToCart adds an item into the shopping cart. The item can be a configured dynamic kit, but also can be a normal SKU. In this sample, it is a normal SKU. URL to API mapping:
URL to API mapping
URL REST resource REST method Link to API Command mapping AjaxRESTOrderAddPreConfigurationToCart cart POST /store/{storeId}/cart/@self/add_preconfiguration_to_cart cart OrderProcessCmd
Free gift page
Checkout actions:Checkout actions
Page action HTTP URL Sample parameters More information Apply POST AjaxRESTOrderRewardOptionUpdate calculationUsage=-1,-2,-3,-4,-5,-6,-7 catalogId=10052 langId=-1 orderId=. orderItemId=80001 requesttype=ajax storeId=10001
AjaxRESTOrderItemDelete adds the selected SKU as a free gift into the cart.. URL to API mapping:
URL to API mapping
URL REST resource REST method Link to API Command mapping AjaxRESTOrderRewardOptionUpdate cart PUT /store/{storeId}/cart/@self/update_reward_option cart RewardChoiceUpdateCmd
Quick checkout page
Checkout actions:Checkout actions
Page action HTTP URL Sample parameters More information Select shipping address POST AjaxRESTOrderShipInfoUpdate addressId=11801 allocate =*** backorder=*** calculateOrder=1 calculationUsage=-1,-2,-3,-4,-5,-6,-7 catalogId=10052 check=*n langId=-1 orderId=. remerge=*** requesttype=ajax storeId=10001
- addressId denotes the selected address ID.
- The following parameters control ATP inventory: allocate, check, backorder, remerge. See OrderItemUpdate URL.
- The following order abbreviations are used: ***, *n. See Order abbreviations.
Select shipping mode POST AjaxRESTOrderShipInfoUpdate allocate=*** backorder=*** calculateOrder=1 calculationUsage=-1,-2,-3,-4,-5,-6,-7 catalogId=10052 check=*n langId=-1 orderId=. remerge=*** requesttype=ajax shipModeId=10053 storeId=10001
- shipModeId denotes the selected shipping mode ID.
- The following parameters control ATP inventory: allocate, check, backorder, remerge. See OrderItemUpdate URL.
- The following order abbreviations are used: ***, *n. See Order abbreviations.
Apply promotion code POST AjaxRESTPromotionCodeApply catalogId=10251 finalView=AjaxOrderItemDisplayView langId=-1 orderId=14001 promoCode=gggt requesttype=ajax storeId=10801 taskType=A
- AjaxRESTPromotionCodeApply applies a promotion code to the current order (shopping cart).
- taskType = A denotes an Apply operation.
Back GET RESTOrderCalculate calculationUsageId=-1&updatePrices=1&catalogId=10052 &errorViewName=AjaxCheckoutDisplayView&orderId=.&langId=-1 &storeId=10001&URL=https://localhost/webapp/wcs/stores /servlet/AjaxCheckoutDisplayView
Re-calculates the order, then forwards it to the Shopping Cart page. Next POST AjaxRESTOrderPrepare catalogId=10251 langId=-1 requesttype=ajax storeId=10801
AjaxRESTOrderPrepare finalizes the order, including price, shipping, tax, and promotions. Then, it locks the order so that it is ready for submission. POST AjaxRESTOrderPIAdd account=4111111111111111 authToken=3006%2CQB64kwGO0u0CPr9d%2FMdUA9ZOoxw%3D billing_address_id=12304 catalogId=10251 cc_brand=MasterCard cc_cvc=555 expire_month=09 expire_year=2024 langId=-1 payMethodId=Master Card piAmount=13.09000 requesttype=ajax storeId=10801
AjaxRESTOrderPIAdd creates a payment instruction, including payment method and amount. An order can be paid for using multiple payment methods, each covering part of the order total amount. URL to API mapping:
URL to API mapping
URL REST resource REST method Link to API Command mapping AjaxRESTOrderShipInfoUpdate assigned_promotion_code POST /store/{storeId}/cart/@self/assigned_promotion_code assigned_promotion_code OrderItemUpdateCmd AjaxRESTPromotionCodeApply cart PUT /store/{storeId}/cart/@self/precheckout cart PromotionCodeAddRemoveControllerCmd RESTOrderCalculate payment_instruction POST /store/{storeId}/cart/@self/payment_instruction payment_instruction OrderCalculateCmd AjaxRESTOrderPrepare cart PUT /store/{storeId}/cart/@self/update_reward_option cart OrderPrepareCmd AjaxRESTOrderPIAdd payment_instruction POST /store/{storeId}/cart/@self/payment_instruction payment_instruction PIAddCmd
Related reference
Aurora starter store site flows
Checkout flows