Subscription: Subscription Noun
The subscription noun logically represents both recurring orders and
subscriptions.
BOD Summary
Access Profile and Expression Builder columns are for Get BOD only.
BOD |
Action Code / Access Profile |
Action Expression |
Service Provided |
Sample XML Message |
Client Library / Expression Builder |
ProcessSubscription |
Create |
/Subscription[] |
Creates a subscription entity for both recurring order and
subscriptions. This action supports creating multiple
subscriptions.
For a recurring order, the following parameters are mandatory:
- The unique ID of parent order.
- The fulfillment schedule. A recurring order can be either
time bound or an infinite recurring order. Hence
the fulfillment schedule only mandates the frequency information to be
passed in the schedule. The start date is assumed
to be current date if not specified. The end date will be set to
9999-12-31 to indicate an infinite recurrence.
- The total cost of the recurring order
- The state of the recurring order. If the state is InActive,
the subscription is created in InActive state. This typically
happens if the payment is not approved.
- The subscription type code is to be set to "RecurringOrder"
For a recurring order, the default implementation of this service
expects the payment schedule and the fulfillment schedule to be
the same. The service is invoked by the order upon the purchase of a
recurring order.
For a subscription, the following parameters are mandatory:
- The unique ID of parent order.
- The catalog entry ID of the subscription item being bought
- The order item ID of the subscription item in the parent
order
- The quantity of the subscription item. If the quantity is
not
passed, it is defaulted to 1.
- The total cost for the subscription
- The fulfillment schedule for subscription item. The
subscription being time bound is expected to provide
the duration and frequency information in the schedule. The start date if
not provided is assumed to be
current date.
- If the payment is made up front for the subscription, the
payment schedule is expected to indicate it. If the payment
schedule is missing, the payment schedule is assumed to be same as
the fulfillment schedule.
- The state of the recurring order. If the state is InActive,
the subscription is created in InActive state. This typically
happens if the payment is not approved.
- The subscription type code is to be set to type of the
subscription item. E.g. Time-Based
In case of subscriptions, the service will be invoked by the order
for all the subscription items in it. The order makes a single request
to create all the subscription entities.
|
Request
Response
|
SubscriptionFacadeClient.createSubscriptions(Map)
SubscriptionFacadeClient.createRecurringOder(Map)
|
Activate |
/Subscription[1]
|
Activates a subscription or a recurring order which is in inactive state.
The subscription to be activated is identified by either:
- The subscription ID
- For a recurring order, the parent Order ID
- For a subscription, the parent Order and Order Item ID
The service moves the subscription to active state. If the next fulfillment date
has passed, it sets the next fulfillment date to current date and creates the scheduled
actions to place the child order.
|
Request
Response
|
SubscriptionFacadeClient.activateSubscription(Map) |
Cancel |
/Subscription[1]
|
Cancels a subscription or a recurring order
For both the types, the below parameter is mandatory:
- subscriptionId - The subscription ID of the
recurring order or the subscription.
This service is invoked the store front when it receives a cancel
request. It has a configurable notice period that is set by the
merchant based on the store policies. When a user places a cancel
request, this services verifies if the difference between the
current time and the next order date is at least equal to or
greater than the notice period. If the time difference is
sufficient, the subscription is immediately canceled and if it is
insufficient, a cancel job is scheduled to take place later, keeping the notice
period in mind.
|
Request
Response
Request
Response
|
SubscriptionFacadeClient.cancelSubscription(Map) |
Renew |
/Subscription[1]
|
The renew subscription service is an internal service embedded as part
of the create subscription service and is used to determine
if the subscription being currently created can be said to have been
renewed from an existing subscription of the shopper.
A subscription is said to have been renewed if both of the below
conditions are true
- The ProductBean of the newly created subscription is equal
to the ProductBean of the subscription that was chosen
- The start date of the newly created subscription is greater
than the end date of the subscription that was chosen
If there are multiple subscriptions that match the above rule, a
subscription whose catalog entry ID is equal to the catalog entry ID of
the
newly created subscription is chosen.
If there are many candidates with the same catalog entry ID, the
subscription that is closest to the newly created subscription, in
terms of having the least difference between its end date and the
start date of the new subscription is chosen.
|
|
|
GetSubscription |
IBM_Store_Summary
IBM_Store_Details
|
/Subscription[SubscriptionIdentifier[(UniqueID=)]]
|
Gets the details of a subscription entity for both
subscription and recurring order using the uniqueID
of the
subscription entity.
|
Request
Response
|
getSubscriptionDetailsByUniqueIDs |
IBM_Store_Summary
IBM_Store_Details
|
/Subscription[BuyerIdentifier[UniqueID=] and (SubscriptionTypeCode=)]
|
Gets the information of the recurring order/subscription of a
registered user using
the memberID of the registered user and the
subscription type code
The value of the subscription type code decides whether the
recurring order or subscription
information needs to be retrieved
The possible values of subscription type code are:
- RecurringOrder for recurring order
- TIME-BASED for time based subscription
- EVENT-BASED for event based subscription
- TIME-EVENT-BASED for time and event based
subscription
- All to retrieve all the subscriptions for a registered user
except the recurring order
|
Request
Response
|
findRecurringOrdersForUser
findAllSubscriptionsForUser
findSubscriptionForUserBySubscriptionType
|
Access Profile
Some sample XML request and response web service messages are provided for each noun.
These sample messages might not include all properties or attributes.
To view a sample message that includes other properties or attributes,
enable logging and tracing for the appropriate component and then call the web service to set or change the
properties or attributes. Review the corresponding log file to see the request or response information.
Access Profile |
Data Returned |
IBM_Store_Summary |
- /Subscription/SubscriptionIdentifier/UniqueID
- /Subscription/StoreIdentifier/UniqueID
- /Subscription/BuyerIdentifier/UniqueID
- /Subscription/PurchaseDetails/ParentOrderIdentifier/UniqueID
-
/Subscription/PurchaseDetails/ParentOrderItemIdentifier/UniqueID
- /Subscription/PurchaseDetails/SubscribedItem/UniqueID
- /Subscription/SubscriptionInfo/PaymentInfo/TotalCost
- /Subscription/SubscriptionInfo/PaymentInfo/TotalCost/@currency
- /Subscription/SubscriptionInfo/PaymentInfo/AmountPaid
-
/Subscription/SubscriptionInfo/PaymentInfo/AmountPaid/@currency
-
/Subscription/SubscriptionInfo/FulfillmentSchedule/StartInfo/StartDate
-
/Subscription/SubscriptionInfo/FulfillmentSchedule/FrequencyInfo/Frequency
-
/Subscription/SubscriptionInfo/FulfillmentSchedule/FrequencyInfo/Frequency/@uom
-
/Subscription/SubscriptionInfo/FulfillmentSchedule/FrequencyInfo/NextOccurence
-
/Subscription/SubscriptionInfo/FulfillmentSchedule/EndInfo/EndDate
-
/Subscription/SubscriptionInfo/FulfillmentSchedule/EndInfo/Duration
-
/Subscription/SubscriptionInfo/FulfillmentSchedule/EndInfo/Duration/@uom
-
/Subscription/SubscriptionInfo/FulfillmentSchedule/EndInfo/TotalOccurrences
-
/Subscription/SubscriptionInfo/PaymentSchedule/StartInfo/StartDate
-
/Subscription/SubscriptionInfo/PaymentSchedule/FrequencyInfo/Frequency
-
/Subscription/SubscriptionInfo/PaymentSchedule/FrequencyInfo/Frequency/@uom
-
/Subscription/SubscriptionInfo/PaymentSchedule/FrequencyInfo/NextOccurence
-
/Subscription/SubscriptionInfo/PaymentSchedule/FrequencyInfo/RemainingOccurrences
-
/Subscription/SubscriptionInfo/PaymentSchedule/FrequencyInfo/CompletedOccurrences
- /Subscription/SubscriptionInfo/PaymentSchedule/EndInfo/EndDate
-
/Subscription/SubscriptionInfo/PaymentSchedule/EndInfo/Duration
-
/Subscription/SubscriptionInfo/PaymentSchedule/EndInfo/Duration/@uom
-
/Subscription/SubscriptionInfo/PaymentSchedule/EndInfo/TotalOccurrences
- /Subscription/Description
- /Subscription/CancelledDate
- /Subscription/State
- /Subscription/SubscriptionTypeCode
- /Subscription/TimePlaced
|
This profile is used to get the basic information of all the recurring
orders/subscriptions for a shopper
|
Request
Response
|
IBM_Store_Details |
IBM_Store_Summary
+
- /Subscription/SubscriptionInfo/PaymentInfo/AmountToCharge
-
/Subscription/SubscriptionInfo/PaymentInfo/AmountToCharge/@currency
-
/Subscription/SubscriptionInfo/FulfillmentSchedule/FrequencyInfo/RemainingOccurrences
-
/Subscription/SubscriptionInfo/FulfillmentSchedule/FrequencyInfo/CompletedOccurrences
- /Subscription/SuspendedPeriod/SuspendDate
- /Subscription/SuspendedPeriod/ResumeDate
-
/Subscription/RenewalInfo/RenewedSubscriptionIdentifier/UniqueID
- /Subscription/LastUpdate
|
This profile is used to get the detailed information of a specific
recurring order/subscription for a shopper
|
Request
Response
|
XSD files