# Documentation ShoppingService Entities and methods to handle baskets and payments. Version: 1.1 ## Servers ``` https://customer-slug.api-se.norce.tech/commerce/shopping/1.1 ``` ## Download OpenAPI description [Documentation ShoppingService](https://docs.norce.io/_spec/api-reference/services/shoppingservice/openapi.yaml) ## Basket ### Clear basket - [POST /ClearBasket](https://docs.norce.io/api-reference/services/shoppingservice/openapi/basket/clearbasket.md): Removes all items from the basket. ### Close basket for post purchases - [POST /CloseBasketForPostPurchaseUpsell](https://docs.norce.io/api-reference/services/shoppingservice/openapi/basket/closebasketforpostpurchaseupsell.md): Closes the basket for post purchase. ### Create basket - [POST /CreateBasket](https://docs.norce.io/api-reference/services/shoppingservice/openapi/basket/createbasket.md): Creates a new Basket. ### Delete a basket - [POST /DeleteBasket](https://docs.norce.io/api-reference/services/shoppingservice/openapi/basket/deletebasket.md): Sets the status of the basket to Deleted. Deleted baskets will not be available in the API. Only normal baskets can be deleted. ### Remove item from basket - [POST /DeleteBasketItem](https://docs.norce.io/api-reference/services/shoppingservice/openapi/basket/deletebasketitem.md): Remove a specific item/line from a basket ### Delete a saved basket - [POST /DeleteSavedBasket](https://docs.norce.io/api-reference/services/shoppingservice/openapi/basket/deletesavedbasket.md) ### Get a basket - [GET /GetBasket](https://docs.norce.io/api-reference/services/shoppingservice/openapi/basket/getbasket.md): Gets a Basket by id. Returns null if not found. ### Insert an item in a basket - [POST /InsertBasketItem](https://docs.norce.io/api-reference/services/shoppingservice/openapi/basket/insertbasketitem.md) ### Insert several items in a basket - [POST /InsertBasketItems](https://docs.norce.io/api-reference/services/shoppingservice/openapi/basket/insertbasketitems.md) ### Insert a strucutre item into basket - [POST /InsertBasketItemWithChildren](https://docs.norce.io/api-reference/services/shoppingservice/openapi/basket/insertbasketitemwithchildren.md): Used to insert a structure article into bakset with calculation of it's children ### Insert items into a basket post purchase - [POST /InsertItemsPostPurchase](https://docs.norce.io/api-reference/services/shoppingservice/openapi/basket/insertitemspostpurchase.md): Adds the provided items to the already checked out basket and updates the authorization for the payment. Calling this mehtod will close the basket. ### Check if post purchase is possible - [GET /IsPostPurchasePossbile](https://docs.norce.io/api-reference/services/shoppingservice/openapi/basket/ispostpurchasepossbile.md): Should be called before deciding whether to show post purchase functionality on the redirect page. This call is needed becuase it is not until the purchase is done that we can anwser this. Note that even if we anwser yes here the call to InsertItemsPostPurchase might fail regardless, since the PSP can reject the update even if it should be possible (due to risk assesments etc). ### List baskets by status - [GET /ListBasketsByStatus](https://docs.norce.io/api-reference/services/shoppingservice/openapi/basket/listbasketsbystatus.md): Returns a paged basket list for specified customer, company or sales contact. ### List basket statuses - [GET /ListBasketStatuses](https://docs.norce.io/api-reference/services/shoppingservice/openapi/basket/listbasketstatuses.md): Lists the available basket statuses. ### List basket types - [GET /ListBasketTypes](https://docs.norce.io/api-reference/services/shoppingservice/openapi/basket/listbaskettypes.md): Lists the available basket types. ### List saved baskets for a customer - [GET /ListSavedBaskets](https://docs.norce.io/api-reference/services/shoppingservice/openapi/basket/listsavedbaskets.md): List saved baskets for a specific customer ### Save a basket - [POST /SaveBasket](https://docs.norce.io/api-reference/services/shoppingservice/openapi/basket/savebasket.md): Save a initiated basket ### Attest a basket - [POST /SetAttestBasket](https://docs.norce.io/api-reference/services/shoppingservice/openapi/basket/setattestbasket.md) ### Update a basket (v2) - [POST /UpdateBasket2](https://docs.norce.io/api-reference/services/shoppingservice/openapi/basket/updatebasket2.md): Updates status, contact, order reference, comment, discount code, currencyCode and sales area. Does not update any customer data. Use UpdateBuyer/UpdatePayer/UpdateShipTo to change customer data for a Basket. ### Update a basket item - [POST /UpdateBasketItem](https://docs.norce.io/api-reference/services/shoppingservice/openapi/basket/updatebasketitem.md): Updates a BasketItem on the specified basket. Don't propagate quantity updates to child items. Use UpdateBasketItemQuantityWithChildren for updating basket item with child items if you want all child items to follow parent item quantity update. ### Update a structure basket item quantity - [POST /UpdateBasketItemQuantityWithChildren](https://docs.norce.io/api-reference/services/shoppingservice/openapi/basket/updatebasketitemquantitywithchildren.md): Updates quantity of basket item and multiplies child items quantity so they follow the quantity change of the parent item. ### Update several basket items - [POST /UpdateBasketItems](https://docs.norce.io/api-reference/services/shoppingservice/openapi/basket/updatebasketitems.md): Updates all supplied BasketItems on the specified basket. ## Checkout ### Create a payment - [POST /CreatePayment](https://docs.norce.io/api-reference/services/shoppingservice/openapi/checkout/createpayment.md): Used when adding payments to a PayLater type of transaction. ### Get checkout object for a basket - [GET /GetCheckout](https://docs.norce.io/api-reference/services/shoppingservice/openapi/checkout/getcheckout.md): Get a checkout object for a specific basket. ### Get checkout object for a basket (v2) - [GET /GetCheckout2](https://docs.norce.io/api-reference/services/shoppingservice/openapi/checkout/getcheckout2.md): Get a checkout object for a specific basket. ### Get a checkout for form based payments - [POST /GetPaymentForm](https://docs.norce.io/api-reference/services/shoppingservice/openapi/checkout/getpaymentform.md): GetPaymentForm starts a forms based checkout by populating a code snippet in some of the RedirectParameters. If the checkout supports modifications of the Storm basket in any way, a new call to GetPaymentForm must be made in order to update the code snippet with correct values. See Checkout Form Payment for more information about the checkout process. ### Check balance of gift card - [POST /PaymentGiftCardCheck](https://docs.norce.io/api-reference/services/shoppingservice/openapi/checkout/paymentgiftcardcheck.md): PaymentGiftCardCheck checks current balance of a gift card. The balance is returned in Response.RedirectParameters with name = 'Balance'. The Currency is returned with name = 'CurrencyCode'. ### Purchase a basket - [POST /Purchase](https://docs.norce.io/api-reference/services/shoppingservice/openapi/checkout/purchase.md): Purchase a basket ### Purchase a basket (extended) - [POST /PurchaseEx](https://docs.norce.io/api-reference/services/shoppingservice/openapi/checkout/purchaseex.md): PurchaseEx works as Purchase with the additional parameter paymentParameters. This method should be used when overriding the configured values for selected payment methods. See Payments for more information about the checkout process. ### Purchase a basket (extended, v2) - [POST /PurchaseEx2](https://docs.norce.io/api-reference/services/shoppingservice/openapi/checkout/purchaseex2.md): PurchaseEx2 works as Purchase with the additional parameter paymentParameters. This method should be used when overriding the configured values for selected payment methods. See Payments for more information about the checkout process. ### Update buyer information - [POST /UpdateBuyer](https://docs.norce.io/api-reference/services/shoppingservice/openapi/checkout/updatebuyer.md): Updates Buyer information on a basket. If no Payer is associated with the Basket or the Payer is the same as the Buyer then Payer will also be updated. The same applies to ShipTo. ### Update buyer information (v2) - [POST /UpdateBuyer2](https://docs.norce.io/api-reference/services/shoppingservice/openapi/checkout/updatebuyer2.md): Updates Buyer information on a basket. If no Payer is associated with the Basket or the Payer is the same as the Buyer then Payer will also be updated. The same applies to ShipTo. ### Update delivery method - [POST /UpdateDeliveryMethod](https://docs.norce.io/api-reference/services/shoppingservice/openapi/checkout/updatedeliverymethod.md): Updates the selected DeliveryMethod on a basket. The DeliveryMethod id should be taken from any valid DeliveryMethod in Checkout.DeliveryMethods. ### Update delivery method (v3) - [POST /UpdateDeliveryMethod3](https://docs.norce.io/api-reference/services/shoppingservice/openapi/checkout/updatedeliverymethod3.md): Updates the selected DeliveryMethod on a basket. The DeliveryMethod id should be taken from any valid DeliveryMethod in Checkout.DeliveryMethods. ### Update delivery method (v4) - [POST /UpdateDeliveryMethod4](https://docs.norce.io/api-reference/services/shoppingservice/openapi/checkout/updatedeliverymethod4.md): Updates the selected DeliveryMethod on a basket. The DeliveryMethod id should be taken from any valid DeliveryMethod in Checkout.DeliveryMethods. ### Update payer information - [POST /UpdatePayer](https://docs.norce.io/api-reference/services/shoppingservice/openapi/checkout/updatepayer.md): Updates Payer information on a basket. This should be used when Payer differs from Buyer. ### Update payer information (v2) - [POST /UpdatePayer2](https://docs.norce.io/api-reference/services/shoppingservice/openapi/checkout/updatepayer2.md): Updates Payer information on a basket. This should be used when Payer differs from Buyer. ### Update payment method - [POST /UpdatePaymentMethod](https://docs.norce.io/api-reference/services/shoppingservice/openapi/checkout/updatepaymentmethod.md): Updates the selected payment on a basket. The payment id should be taken from any valid PaymentMethod in Checkout.PaymentMethods. ### Update payment method (v2) - [POST /UpdatePaymentMethod2](https://docs.norce.io/api-reference/services/shoppingservice/openapi/checkout/updatepaymentmethod2.md): Updates the selected payment on a basket. The payment id should be taken from any valid PaymentMethod in Checkout.PaymentMethods. ### Update delivery information - [POST /UpdateShipTo](https://docs.norce.io/api-reference/services/shoppingservice/openapi/checkout/updateshipto.md): Updates ShipTo information on a basket. This should be used when ShipTo differs from Buyer. ### Update delivery information (v2) - [POST /UpdateShipTo2](https://docs.norce.io/api-reference/services/shoppingservice/openapi/checkout/updateshipto2.md): Updates ShipTo information on a basket. This should be used when ShipTo differs from Buyer. ## DeliveryMethods ### List delivery methods by basket - [GET /ListDeliveryMethodsByBasket](https://docs.norce.io/api-reference/services/shoppingservice/openapi/deliverymethods/listdeliverymethodsbybasket.md) ### List delivery methods by basket (v2) - [GET /ListDeliveryMethodsByBasket2](https://docs.norce.io/api-reference/services/shoppingservice/openapi/deliverymethods/listdeliverymethodsbybasket2.md) ### List delivery methods by product (v2) - [GET /ListDeliveryMethodsByProduct2](https://docs.norce.io/api-reference/services/shoppingservice/openapi/deliverymethods/listdeliverymethodsbyproduct2.md) ## InfoTypes ### List basket info types - [GET /ListBasketInfoTypes](https://docs.norce.io/api-reference/services/shoppingservice/openapi/infotypes/listbasketinfotypes.md): Lists the info type ids used in Basket.Info. ### List basket item info types - [GET /ListBasketItemInfoTypes](https://docs.norce.io/api-reference/services/shoppingservice/openapi/infotypes/listbasketiteminfotypes.md): Lists the info type ids used in Basket.Items.Info. ## OnHand ### List external availability on products in basket - [POST /ListExternalProductOnHandByBasket](https://docs.norce.io/api-reference/services/shoppingservice/openapi/onhand/listexternalproductonhandbybasket.md): Checks the actual on hand status for the products in the basket in the customers back end system. If no backend is configured then this is equal to calling ListProductOnHandByBasket. ### List availability on products in basket - [POST /ListProductOnHandByBasket](https://docs.norce.io/api-reference/services/shoppingservice/openapi/onhand/listproductonhandbybasket.md): Lists OnHand data based on basket items. Only deliverable items will be regarded. The result is a list of ProductOnHand where each product has a list of warehoues matching the warehouse specification passed in. ProductOnHand.Variants will always be null when getting this data for a basket. OnHand for each warehouse will always be returned whether or not the warehouse has the item or not. OnHand.IsActive = false indicates the item does not exist at the warehouse so only active OnHands should be used when checking availability. ## OrderRequest ### Get order request - [GET /GetOrderRequest](https://docs.norce.io/api-reference/services/shoppingservice/openapi/orderrequest/getorderrequest.md): GetOrderRequest can be used on any 'Thanks for you order page' to get the actual order request used when creating the order. This can be used in combination with GetCheckout to get the last Checkout object as well. ## Payments ### Payment callback call - [POST /PaymentCallback](https://docs.norce.io/api-reference/services/shoppingservice/openapi/payments/paymentcallback.md): This method should be called when receiving a callback from the payment provider. The paymentParameters should be populated with received parameters. This method creates the order. If order should be created on report from payment service provider then use PaymentCallback2. See Payments for more information about the checkout process. ### Payment callback call (v2) - [POST /PaymentCallback2](https://docs.norce.io/api-reference/services/shoppingservice/openapi/payments/paymentcallback2.md): This method should be called when receiveing a callback from the payment provider. The paymentParameters should be populated with received parameters. This method does not create the order. The report from the payment service provider must be handled with PaymentComplete to create the order. See Payments for more information about the checkout process. ### Cancel a payment - [POST /PaymentCancel](https://docs.norce.io/api-reference/services/shoppingservice/openapi/payments/paymentcancel.md): This method should be called when receiving a callback from the payment provider when the payment has been cancelled in some way. ### Payment complete call - [POST /PaymentComplete](https://docs.norce.io/api-reference/services/shoppingservice/openapi/payments/paymentcomplete.md): This method should be called when receiving a http-report from the payment service provider. The paymentParameters should be populated with received parameters. This method creates the order. PSPs calls the API directly and this method should never be called directly from the application. ### Payment callback for form based payments - [POST /PaymentFormCallback](https://docs.norce.io/api-reference/services/shoppingservice/openapi/payments/paymentformcallback.md): PaymentFormCallback is called from applications using forms based checkouts with support for callbacks. Applications gets called when the end-user gets routed back to a 'Thanks for you order page' and the applications should make this call to the API before routing. See Checkout Form Payments for more information about the checkout process. ### Payment complete call for form based payments - [POST /PaymentFormComplete](https://docs.norce.io/api-reference/services/shoppingservice/openapi/payments/paymentformcomplete.md): PaymentFormComplete is called directly from any PSP supporting forms based checkouts with support for completes. Applications should never make this call directly. ### Reserve amount on gift card - [POST /PaymentGiftCardReserve](https://docs.norce.io/api-reference/services/shoppingservice/openapi/payments/paymentgiftcardreserve.md): Reserve an amount on a gift card. ### Cancel gift card reservation. Used internally. - [POST /PaymentGiftCardRollback](https://docs.norce.io/api-reference/services/shoppingservice/openapi/payments/paymentgiftcardrollback.md) ### Validate a payment - [POST /PaymentValidate](https://docs.norce.io/api-reference/services/shoppingservice/openapi/payments/paymentvalidate.md): This method gets called from PSPs supporting validation callbacks. Storm API makes a preliminary validation by validating the checkout. Checks are for basket status and valid promotions plus all other validations with regard to customer information. No result is returned if validation passes and an exception with both Exceptions below aggregated will be raised if any validation fails. ### Validate a payment (v2) - [POST /PaymentValidate2](https://docs.norce.io/api-reference/services/shoppingservice/openapi/payments/paymentvalidate2.md): This method gets called from PSPs supporting validation callbacks. Storm API makes a preliminary validation by validating the checkout. Checks are for basket status and valid promotions plus all other validations with regard to customer information. No result is returned if validation passes and an exception with both Exceptions below aggregated will be raised if any validation fails. ## Promotions ### Get a promotion - [GET /GetPromotion](https://docs.norce.io/api-reference/services/shoppingservice/openapi/promotions/getpromotion.md): Gets a promotion. ### List promotion image types - [GET /ListPromotionImageTypes](https://docs.norce.io/api-reference/services/shoppingservice/openapi/promotions/listpromotionimagetypes.md): Lists the ids for all supported promotion image types. ### List promotion requirement types - [GET /ListPromotionRequirementTypes](https://docs.norce.io/api-reference/services/shoppingservice/openapi/promotions/listpromotionrequirementtypes.md): Lists the ids for all supported promotion requirement types. ### List active promotions - [GET /ListPromotions](https://docs.norce.io/api-reference/services/shoppingservice/openapi/promotions/listpromotions.md): Lists active promotions. ### List promotions by basket - [GET /ListPromotionsByBasket](https://docs.norce.io/api-reference/services/shoppingservice/openapi/promotions/listpromotionsbybasket.md): Lists all promotions where any BasketItem is either in a requirement or in an effect for the promotion. Fulfilled promotions are excluded from the result. Promotions based on discount codes, customer or company are also excluded. This can be used to display promotions not yet fulfilled in a Checkout. ## Subscriptions ### Create subscription - [POST /CreateSubscription](https://docs.norce.io/api-reference/services/shoppingservice/openapi/subscriptions/createsubscription.md): Creates a new Subscription. The Subscription will be inactive. To activate a Subscription the Checkout process must be used. See PurchaseSubscription. ### Delete a subscription - [POST /DeleteSubscription](https://docs.norce.io/api-reference/services/shoppingservice/openapi/subscriptions/deletesubscription.md): Sets the status of the subscription and Template basket to Deleted. Deleted subscriptions will not be available in the API. Any registered recurring payments with a PSP will be cleared. ### Get a subscription - [GET /GetSubscription](https://docs.norce.io/api-reference/services/shoppingservice/openapi/subscriptions/getsubscription.md): Gets a Subscription by subscription id. ### Get a subscription by basket id - [GET /GetSubscriptionByBasket](https://docs.norce.io/api-reference/services/shoppingservice/openapi/subscriptions/getsubscriptionbybasket.md): Gets a Subscription by it's template basket. This can be used in a order confirmed page where only a basketId is know. Baskets with TypeId TemplateBasket (3) should use use this method to get the Subscription. ### Get subscription schedule meta data - [GET /GetSubscriptionScheduleData](https://docs.norce.io/api-reference/services/shoppingservice/openapi/subscriptions/getsubscriptionscheduledata.md): Gets meta data for scheduling Subscriptions. ### List subscriptions for a customer - [GET /ListSubscriptions](https://docs.norce.io/api-reference/services/shoppingservice/openapi/subscriptions/listsubscriptions.md): Lists all Subscriptions for a customer. ### List subscription statuses - [GET /ListSubscriptionStatus](https://docs.norce.io/api-reference/services/shoppingservice/openapi/subscriptions/listsubscriptionstatus.md): Gets meta data for scheduling Subscriptions. ### List subscription types - [GET /ListSubscriptionTypes](https://docs.norce.io/api-reference/services/shoppingservice/openapi/subscriptions/listsubscriptiontypes.md): Lists all active and valid SubscriptionTypes for the application. ### Purchase a subscription - [POST /PurchaseSubscription](https://docs.norce.io/api-reference/services/shoppingservice/openapi/subscriptions/purchasesubscription.md): PurchaseSubscription activates a subscription by initializing a payment process equal to the one for normal Baskets. When a Subscription is activated orders will be created according to the Schedules specified for the Subscription. ### Update a subscription - [POST /UpdateSubscription](https://docs.norce.io/api-reference/services/shoppingservice/openapi/subscriptions/updatesubscription.md): Updates a Subscription. The TemplateBasket will be ignored. Use regular API-methods for baskets to change the TemplateBasket.