Entities and methods to handle baskets and payments.
- Check if post purchase is possible
Documentation ShoppingService (1.1)
A comma separated list of internal pricelist ids to use, if any. PriceLists supplied must be valid, either from the application's public priceList or any customer or company priceLists or any valid client priceLists. For clients configured to use priceListSeed exclusively in the API only the supplied priceLists will be used. If this is not configured, the supplied priceLists will be appended to the valid priceLists. If none is supplied, the default value for the application will be used in combination with any customer or company priceLists. This applies to both configurations.
- application/json
- application/xml
The data needed to insert items post purchase
The items to add to the purchase. The items to insert must have its PartNo, Quantity and PriceListId set. ParentLineNo, Name, Comment, ReferId and ReferUrl can be used if other values than the default are wanted. All other properties will be populated from the system.
https://demo.storm.io/api/1.1/ShoppingService.svc/rest/InsertItemsPostPurchase
- cURL
- JS
- C#
curl -i -X POST \
'https://demo.storm.io/api/1.1/ShoppingService.svc/rest/InsertItemsPostPurchase?basketId=0' \
-H 'Content-Type: application/json' \
-d '{
"ItemsToAdd": [
{
"Id": 0,
"LineNo": 0,
"ParentLineNo": 0,
"ProductId": 0,
"PartNo": "string",
"ManufacturerPartNo": "string",
"Name": "string",
"SubHeader": "string",
"ThumbnailImage": "string",
"FlagIdSeed": "string",
"Type": 0,
"PriceDisplay": 0,
"Price": 0,
"PriceOriginal": 0,
"Cost": 0,
"VatRate": 0,
"Quantity": 0,
"UOM": "string",
"UOMCount": 0,
"Comment": "string",
"PriceListId": 0,
"ReferId": 0,
"ReferUrl": "string",
"IsEditable": true,
"IsDiscountable": true,
"Info": [
{
"TypeId": 0,
"Value": "string",
"Code": "string"
}
],
"OptionalItems": [
{}
],
"OnHandValue": 0,
"IncomingValue": 0,
"NextDeliveryDate": "2019-08-24T14:15:22Z",
"LeadtimeDayCount": 0,
"PromotionIdSeed": "string",
"ImageKey": "string",
"ManufacturerName": "string",
"CategoryId": 0,
"OnHand": {
"Value": 0,
"IncomingValue": 0,
"NextDeliveryDate": "2019-08-24T14:15:22Z",
"LeadtimeDayCount": 0,
"LastChecked": "2019-08-24T14:15:22Z",
"IsActive": true,
"IsReturnable": true,
"Info": [
{
"Id": 0,
"Value": "string",
"Code": "string"
}
]
},
"OnHandSupplier": {
"Value": 0,
"IncomingValue": 0,
"NextDeliveryDate": "2019-08-24T14:15:22Z",
"LeadtimeDayCount": 0,
"LastChecked": "2019-08-24T14:15:22Z",
"IsActive": true,
"IsReturnable": true,
"Info": [
{
"Id": 0,
"Value": "string",
"Code": "string"
}
]
},
"PriceRecommended": 0,
"ManufacturerId": 0,
"UniqueName": "string",
"StatusId": 0,
"StockDisplayBreakPoint": 0,
"PriceCatalog": 0,
"IsBuyable": true,
"SubDescription": "string",
"CategoryIdSeed": "string",
"RecommendedQuantity": 0,
"IsRecommendedQuantityFixed": true,
"AppliedPromotions": [
{
"Id": 0,
"Name": "string",
"DiscountCode": "string",
"AppliedAmount": 0,
"AppliedAmountIncVat": 0
}
],
"RequirementPromotionIdSeed": "string",
"IsSubscribable": true,
"DescriptionHeader": "string",
"IsPriceManual": true,
"PriceStandard": 0,
"EanCode": "string",
"CostUnit": 0,
"PriceDisplayIncVat": 0,
"PriceListLocked": true,
"PriceOriginalIncVat": 0,
"PriceRecommendedIncVat": 0,
"PriceCatalogIncVat": 0,
"PriceStandardIncVat": 0
}
],
"PaymentParameters": [
{
"Name": "string",
"Value": "string"
}
]
}'
Success
- application/json
- application/xml
String response. OK if successful, otherwise may have different values depending on PSP. MaxLength: 50.
External identifier of this specific payment attempt, usually from the PSP. MaxLength: 50.
Used when a payment should be finalized on a different platform, e.g. sending a link by SMS to customer. MaxLength: 50.
PSP specific data returned for the payment. See PSP documentation.
{ "Status": "string", "StatusDescription": "string", "BasketId": 0, "OrderNo": "string", "PaymentCode": "string", "PaymentReference": "string", "HostedPaymentPage": "string", "RedirectUrl": "string", "RedirectParameters": [ { … } ], "IsSyncronous": true, "PaymentServiceId": 0 }
Request
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).
https://demo.storm.io/api/1.1/ShoppingService.svc/rest/IsPostPurchasePossbile
- cURL
- JS
- C#
curl -i -X GET \
'https://demo.storm.io/api/1.1/ShoppingService.svc/rest/IsPostPurchasePossbile?basketId=0'
The internal company id for which baskets are fetched. Either this a customerId or salesContactId must be specified.
The internal customer id for which baskets are fetched. Either this a companyId or salesContactId must be specified.
The internal salesContact id for which baskets are fetched. Either this a companyId or customerId must be specified.
Page numbers start with 1. Default is 1. If you specify a pageNo outside the range of items, an empty list will be returned. PageSize is mandatory for pageNo to work.
A comma separated list of internal pricelist ids to use, if any. PriceLists supplied must be valid, either from the application's public priceList or any customer or company priceLists or any valid client priceLists. For clients configured to use priceListSeed exclusively in the API only the supplied priceLists will be used. If this is not configured, the supplied priceLists will be appended to the valid priceLists. If none is supplied, the default value for the application will be used in combination with any customer or company priceLists. This applies to both configurations.
Specifies in which language to display culture specific information. If none is supplied, value is resolved from Application.
https://demo.storm.io/api/1.1/ShoppingService.svc/rest/ListBasketsByStatus
- cURL
- JS
- C#
curl -i -X GET \
'https://demo.storm.io/api/1.1/ShoppingService.svc/rest/ListBasketsByStatus?companyId=string&customerId=string&salesContactId=string'
{ "ItemCount": 0, "Items": [ { … } ] }