This class has the ability to return information about subscriptions
com.ibm.commerce.rest.subscription.handler.SubscriptionHandler
HTTP Method | Path | Description |
---|---|---|
GET | /store/{storeId}/subscription?q={q} | Run a subscription query. |
GET | /store/{storeId}/subscription?q=byBuyerIdAndSubscriptionType | Finds subscriptions by user and subscription type |
GET | /store/{storeId}/subscription?q=bySubscriptionIds | Finds subscriptions by subscription ids |
GET | /store/{storeId}/subscription/{subscriptionId} | Finds subcription infomation by its subscriptionId |
POST | /store/{storeId}/subscription/{orderId}/submit_recurring_or_subscription | Submits a recurring or subscription. |
DELETE | /store/{storeId}/subscription/{orderId}/cancel_recurring_or_subscription | Cancel the specified recurring or subscription. |
Run a subscription query.
findByQuery
false
false
Name | Description | Parameter Type | Data Type | Required | Allow Multiple |
---|---|---|---|---|---|
storeId | The store identifier. | path | string | true | N/A |
q | The query name. | query | string | true | false |
HTTP Status Code | Description |
---|---|
200 | The requested completed successfully. |
400 | Bad request. Some of the inputs provided to the request aren't valid. |
401 | Not authenticated. The user session isn't valid. |
403 | The user isn't authorized to perform the specified request. |
500 | Internal server error. Additional details will be contained on the server logs. |
Finds subscriptions by user and subscription type
byBuyerIdAndSubscriptionType
false
false
Name | Description | Parameter Type | Data Type | Required | Allow Multiple |
---|---|---|---|---|---|
storeId | The store identifier. | path | string | true | N/A |
q | The query name. | query | string | true | false |
profileName | Profile name. Profiles determine the subset of data to be returned by a query. | query | string | false | false |
subscriptionTypeCode | The subscription type code ie(All,RecurringOrder) | query | string | true | false |
buyerId | The buyer Id | query | string | true | false |
HTTP Status Code | Description |
---|---|
200 | The requested completed successfully. |
400 | Bad request. Some of the inputs provided to the request aren't valid. |
401 | Not authenticated. The user session isn't valid. |
403 | The user isn't authorized to perform the specified request. |
500 | Internal server error. Additional details will be contained on the server logs. |
subscription-IBM_Store_Summary
GET /wcs/resources/store/10001/subscription?q=byBuyerIdAndSubscriptionType&buyerId=2003&subscriptionTypeCode=RecurringOrder
200
{ "recordSetComplete": true, "recordSetCount": 1, "recordSetStartNumber": 0, "recordSetTotal": 1, "resourceId": "https:\/\/localhost:443\/wcs\/resources\/store\/10001\/subscription?q=byBuyerIdAndSubscriptionType&buyerId=2003&subscriptionTypeCode=RecurringOrder", "resourceName": "subscription", "resultList": [ { "purchaseDetails": { "parentOrderIdentifier": { "parentOrderId": "25018" }, "userData": { "userDataField": [ ] } }, "state": "Active", "subscriptionIdentifier": { "subscriptionId": "4507" }, "subscriptionInfo": { "fulfillmentSchedule": { "endInfo": { "duration": { "uom": "DAY ", "value": 36524.0 }, "endDate": "2214-09-10T18:00:00.798Z", "totalOccurrences": null, "userData": null }, "frequencyInfo": { "completedOccurrences": null, "frequency": { "uom": "WEE ", "value": 1.0 }, "nextOccurence": "2114-09-10T18:00:00.798Z", "remainingOccurrences": 5218, "userData": null }, "startInfo": { "startDate": "2114-09-10T18:00:00.798Z", "userData": null }, "userData": null }, "paymentInfo": { "amountPaid": null, "amountToCharge": { "currency": "USD", "value": 0.01000 }, "totalCost": { "currency": "USD", "value": 25.62000 }, "userData": { "userDataField": [ ] } }, "paymentSchedule": { "endInfo": null, "frequencyInfo": { "completedOccurrences": null, "frequency": { "uom": "WEE ", "value": 1.0 }, "nextOccurence": "2114-09-10T18:00:00.798Z", "remainingOccurrences": null, "userData": null }, "startInfo": null, "userData": { "userDataField": [ ] } }, "userData": null } } ] }
Finds subscriptions by subscription ids
bySubscriptionIds
false
false
Name | Description | Parameter Type | Data Type | Required | Allow Multiple |
---|---|---|---|---|---|
storeId | The store identifier. | path | string | true | N/A |
q | The query name. | query | string | true | false |
subscriptionId | The subscription Id | query | string | true | true |
profileName | Profile name. Profiles determine the subset of data to be returned by a query. | query | string | false | false |
HTTP Status Code | Description |
---|---|
200 | The requested completed successfully. |
400 | Bad request. Some of the inputs provided to the request aren't valid. |
401 | Not authenticated. The user session isn't valid. |
403 | The user isn't authorized to perform the specified request. |
500 | Internal server error. Additional details will be contained on the server logs. |
Finds subcription infomation by its subscriptionId
bySubscriptionId
false
false
Name | Description | Parameter Type | Data Type | Required | Allow Multiple |
---|---|---|---|---|---|
storeId | The store identifier. | path | string | true | N/A |
subscriptionId | The subcription id | path | string | true | N/A |
profileName | Profile name. Profiles determine the subset of data to be returned by a query. | query | string | false | false |
HTTP Status Code | Description |
---|---|
200 | The requested completed successfully. |
400 | Bad request. Some of the inputs provided to the request aren't valid. |
401 | Not authenticated. The user session isn't valid. |
403 | The user isn't authorized to perform the specified request. |
404 | The specified resource couldn't be found. |
500 | Internal server error. Additional details will be contained on the server logs. |
Submits a recurring or subscription.
submitRecurringOrSubscription
false
false
Name | Description | Parameter Type | Data Type | Required | Allow Multiple |
---|---|---|---|---|---|
storeId | The store identifier. | path | string | true | N/A |
orderId | The order id | path | string | true | N/A |
body | Request body. | body | com.ibm.commerce.rest.subscription.handler.SubscriptionHandler$SubmitRecurringOrSubscription | false | N/A |
HTTP Status Code | Description |
---|---|
200 | The requested completed successfully. |
201 | The requested resource has been created. |
400 | Bad request. Some of the inputs provided to the request aren't valid. |
401 | Not authenticated. The user session isn't valid. |
403 | The user isn't authorized to perform the specified request. |
404 | The specified resource couldn't be found. |
500 | Internal server error. Additional details will be contained on the server logs. |
com.ibm.commerce.rest.subscription.handler.SubscriptionHandler$SubmitRecurringOrSubscriptionResponse
POST /wcs/resources/store/10001/subscription/25018/submit_recurring_or_subscription
{ "catalogId": "10001", "endDate": "2214-09-10T18:00:00.798Z", "fulfillmentInterval": "1", "fulfillmentIntervalUOM": "WEE", "orderId": "25018", "purchaseorder_id": "25018", "requesttype": "ajax", "startDate": "2114-09-10T18:00:00.798Z", "storeId": "10001" }
201
{ "orderId": [ "25018" ] }
Cancel the specified recurring or subscription.
cancelRecurringOrSubscription
false
false
Name | Description | Parameter Type | Data Type | Required | Allow Multiple |
---|---|---|---|---|---|
storeId | The store identifier. | path | string | true | N/A |
orderId | The order id | path | string | true | N/A |
subscriptionId | The subcription id | query | string | false | false |
HTTP Status Code | Description |
---|---|
200 | The requested completed successfully. |
400 | Bad request. Some of the inputs provided to the request aren't valid. |
401 | Not authenticated. The user session isn't valid. |
403 | The user isn't authorized to perform the specified request. |
404 | The specified resource couldn't be found. |
500 | Internal server error. Additional details will be contained on the server logs. |
com.ibm.commerce.rest.subscription.handler.SubscriptionHandler$CancelRecurringOrSubscription
DELETE /wcs/resources/store/10001/subscription/232etr/cancel_recurring_or_subscription?subscriptionId=4507
200
{ "state": [ "Cancelled" ], "subscriptionId": [ "4507" ], "subscriptionType": [ "RecurringOrder" ] }
Cancel recurring/subscription order
Name | Data Type | Required |
---|---|---|
state | string | false |
subscriptionType | string | false |
subscriptionId | string | false |
Request body from submitting a Recurring order/Subscription
Name | Data Type | Required |
---|---|---|
fulfillmentInterval | string | false |
payMethodId | string | true |
timePeriodUOM | string | true |
paymentIntervalUOM | string | true |
endDate | string | false |
billing_address_id | string | true |
paymentInterval | string | true |
purchaseorder_id | string | true |
timePeriod | string | true |
startDate | string | false |
fulfillmentIntervalUOM | string | false |
paymentTCId | string | true |
piAmount | string | true |
storeId | string | false |
numberOfFulfillment | string | true |
Information about an Subscription/Recurring order
Name | Data Type | Required |
---|---|---|
orderId | string | false |
Name | Data Type | Required |
---|---|---|
recordSetTotal | string | false |
recordSetComplete | string | false |
recordSetStartNumber | string | false |
resultList | subscription-IBM_Store_Details_item array | false |
recordSetCount | string | false |
Name | Data Type | Required |
---|---|---|
recordSetTotal | string | false |
recordSetComplete | string | false |
recordSetStartNumber | string | false |
resultList | subscription-IBM_Store_Summary_item array | false |
recordSetCount | string | false |