Insert an item in a basket

Request
query Parameters
basketId
required
integer <int32>

Internal id of the basket to insert the item into.

createdBy
required
integer <int32>

Account internal id of current user.

pricelistSeed
string

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.

cultureCode
string

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

currencyId
string

Internal id that specifies in which currency to display prices. If none is supplied, value is resolved from Application. Note that if price is specified on item to insert, then it must be in the same currency.

Request Body schema:

The item 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.

Id
integer or null <int32>

Internal id of the basket item. Used to refer to this particular row in different methods.

LineNo
integer <int32>

Line number of the item. Used to refer to this particular row in different methods.

ParentLineNo
integer or null <int32>

If this item is part of a bundle, an attached item from promotion or such this property will refer to the associated line number.

ProductId
integer <int32>

Internal product id of the product for this basket item.

PartNo
string

The PartNo of this Item. Must be specified when adding items to a basket. MaxLength: 50

ManufacturerPartNo
string

Manufacturer part number. Populated by Storm. MaxLength: 50

Name
string

Name of the product. Populated by Storm. MaxLength: 255

SubHeader
string

Sub header of the product. Populated by Storm. MaxLength: 255

ThumbnailImage
string

MaxLength: 255

FlagIdSeed
string

A comma separated list of internal flag ids. MaxLength: max

Type
integer <int32>

The internal type id of the underlying product. See ListSkuTypes under Products.

PriceDisplay
number <decimal>

This is the price, excluding VAT, after applying company discounts and promotions. It is what the customer is paying.

Price
number or null <decimal>

This is the snapshot value, excluding VAT, of PriceDisplay when the basket is bought. Should be null. Can be used to set a price from the application when updating or creating BasketItems. Then IsPriceManual must be set to true as well.

PriceOriginal
number <decimal>

This is the original price of the SKU, excluding VAT.

Cost
number or null <decimal>

CostPurchase from Storm Admin, excluding VAT.

VatRate
number <decimal>

A rate to multiply with price to get price inc VAT. 25% VAT equals a VatRate of 1.25.

Quantity
number <decimal>

The Quantity of this Item. Must be specified when adding items to a basket.

UOM
string

MaxLength: 50

UOMCount
number or null <decimal>
Comment
string

Free text comment for this basket item. MaxLength: 255

PriceListId
integer <int32>

The internal pricelist id of this Item. Must be specified when adding items to a basket. Use the PriceListId from Product or ProductItem.

ReferId
integer or null <int32>

Used to tag a BasketItem with some external id.

ReferUrl
string

Used to tag a BasketItem with an incoming URL. MaxLength: 255

IsEditable
boolean

Indicates if a basket item is editable or not. This can happen when the API splits rows in promotions. Can be checked to see if an item should be allowed for UpdateBasketItem.

IsDiscountable
boolean
Array of objects <ExtraInfo> (ExtraInfo)

List of information types and values associated with this particular basket item.

OptionalItems
Array of objects <BasketItem> (BasketItem)
OnHandValue
number <decimal>
IncomingValue
number <decimal>
NextDeliveryDate
string or null <date-time>
LeadtimeDayCount
integer or null <int32>
PromotionIdSeed
string

Internal ids of promotions applied on this product. MaxLength: max

ImageKey
string or null <guid>

A unique id for the image at our image server. Url for images are formed like http://[client specific CDN]/{ImageKey}. Preset, height and width can be sent as parameters.

ManufacturerName
string

Name of the manufacturer of the product. Populated by Storm. MaxLength: 100

CategoryId
integer or null <int32>
object <ProductsOnHand> (ProductsOnHand)
object <ProductsOnHand> (ProductsOnHand)
PriceRecommended
number or null <decimal>

The rule based price, excluding VAT, from a priceList, if specified.

ManufacturerId
integer <int32>

Internal manufacturer id for the product. Populated by Storm.

UniqueName
string

A unique name that can be used in Urls and to get a Product. GetProduct and GetProductByUniqueName gets the same Product. MaxLength: 500

StatusId
integer <int32>

The status of the underlying product. Lookup references in ListStatuses.

StockDisplayBreakPoint
integer or null <int32>

A value that can be used for display logic regarding OnHand.

PriceCatalog
number or null <decimal>

The original price, excluding VAT, if specified.

IsBuyable
boolean

Indicates if the item is buyable or not. Will always be false if the status is closed. An exception will be thrown if IsBuyable is false and an attempt to buy the item is made.

SubDescription
string

Sub description from Storm Admin. MaxLength: max

CategoryIdSeed
string

A comma separated list of internal category ids ordered so the primary category is first. MaxLength: max

RecommendedQuantity
number or null <decimal>

Indicates the default value used as quantity when buying the product. If IsRecommendedQuantityFixed is true, only multiples of this quantity should be allowed.

IsRecommendedQuantityFixed
boolean

If this is set to true only multiples of RecommendedQuantity should be allowed.

Array of objects <AppliedPromotionOnItem> (AppliedPromotionOnItem)

Applied promotions for this item, if any. It will contain some info about what promotion was applied and amount applied.

RequirementPromotionIdSeed
string

A comma separated list of promotion internal ids for this item that are fulfilling the requirements. MaxLength: max

IsSubscribable
boolean

True if this item can be added to a Subscription. False otherwise. Can be used when copying BasketItems from one Basket to a TemplateBasket in a Subacription.

DescriptionHeader
string

DescriptionHeader for the product as specified in Storm Admin. MaxLength: 255

IsPriceManual
boolean

Used when setting price on a BasketItem from the application. Manual prices are not discountable when applying promotions or company discounts.

PriceStandard
number or null <decimal>

The standard price, excluding VAT, if specified.

EanCode
string

SKU EAN code. MaxLength: 50

CostUnit
number or null <decimal>

CostUnit, excluding VAT, from Storm Admin.

PriceDisplayIncVat
number <decimal>

This is the price including VAT after applying company discounts and promotions. It is what the customer is paying.

PriceListLocked
boolean or null

Set to true to exclude this item's price list from business logic when selecting cheapest price. Will be set to false if price list is unavailable.

Responses
200

Success

400

Bad Request

Key: BasketItemNotBuyable. Gets raised when the basket item is not buyable or when it is inactive.

Key: BasketItemQuantityLessThanZero. Gets raised when the basket item quantity is less than zero.

Key: BasketNotEditable. Gets raised when the basket is not editable or already paid for.

Key: InvalidCompanyOnBasket. Gets raised when the basket has an invalid company. The customer does not exist in this company.

Key: QuotationMissing. Gets raised when the basket is missing.

500

Internal Server Error

post/ShoppingService.svc/rest/InsertBasketItem
Request samples
{
  • "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": [
    ],
  • "OptionalItems": [
    ],
  • "OnHandValue": 0,
  • "IncomingValue": 0,
  • "NextDeliveryDate": "2019-08-24T14:15:22Z",
  • "LeadtimeDayCount": 0,
  • "PromotionIdSeed": "string",
  • "ImageKey": "string",
  • "ManufacturerName": "string",
  • "CategoryId": 0,
  • "OnHand": {
    },
  • "OnHandSupplier": {
    },
  • "PriceRecommended": 0,
  • "ManufacturerId": 0,
  • "UniqueName": "string",
  • "StatusId": 0,
  • "StockDisplayBreakPoint": 0,
  • "PriceCatalog": 0,
  • "IsBuyable": true,
  • "SubDescription": "string",
  • "CategoryIdSeed": "string",
  • "RecommendedQuantity": 0,
  • "IsRecommendedQuantityFixed": true,
  • "AppliedPromotions": [
    ],
  • "RequirementPromotionIdSeed": "string",
  • "IsSubscribable": true,
  • "DescriptionHeader": "string",
  • "IsPriceManual": true,
  • "PriceStandard": 0,
  • "EanCode": "string",
  • "CostUnit": 0,
  • "PriceDisplayIncVat": 0,
  • "PriceListLocked": true
}
Response samples
{
  • "Id": 0,
  • "CustomerId": 0,
  • "CompanyId": 0,
  • "SalesContactId": 0,
  • "StatusId": 0,
  • "CurrencyId": 0,
  • "CurrencyCode": "string",
  • "Comment": "string",
  • "OrderReference": "string",
  • "DiscountCode": "string",
  • "ReferId": 0,
  • "ReferUrl": "string",
  • "ValidTo": "2019-08-24T14:15:22Z",
  • "IsEditable": true,
  • "Items": [
    ],
  • "Info": [
    ],
  • "Summary": {
    },
  • "AppliedPromotions": [
    ],
  • "IpAddress": "string",
  • "AttestedBy": 0,
  • "TypeId": 0,
  • "DoHold": true,
  • "IsBuyable": true,
  • "InvoiceReference": "string",
  • "PaymentMethodId": 0,
  • "DeliveryMethodId": 0,
  • "SalesAreaId": 0
}