Documentation ShoppingService (1.1)

Entities and methods to handle baskets and payments.

Download OpenAPI description
Languages
Servers
https://demo.storm.io/api/1.1/

Basket

Operations

Checkout

Operations

DeliveryMethods

Operations

InfoTypes

Operations

OnHand

Operations

OrderRequest

Operations

Payments

Operations

Promotions

Operations

Subscriptions

Operations

Create subscription

Request

Creates a new Subscription. The Subscription will be inactive. To activate a Subscription the Checkout process must be used. See PurchaseSubscription.

Query
ipAddressstringrequired

The ip-address of the end user.

createdByinteger(int32)required

Account internal id of current user.

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 to specify in which currency to display prices. If none is supplied, value is resolved from Application. Note that if price is specified on items to insert, then it must be in the same currency.

Bodyrequired

The Subscription to create.

Idinteger or null(int32)

A unique internal id for this Subscription. When creating new Subscription this should be left as null and will be ignored.

Namestring

The name of the Subscription. This will also be the name of the template basket. Can be used to distinguish Subscriptions from each other. MaxLength: 50.

TemplateBasketobject(Basket)(Basket)
Typeobject(SubscriptionType)(SubscriptionType)
StatusIdinteger(int32)

The internal status id for this Subscription. When a Subscription is created the status will be 0 (Inactive) and ignored. To activate a Subscription it must pass through the Checkout process. See ListSubscriptionStatus for valid values. Can only be changed between Active and Paused. To delete a Subscription use DeleteSubscription.

HoldUntilDatestring or null(date-time)

A date used to temporarily pause the Subscription and automatically activate it again on the specified date. If no HoldFromDate is specified the pause will start immediately.

StartDatestring or null(date-time)

An optional start date for the Subscription. The Subscription can be activated but no orders will be processed before this date if specified. Can only be changed if a specified date has not passed or if the Subscription is still inactive. If no StartDate is specified when activating the Subscription this will be set to the activation date.

EndDatestring or null(date-time)

An optional end date for the Subscription. The Subscription will be deleted after this date if specified. See DeleteSubscription for details about deleting subscriptions.

SchedulesArray of objects(SubscriptionSchedule)(SubscriptionSchedule)

The schedules for this Subscription. Any Subscription must have at least one schedule when activated.

HoldFromDatestring or null(date-time)

A date used to temporarily pause the Subscription from the specified date and automatically activate it again on HoldUtilDate. If this is specified HoldUntilDate must also be specified.

NextRunstring or null(date-time)

Calculated date for next time an order will be created by this subscription

curl -i -X POST \
  'https://demo.storm.io/api/1.1/ShoppingService.svc/rest/CreateSubscription?createdBy=0&ipAddress=string' \
  -H 'Content-Type: application/json' \
  -d '{
    "Id": 0,
    "Name": "string",
    "TemplateBasket": {
      "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": [
        {
          "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
        }
      ],
      "Info": [
        {
          "TypeId": 0,
          "Value": "string",
          "Code": "string"
        }
      ],
      "Summary": {
        "Items": {
          "Amount": 0,
          "Vat": 0,
          "AmountIncVat": 0
        },
        "Freigt": {
          "Amount": 0,
          "Vat": 0,
          "AmountIncVat": 0
        },
        "Fees": {
          "Amount": 0,
          "Vat": 0,
          "AmountIncVat": 0
        },
        "Total": {
          "Amount": 0,
          "Vat": 0,
          "AmountIncVat": 0
        }
      },
      "AppliedPromotions": [
        {
          "Id": 0,
          "Name": "string",
          "Header": "string",
          "ShortDescription": "string",
          "Description1": "string",
          "Description2": "string",
          "StartDate": "2019-08-24T14:15:22Z",
          "EndDate": "2019-08-24T14:15:22Z",
          "ImageKey": "string",
          "RequirementSeed": "string",
          "DiscountCode": "string",
          "IsExcludedFromPriceCalculation": true,
          "AllowProductListing": true,
          "Images": [
            {
              "Id": 0,
              "Type": 0,
              "Name": "string",
              "Description": "string",
              "Key": "string"
            }
          ],
          "ProductFilters": [
            {
              "ManufacturerId": 0,
              "CategorySeed": "string",
              "TypeId": 0,
              "ProductId": 0,
              "VariantProductId": 0,
              "PartNo": "string",
              "PricelistId": 0,
              "FlagId": 0
            }
          ],
          "AppliedAmount": 0,
          "EffectSeed": "string",
          "FreightDiscountPct": 0,
          "IsStackable": true,
          "AppliedAmountIncVat": 0,
          "ExclusivityType": 0
        }
      ],
      "IpAddress": "string",
      "AttestedBy": 0,
      "TypeId": 0,
      "DoHold": true,
      "IsBuyable": true,
      "InvoiceReference": "string",
      "PaymentMethodId": 0,
      "DeliveryMethodId": 0,
      "SalesAreaId": 0
    },
    "Type": {
      "Id": 0,
      "Code": "string",
      "Name": "string",
      "Description": "string",
      "EndDate": "2019-08-24T14:15:22Z"
    },
    "StatusId": 0,
    "HoldUntilDate": "2019-08-24T14:15:22Z",
    "StartDate": "2019-08-24T14:15:22Z",
    "EndDate": "2019-08-24T14:15:22Z",
    "Schedules": [
      {
        "Id": 0,
        "IsActive": true,
        "Frequency": {
          "Id": 0,
          "Value": "string",
          "Code": "string"
        },
        "RecurValue": 0,
        "IsOnMonday": true,
        "IsOnTuesday": true,
        "IsOnWednesday": true,
        "IsOnThursday": true,
        "IsOnFriday": true,
        "IsOnSaturday": true,
        "IsOnSunday": true,
        "MonthlyDay": 0,
        "MonthlyInterval": {
          "Id": 0,
          "Value": "string",
          "Code": "string"
        },
        "MonthlyIntervalValue": {
          "Id": 0,
          "Value": "string",
          "Code": "string"
        },
        "TimeOfDay": "string"
      }
    ],
    "HoldFromDate": "2019-08-24T14:15:22Z",
    "NextRun": "2019-08-24T14:15:22Z"
  }'

Responses

Success

Body
Idinteger or null(int32)

A unique internal id for this Subscription. When creating new Subscription this should be left as null and will be ignored.

Namestring

The name of the Subscription. This will also be the name of the template basket. Can be used to distinguish Subscriptions from each other. MaxLength: 50.

TemplateBasketobject(Basket)(Basket)
Typeobject(SubscriptionType)(SubscriptionType)
StatusIdinteger(int32)

The internal status id for this Subscription. When a Subscription is created the status will be 0 (Inactive) and ignored. To activate a Subscription it must pass through the Checkout process. See ListSubscriptionStatus for valid values. Can only be changed between Active and Paused. To delete a Subscription use DeleteSubscription.

HoldUntilDatestring or null(date-time)

A date used to temporarily pause the Subscription and automatically activate it again on the specified date. If no HoldFromDate is specified the pause will start immediately.

StartDatestring or null(date-time)

An optional start date for the Subscription. The Subscription can be activated but no orders will be processed before this date if specified. Can only be changed if a specified date has not passed or if the Subscription is still inactive. If no StartDate is specified when activating the Subscription this will be set to the activation date.

EndDatestring or null(date-time)

An optional end date for the Subscription. The Subscription will be deleted after this date if specified. See DeleteSubscription for details about deleting subscriptions.

SchedulesArray of objects(SubscriptionSchedule)(SubscriptionSchedule)

The schedules for this Subscription. Any Subscription must have at least one schedule when activated.

HoldFromDatestring or null(date-time)

A date used to temporarily pause the Subscription from the specified date and automatically activate it again on HoldUtilDate. If this is specified HoldUntilDate must also be specified.

NextRunstring or null(date-time)

Calculated date for next time an order will be created by this subscription

Response
{ "Id": 0, "Name": "string", "TemplateBasket": { "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 }, "Type": { "Id": 0, "Code": "string", "Name": "string", "Description": "string", "EndDate": "2019-08-24T14:15:22Z" }, "StatusId": 0, "HoldUntilDate": "2019-08-24T14:15:22Z", "StartDate": "2019-08-24T14:15:22Z", "EndDate": "2019-08-24T14:15:22Z", "Schedules": [ {} ], "HoldFromDate": "2019-08-24T14:15:22Z", "NextRun": "2019-08-24T14:15:22Z" }

Delete a subscription

Request

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.

Query
subscriptionIdinteger(int32)required

The internal id of the subscription to delete. Note that this id should be removed from future references.

updatedByinteger(int32)required

Account internal id of current user.

curl -i -X POST \
  'https://demo.storm.io/api/1.1/ShoppingService.svc/rest/DeleteSubscription?subscriptionId=0&updatedBy=0'

Responses

Success

Body

Get a subscription

Request

Gets a Subscription by subscription id.

Query
idinteger(int32)required

The internal id of the subscription to fetch.

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/GetSubscription?id=0'

Responses

Success

Body
Idinteger or null(int32)

A unique internal id for this Subscription. When creating new Subscription this should be left as null and will be ignored.

Namestring

The name of the Subscription. This will also be the name of the template basket. Can be used to distinguish Subscriptions from each other. MaxLength: 50.

TemplateBasketobject(Basket)(Basket)
Typeobject(SubscriptionType)(SubscriptionType)
StatusIdinteger(int32)

The internal status id for this Subscription. When a Subscription is created the status will be 0 (Inactive) and ignored. To activate a Subscription it must pass through the Checkout process. See ListSubscriptionStatus for valid values. Can only be changed between Active and Paused. To delete a Subscription use DeleteSubscription.

HoldUntilDatestring or null(date-time)

A date used to temporarily pause the Subscription and automatically activate it again on the specified date. If no HoldFromDate is specified the pause will start immediately.

StartDatestring or null(date-time)

An optional start date for the Subscription. The Subscription can be activated but no orders will be processed before this date if specified. Can only be changed if a specified date has not passed or if the Subscription is still inactive. If no StartDate is specified when activating the Subscription this will be set to the activation date.

EndDatestring or null(date-time)

An optional end date for the Subscription. The Subscription will be deleted after this date if specified. See DeleteSubscription for details about deleting subscriptions.

SchedulesArray of objects(SubscriptionSchedule)(SubscriptionSchedule)

The schedules for this Subscription. Any Subscription must have at least one schedule when activated.

HoldFromDatestring or null(date-time)

A date used to temporarily pause the Subscription from the specified date and automatically activate it again on HoldUtilDate. If this is specified HoldUntilDate must also be specified.

NextRunstring or null(date-time)

Calculated date for next time an order will be created by this subscription

Response
{ "Id": 0, "Name": "string", "TemplateBasket": { "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 }, "Type": { "Id": 0, "Code": "string", "Name": "string", "Description": "string", "EndDate": "2019-08-24T14:15:22Z" }, "StatusId": 0, "HoldUntilDate": "2019-08-24T14:15:22Z", "StartDate": "2019-08-24T14:15:22Z", "EndDate": "2019-08-24T14:15:22Z", "Schedules": [ {} ], "HoldFromDate": "2019-08-24T14:15:22Z", "NextRun": "2019-08-24T14:15:22Z" }

Get a subscription by basket id

Request

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.

Query
basketIdinteger(int32)required

The internal id of the template basket for the subscription to fetch.

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/GetSubscriptionByBasket?basketId=0'

Responses

Success

Body
Idinteger or null(int32)

A unique internal id for this Subscription. When creating new Subscription this should be left as null and will be ignored.

Namestring

The name of the Subscription. This will also be the name of the template basket. Can be used to distinguish Subscriptions from each other. MaxLength: 50.

TemplateBasketobject(Basket)(Basket)
Typeobject(SubscriptionType)(SubscriptionType)
StatusIdinteger(int32)

The internal status id for this Subscription. When a Subscription is created the status will be 0 (Inactive) and ignored. To activate a Subscription it must pass through the Checkout process. See ListSubscriptionStatus for valid values. Can only be changed between Active and Paused. To delete a Subscription use DeleteSubscription.

HoldUntilDatestring or null(date-time)

A date used to temporarily pause the Subscription and automatically activate it again on the specified date. If no HoldFromDate is specified the pause will start immediately.

StartDatestring or null(date-time)

An optional start date for the Subscription. The Subscription can be activated but no orders will be processed before this date if specified. Can only be changed if a specified date has not passed or if the Subscription is still inactive. If no StartDate is specified when activating the Subscription this will be set to the activation date.

EndDatestring or null(date-time)

An optional end date for the Subscription. The Subscription will be deleted after this date if specified. See DeleteSubscription for details about deleting subscriptions.

SchedulesArray of objects(SubscriptionSchedule)(SubscriptionSchedule)

The schedules for this Subscription. Any Subscription must have at least one schedule when activated.

HoldFromDatestring or null(date-time)

A date used to temporarily pause the Subscription from the specified date and automatically activate it again on HoldUtilDate. If this is specified HoldUntilDate must also be specified.

NextRunstring or null(date-time)

Calculated date for next time an order will be created by this subscription

Response
{ "Id": 0, "Name": "string", "TemplateBasket": { "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 }, "Type": { "Id": 0, "Code": "string", "Name": "string", "Description": "string", "EndDate": "2019-08-24T14:15:22Z" }, "StatusId": 0, "HoldUntilDate": "2019-08-24T14:15:22Z", "StartDate": "2019-08-24T14:15:22Z", "EndDate": "2019-08-24T14:15:22Z", "Schedules": [ {} ], "HoldFromDate": "2019-08-24T14:15:22Z", "NextRun": "2019-08-24T14:15:22Z" }

Get subscription schedule meta data

Request

Gets meta data for scheduling Subscriptions.

Query
cultureCodestring

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

curl -i -X GET \
  https://demo.storm.io/api/1.1/ShoppingService.svc/rest/GetSubscriptionScheduleData

Responses

Success

Body
FrequenciesArray of objects(IdValue)(IdValue)

A list of frequencies. Defines how often should a Subscription should produce an order. See SubscriptionSchedule for usage.

MonthlyIntervalsArray of objects(IdValue)(IdValue)

A list of intervals used together with MonthlyIntervalValues. See SubscriptionSchedule for usage.

MonthlyIntervalValuesArray of objects(IdValue)(IdValue)

A list of interval values used together with MonthlyIntervals. See SubscriptionSchedule for usage.

Response
{ "Frequencies": [ {} ], "MonthlyIntervals": [ {} ], "MonthlyIntervalValues": [ {} ] }

List subscriptions for a customer

Request

Lists all Subscriptions for a customer.

Query
customerIdinteger(int32)required

The internal customer id of the customer. The id is used to fetch subscriptions for that customer.

statusSeedstringrequired

Accepts a comma separated string of Status internal ids. Lookup references in ListStatuses.

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/ListSubscriptions?customerId=0&statusSeed=string'

Responses

Success

BodyArray [
Idinteger or null(int32)

A unique internal id for this Subscription. When creating new Subscription this should be left as null and will be ignored.

Namestring

The name of the Subscription. This will also be the name of the template basket. Can be used to distinguish Subscriptions from each other. MaxLength: 50.

TemplateBasketobject(Basket)(Basket)
Typeobject(SubscriptionType)(SubscriptionType)
StatusIdinteger(int32)

The internal status id for this Subscription. When a Subscription is created the status will be 0 (Inactive) and ignored. To activate a Subscription it must pass through the Checkout process. See ListSubscriptionStatus for valid values. Can only be changed between Active and Paused. To delete a Subscription use DeleteSubscription.

HoldUntilDatestring or null(date-time)

A date used to temporarily pause the Subscription and automatically activate it again on the specified date. If no HoldFromDate is specified the pause will start immediately.

StartDatestring or null(date-time)

An optional start date for the Subscription. The Subscription can be activated but no orders will be processed before this date if specified. Can only be changed if a specified date has not passed or if the Subscription is still inactive. If no StartDate is specified when activating the Subscription this will be set to the activation date.

EndDatestring or null(date-time)

An optional end date for the Subscription. The Subscription will be deleted after this date if specified. See DeleteSubscription for details about deleting subscriptions.

SchedulesArray of objects(SubscriptionSchedule)(SubscriptionSchedule)

The schedules for this Subscription. Any Subscription must have at least one schedule when activated.

HoldFromDatestring or null(date-time)

A date used to temporarily pause the Subscription from the specified date and automatically activate it again on HoldUtilDate. If this is specified HoldUntilDate must also be specified.

NextRunstring or null(date-time)

Calculated date for next time an order will be created by this subscription

]
Response
[ { "Id": 0, "Name": "string", "TemplateBasket": {}, "Type": {}, "StatusId": 0, "HoldUntilDate": "2019-08-24T14:15:22Z", "StartDate": "2019-08-24T14:15:22Z", "EndDate": "2019-08-24T14:15:22Z", "Schedules": [], "HoldFromDate": "2019-08-24T14:15:22Z", "NextRun": "2019-08-24T14:15:22Z" } ]

List subscription statuses

Request

Gets meta data for scheduling Subscriptions.

Query
cultureCodestring

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

curl -i -X GET \
  https://demo.storm.io/api/1.1/ShoppingService.svc/rest/ListSubscriptionStatus

Responses

Success

BodyArray [
Idinteger(int32)

The internal Id of the Entity. This Id might be different in different tiers such as Stage and Production. Use Code if hard coding is required.

Valuestring

The Value of the Entity. MaxLength: max.

Codestring

The Code of the Entity, if existing. Use this value when hard coding is required. MaxLength: 255.

]
Response
[ { "Id": 0, "Value": "string", "Code": "string" } ]

List subscription types

Request

Lists all active and valid SubscriptionTypes for the application.

Query
cultureCodestring

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

curl -i -X GET \
  https://demo.storm.io/api/1.1/ShoppingService.svc/rest/ListSubscriptionTypes

Responses

Success

BodyArray [
Idinteger(int32)

A internal id for this type.

Codestring

An external code use to identify this type. Used when creating Subscription. MaxLength: 50.

Namestring

The name of the type. MaxLength: 50.

Descriptionstring

A description of the type. MaxLength: 500.

EndDatestring or null(date-time)

An optional end date for the SubscriptionType. Subscriptions created for this SubscriptionType can not have an end date later than this.

]
Response
[ { "Id": 0, "Code": "string", "Name": "string", "Description": "string", "EndDate": "2019-08-24T14:15:22Z" } ]

Purchase a subscription

Request

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.

Query
subscriptionIdinteger(int32)required

The internal id of the Subscription to activate. Only inactive Subscriptions can be purchased and the Subscription must have valid Schedules.

ipAddressstringrequired

The user's ipAddress.

userAgentstringrequired

The user agent of the user's browser.

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.

Bodyrequired

General: 'test'=true to enable tests. When 'test' is used no payments will be processed for real. Payments may interpret supplied values such as cardNumber or ssn to simulate failures. Not implemented. Klarna: 'sessionId'=id. Used to provide a sessionId to Klarna payments. Not implemented. Payex and Dibs. Supported values are 'returnUrl' and 'cancelUrl'. Values should point to where the payment service should go in case of success/failure.

Array [
Namestring

The Name of the Entity. MaxLength: 50.

Valuestring

The Value of the Entity. MaxLength: max.

]
curl -i -X POST \
  'https://demo.storm.io/api/1.1/ShoppingService.svc/rest/PurchaseSubscription?ipAddress=string&subscriptionId=0&userAgent=string' \
  -H 'Content-Type: application/json' \
  -d '[
    {
      "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 }

Update a subscription

Request

Updates a Subscription. The TemplateBasket will be ignored. Use regular API-methods for baskets to change the TemplateBasket.

Query
updatedByinteger(int32)required

Account internal id of current user.

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.

Bodyrequired

The subscription to update. Only the Name, StatusId, HoldUntilDate, StartDate and Schedules can be changed. StatusId can only be changed between Active and Paused.

Idinteger or null(int32)

A unique internal id for this Subscription. When creating new Subscription this should be left as null and will be ignored.

Namestring

The name of the Subscription. This will also be the name of the template basket. Can be used to distinguish Subscriptions from each other. MaxLength: 50.

TemplateBasketobject(Basket)(Basket)
Typeobject(SubscriptionType)(SubscriptionType)
StatusIdinteger(int32)

The internal status id for this Subscription. When a Subscription is created the status will be 0 (Inactive) and ignored. To activate a Subscription it must pass through the Checkout process. See ListSubscriptionStatus for valid values. Can only be changed between Active and Paused. To delete a Subscription use DeleteSubscription.

HoldUntilDatestring or null(date-time)

A date used to temporarily pause the Subscription and automatically activate it again on the specified date. If no HoldFromDate is specified the pause will start immediately.

StartDatestring or null(date-time)

An optional start date for the Subscription. The Subscription can be activated but no orders will be processed before this date if specified. Can only be changed if a specified date has not passed or if the Subscription is still inactive. If no StartDate is specified when activating the Subscription this will be set to the activation date.

EndDatestring or null(date-time)

An optional end date for the Subscription. The Subscription will be deleted after this date if specified. See DeleteSubscription for details about deleting subscriptions.

SchedulesArray of objects(SubscriptionSchedule)(SubscriptionSchedule)

The schedules for this Subscription. Any Subscription must have at least one schedule when activated.

HoldFromDatestring or null(date-time)

A date used to temporarily pause the Subscription from the specified date and automatically activate it again on HoldUtilDate. If this is specified HoldUntilDate must also be specified.

NextRunstring or null(date-time)

Calculated date for next time an order will be created by this subscription

curl -i -X POST \
  'https://demo.storm.io/api/1.1/ShoppingService.svc/rest/UpdateSubscription?updatedBy=0' \
  -H 'Content-Type: application/json' \
  -d '{
    "Id": 0,
    "Name": "string",
    "TemplateBasket": {
      "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": [
        {
          "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
        }
      ],
      "Info": [
        {
          "TypeId": 0,
          "Value": "string",
          "Code": "string"
        }
      ],
      "Summary": {
        "Items": {
          "Amount": 0,
          "Vat": 0,
          "AmountIncVat": 0
        },
        "Freigt": {
          "Amount": 0,
          "Vat": 0,
          "AmountIncVat": 0
        },
        "Fees": {
          "Amount": 0,
          "Vat": 0,
          "AmountIncVat": 0
        },
        "Total": {
          "Amount": 0,
          "Vat": 0,
          "AmountIncVat": 0
        }
      },
      "AppliedPromotions": [
        {
          "Id": 0,
          "Name": "string",
          "Header": "string",
          "ShortDescription": "string",
          "Description1": "string",
          "Description2": "string",
          "StartDate": "2019-08-24T14:15:22Z",
          "EndDate": "2019-08-24T14:15:22Z",
          "ImageKey": "string",
          "RequirementSeed": "string",
          "DiscountCode": "string",
          "IsExcludedFromPriceCalculation": true,
          "AllowProductListing": true,
          "Images": [
            {
              "Id": 0,
              "Type": 0,
              "Name": "string",
              "Description": "string",
              "Key": "string"
            }
          ],
          "ProductFilters": [
            {
              "ManufacturerId": 0,
              "CategorySeed": "string",
              "TypeId": 0,
              "ProductId": 0,
              "VariantProductId": 0,
              "PartNo": "string",
              "PricelistId": 0,
              "FlagId": 0
            }
          ],
          "AppliedAmount": 0,
          "EffectSeed": "string",
          "FreightDiscountPct": 0,
          "IsStackable": true,
          "AppliedAmountIncVat": 0,
          "ExclusivityType": 0
        }
      ],
      "IpAddress": "string",
      "AttestedBy": 0,
      "TypeId": 0,
      "DoHold": true,
      "IsBuyable": true,
      "InvoiceReference": "string",
      "PaymentMethodId": 0,
      "DeliveryMethodId": 0,
      "SalesAreaId": 0
    },
    "Type": {
      "Id": 0,
      "Code": "string",
      "Name": "string",
      "Description": "string",
      "EndDate": "2019-08-24T14:15:22Z"
    },
    "StatusId": 0,
    "HoldUntilDate": "2019-08-24T14:15:22Z",
    "StartDate": "2019-08-24T14:15:22Z",
    "EndDate": "2019-08-24T14:15:22Z",
    "Schedules": [
      {
        "Id": 0,
        "IsActive": true,
        "Frequency": {
          "Id": 0,
          "Value": "string",
          "Code": "string"
        },
        "RecurValue": 0,
        "IsOnMonday": true,
        "IsOnTuesday": true,
        "IsOnWednesday": true,
        "IsOnThursday": true,
        "IsOnFriday": true,
        "IsOnSaturday": true,
        "IsOnSunday": true,
        "MonthlyDay": 0,
        "MonthlyInterval": {
          "Id": 0,
          "Value": "string",
          "Code": "string"
        },
        "MonthlyIntervalValue": {
          "Id": 0,
          "Value": "string",
          "Code": "string"
        },
        "TimeOfDay": "string"
      }
    ],
    "HoldFromDate": "2019-08-24T14:15:22Z",
    "NextRun": "2019-08-24T14:15:22Z"
  }'

Responses

Success

Body
Idinteger or null(int32)

A unique internal id for this Subscription. When creating new Subscription this should be left as null and will be ignored.

Namestring

The name of the Subscription. This will also be the name of the template basket. Can be used to distinguish Subscriptions from each other. MaxLength: 50.

TemplateBasketobject(Basket)(Basket)
Typeobject(SubscriptionType)(SubscriptionType)
StatusIdinteger(int32)

The internal status id for this Subscription. When a Subscription is created the status will be 0 (Inactive) and ignored. To activate a Subscription it must pass through the Checkout process. See ListSubscriptionStatus for valid values. Can only be changed between Active and Paused. To delete a Subscription use DeleteSubscription.

HoldUntilDatestring or null(date-time)

A date used to temporarily pause the Subscription and automatically activate it again on the specified date. If no HoldFromDate is specified the pause will start immediately.

StartDatestring or null(date-time)

An optional start date for the Subscription. The Subscription can be activated but no orders will be processed before this date if specified. Can only be changed if a specified date has not passed or if the Subscription is still inactive. If no StartDate is specified when activating the Subscription this will be set to the activation date.

EndDatestring or null(date-time)

An optional end date for the Subscription. The Subscription will be deleted after this date if specified. See DeleteSubscription for details about deleting subscriptions.

SchedulesArray of objects(SubscriptionSchedule)(SubscriptionSchedule)

The schedules for this Subscription. Any Subscription must have at least one schedule when activated.

HoldFromDatestring or null(date-time)

A date used to temporarily pause the Subscription from the specified date and automatically activate it again on HoldUtilDate. If this is specified HoldUntilDate must also be specified.

NextRunstring or null(date-time)

Calculated date for next time an order will be created by this subscription

Response
{ "Id": 0, "Name": "string", "TemplateBasket": { "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 }, "Type": { "Id": 0, "Code": "string", "Name": "string", "Description": "string", "EndDate": "2019-08-24T14:15:22Z" }, "StatusId": 0, "HoldUntilDate": "2019-08-24T14:15:22Z", "StartDate": "2019-08-24T14:15:22Z", "EndDate": "2019-08-24T14:15:22Z", "Schedules": [ {} ], "HoldFromDate": "2019-08-24T14:15:22Z", "NextRun": "2019-08-24T14:15:22Z" }