Skip to content

Documentation ShoppingService (1.1)

Entities and methods to handle baskets and payments.

Download OpenAPI description
Languages
Servers

https://demo.storm.io/api/1.1/

Operations

Insert items into a basket post purchase

Request

Adds the provided items to the already checked out basket and updates the authorization for the payment. Calling this mehtod will close the basket.

Query
basketIdinteger(int32)required

The internal id of the basket to update.

pricelistSeedstring

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.

Bodyrequired

The data needed to insert items post purchase

ItemsToAddArray of objects(BasketItem)(BasketItem)

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.

PaymentParametersArray of objects(NameValue)(NameValue)

Roundtrip of the parameters received in the original payment response.

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"
      }
    ]
  }'

Responses

Success

Body
Statusstring

String response. OK if successful, otherwise may have different values depending on PSP. MaxLength: 50.

StatusDescriptionstring

Descriptive text for the status. MaxLength: 255.

BasketIdinteger or null(int32)

Internal id of the associated basket.

OrderNostring

Order number if order's been created. MaxLength: 50.

PaymentCodestring

Internal identifier of this specific payment attempt. MaxLength: int.

PaymentReferencestring

External identifier of this specific payment attempt, usually from the PSP. MaxLength: 50.

HostedPaymentPagestring

Used when a payment should be finalized on a different platform, e.g. sending a link by SMS to customer. MaxLength: 50.

RedirectUrlstring

Configurated redirection URL after successful payment. MaxLength: 255.

RedirectParametersArray of objects(NameValue)(NameValue)

PSP specific data returned for the payment. See PSP documentation.

IsSyncronousboolean or null

Indicates if the payment attempt was synchronous or not.

PaymentServiceIdinteger or null(int32)

Internal id of the payment service used.

Response
{ "Status": "string", "StatusDescription": "string", "BasketId": 0, "OrderNo": "string", "PaymentCode": "string", "PaymentReference": "string", "HostedPaymentPage": "string", "RedirectUrl": "string", "RedirectParameters": [ {} ], "IsSyncronous": true, "PaymentServiceId": 0 }

Check if post purchase is possible

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).

Query
basketIdinteger(int32)required

The internal id of the basket to check post purchase possibility for.

curl -i -X GET \
  'https://demo.storm.io/api/1.1/ShoppingService.svc/rest/IsPostPurchasePossbile?basketId=0'

Responses

Success

Body
boolean
Response
true

Request

Returns a paged basket list for specified customer, company or sales contact.

Query
companyIdstringrequired

The internal company id for which baskets are fetched. Either this a customerId or salesContactId must be specified.

customerIdstringrequired

The internal customer id for which baskets are fetched. Either this a companyId or salesContactId must be specified.

salesContactIdstringrequired

The internal salesContact id for which baskets are fetched. Either this a companyId or customerId must be specified.

statusIdinteger(int32)

The internal id for the status to fetch.

pageNostring

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.

pageSizestring

Number of items to display per page. Mandatory if using pageNo.

pricelistSeedstring

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.

cultureCodestring

Specifies in which language to display culture specific information. If none is supplied, value is resolved from Application.

currencyIdstring

Internal id that specifies in which currency to display prices. If none is supplied, value is resolved from Application.

curl -i -X GET \
  'https://demo.storm.io/api/1.1/ShoppingService.svc/rest/ListBasketsByStatus?companyId=string&customerId=string&salesContactId=string'

Responses

Success

Body
ItemCountinteger(int32)

Total number of baskets.

ItemsArray of objects(Basket)(Basket)

List of baskets.

Response
{ "ItemCount": 0, "Items": [ {} ] }
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations