Entities and methods to handle baskets and payments.
- SubscriptionSchedule
Documentation ShoppingService (1.1)
Subscription
A unique internal id for this Subscription. When creating new Subscription this should be left as null and will be ignored.
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.
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.
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.
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.
An optional end date for the Subscription. The Subscription will be deleted after this date if specified. See DeleteSubscription for details about deleting subscriptions.
The schedules for this Subscription. Any Subscription must have at least one schedule when activated.
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.
{ "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" }
SubscriptionSchedule
A unique internal id for this SubscriptionSchedule. When creating new schedules this should be left as null.
Specifies if the schedule is active or not. Only active schedules are considered when creating orders.
Specifies how often the Frequency should be applied. If Frequency is 'Daily' and RecurValue is 2 then the schedule is every second day.
Specifies if the schedule should be applied on a Monday. Only used when Frequency is 'Weekly'. At least one of the IsOnDay values must be specified.
Specifies if the schedule should be applied on a Tuesday. Only used when Frequency is 'Weekly'. At least one of the IsOnDay values must be specified.
Specifies if the schedule should be applied on a Wednesday. Only used when Frequency is 'Weekly'. At least one of the IsOnDay values must be specified.
Specifies if the schedule should be applied on a Thursday. Only used when Frequency is 'Weekly'. At least one of the IsOnDay values must be specified.
Specifies if the schedule should be applied on a Friday. Only used when Frequency is 'Weekly'. At least one of the IsOnDay values must be specified.
Specifies if the schedule should be applied on a Saturday. Only used when Frequency is 'Weekly'. At least one of the IsOnDay values must be specified.
Specifies if the schedule should be applied on a Sunday. Only used when Frequency is 'Weekly'. At least one of the IsOnDay values must be specified.
Specifies if the schedule should be applied on a specific day. Only used when Frequency is 'Monthly' and not any of the MonthlyInterval values are used.
{ "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" }
SubscriptionScheduleData
A list of frequencies. Defines how often should a Subscription should produce an order. See SubscriptionSchedule for usage.
A list of intervals used together with MonthlyIntervalValues. See SubscriptionSchedule for usage.
{ "Frequencies": [ { … } ], "MonthlyIntervals": [ { … } ], "MonthlyIntervalValues": [ { … } ] }