Get a subscription by basket id

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.

Request
query Parameters
basketId
required
integer <int32>

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

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.

Responses
200

Success

400

Bad Request

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

Key: SubscriptionMissing. Gets raised when the recurring order is invalid.

Key: SubscriptionNotEditable. Gets raised when the basket is not editable or already paid for. Or if the subscription is deleted.

500

Internal Server Error

get/ShoppingService.svc/rest/GetSubscriptionByBasket
Response samples
{
  • "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"
}