associated_promotion

This class provides RESTful services to access retrieve associated promotions.

Handler Class:

com.ibm.commerce.rest.marketing.handler.AssociatedPromotionHandler

Method Summary

HTTP MethodPathDescription
GET/store/{storeId}/associated_promotion?q={q}Get promotion list by query name and parameters. See the individual queries for the details on input and output.
GET/store/{storeId}/associated_promotion?q=byCategoryGet promotions list by category ID.
GET/store/{storeId}/associated_promotion?q=byCategoryGet promotions list by category ID.
GET/store/{storeId}/associated_promotion?q=byNameThis method retrieves the calculation code details using the name assigned to the calculation code.
GET/store/{storeId}/associated_promotion?q=byProductGet promotions list by product ID.
GET/store/{storeId}/associated_promotion?q=byProductGet promotions list by product ID.

Method Details

GET /store/{storeId}/associated_promotion?q={q}

Get promotion list by query name and parameters. See the individual queries for the details on input and output.

Handler Method:

findPromotionList

Secure Call Mandatory:

false

Partial Authentication Allowed:

true

Parameters:
NameDescriptionParameter TypeData TypeRequiredAllow Multiple
storeIdThe store identifier.pathstringtrueN/A
qThe query name.querystringtruefalse
HTTP Status Codes:
HTTP Status CodeDescription
200The requested completed successfully.
400Bad request. Some of the inputs provided to the request aren't valid.
401Not authenticated. The user session isn't valid.
403The user isn't authorized to perform the specified request.
500Internal server error. Additional details will be contained on the server logs.

GET /store/{storeId}/associated_promotion?q=byCategory

Get promotions list by category ID.

Handler Method:

findPromotionsByCategory

Secure Call Mandatory:

false

Partial Authentication Allowed:

true

Parameters:
NameDescriptionParameter TypeData TypeRequiredAllow Multiple
storeIdThe store identifier.pathstringtrueN/A
profileNameProfile name. Profiles determine the subset of data to be returned by a query.querystringfalsefalse
qCalculationUsageIdThe calculation usage ID.querystringfalsefalse
qCategoryIdThe category ID.querystringtruefalse
qCodeThe calculation code name.querystringfalsefalse
qEnableStorePathWhether the data bean searches for calculation code based on store path. Default value is <b>true</b>.querystringfalsefalse
qIncludeCategoryPromotionsWhether to exclude category promotions. Default value is <b>false</b>.querystringfalsefalse
qIncludeNonManagementCenterPromotionsWhether all the promotions in the store have been created in Management Center. Default value is <b>false</b>querystringfalsefalse
qIncludeParentCategoriesWhether to retrieve the calculation codes attached to the parent category of the specified catalog group. Default value is <b>false</b>.querystringfalsefalse
qIncludePromotionCodeWhether to exclude the calculation codes that require a promotion code. Default value is <b>true</b>.querystringfalsefalse
qShipModeIdThe ship mode ID.querystringfalsefalse
qUserIdThe user ID.querystringfalsefalse
qThe query name.querystringtruefalse
qDisplayLevelqueryintegerfalsefalse
qIncludeChildItemsquerybooleanfalsefalse
qIncludeParentProductquerybooleanfalsefalse
qIncludeUnentitledPromotionsByMemberGroupquerybooleanfalsefalse
qProductIdqueryintegerfalsefalse
qStoreIdqueryintegerfalsefalse
HTTP Status Codes:
HTTP Status CodeDescription
200The requested completed successfully.
400Bad request. Some of the inputs provided to the request aren't valid.
401Not authenticated. The user session isn't valid.
403The user isn't authorized to perform the specified request.
404The specified resource couldn't be found.
500Internal server error. Additional details will be contained on the server logs.
Response Data Type:

com.ibm.commerce.fulfillment.beans.CalculationCodeListDataBean_IBM_catalogEntryDetailed


Example

Request:
GET /wcs/resources/store/10001/associated_promotion?q=byCategory&qIncludeParentCategories=true&responseFormat=json&profileName=IBM_associatedPromotionsList_Summary&qCategoryId=10043
HTTP Status Code:

200

Response:
{
	"associatedPromotions": [
		{
			"associatePromotionId": "10011",
			"code": "Furniture Category Discount",
			"description": {
				"langId": "-1",
				"longDescription": "Save 20% on all Furniture items! No restrictions!",
				"shortDescription": "Save 20% on Furniture!"
			},
			"endDate": "2999-12-31 23:59:59.0",
			"startDate": "2004-01-01 00:00:00.0"
		}
	]
}

GET /store/{storeId}/associated_promotion?q=byCategory

Get promotions list by category ID.

Handler Method:

findPromotionsByCategoryWAssociatedPromotionSummaryProfileName

Secure Call Mandatory:

false

Partial Authentication Allowed:

true

Parameters:
NameDescriptionParameter TypeData TypeRequiredAllow Multiple
storeIdThe store identifier.pathstringtrueN/A
profileNameProfile name. Profiles determine the subset of data to be returned by a query.querystringfalsefalse
qCalculationUsageIdThe calculation usage ID.querystringfalsefalse
qCategoryIdThe category ID.querystringtruefalse
qCodeThe calculation code name.querystringfalsefalse
qEnableStorePathWhether the data bean searches for calculation code based on store path. Default value is <b>true</b>.querystringfalsefalse
qIncludeCategoryPromotionsWhether to exclude category promotions. Default value is <b>false</b>.querystringfalsefalse
qIncludeNonManagementCenterPromotionsWhether all the promotions in the store have been created in Management Center. Default value is <b>false</b>querystringfalsefalse
qIncludeParentCategoriesWhether to retrieve the calculation codes attached to the parent category of the specified catalog group. Default value is <b>false</b>.querystringfalsefalse
qIncludePromotionCodeWhether to exclude the calculation codes that require a promotion code. Default value is <b>true</b>.querystringfalsefalse
qShipModeIdThe ship mode ID.querystringfalsefalse
qUserIdThe user ID.querystringfalsefalse
qThe query name.querystringtruefalse
qDisplayLevelqueryintegerfalsefalse
qIncludeChildItemsquerybooleanfalsefalse
qIncludeParentProductquerybooleanfalsefalse
qIncludeUnentitledPromotionsByMemberGroupquerybooleanfalsefalse
qProductIdqueryintegerfalsefalse
qStoreIdqueryintegerfalsefalse
HTTP Status Codes:
HTTP Status CodeDescription
200The requested completed successfully.
400Bad request. Some of the inputs provided to the request aren't valid.
401Not authenticated. The user session isn't valid.
403The user isn't authorized to perform the specified request.
404The specified resource couldn't be found.
500Internal server error. Additional details will be contained on the server logs.
Response Data Type:

com.ibm.commerce.fulfillment.beans.CalculationCodeListDataBean_IBM_associatedPromotionsList_Summary


Example

Request:
GET /wcs/resources/store/10001/associated_promotion?q=byCategory&qIncludeParentCategories=true&responseFormat=json&profileName=IBM_associatedPromotionsList_Summary&qCategoryId=10043
HTTP Status Code:

200

Response:
{
	"associatedPromotions": [
		{
			"associatePromotionId": "10011",
			"code": "Furniture Category Discount",
			"description": {
				"langId": "-1",
				"longDescription": "Save 20% on all Furniture items! No restrictions!",
				"shortDescription": "Save 20% on Furniture!"
			},
			"endDate": "2999-12-31 23:59:59.0",
			"startDate": "2004-01-01 00:00:00.0"
		}
	]
}

GET /store/{storeId}/associated_promotion?q=byName

This method retrieves the calculation code details using the name assigned to the calculation code.

Handler Method:

byName

Secure Call Mandatory:

false

Partial Authentication Allowed:

true

Parameters:
NameDescriptionParameter TypeData TypeRequiredAllow Multiple
storeIdThe store identifier.pathstringtrueN/A
profileNameProfile name. Profiles determine the subset of data to be returned by a query.querystringfalsefalse
qCalculationUsageIdThe calculation usage ID.querystringtruefalse
qCodeThe calculation code name.querystringtruefalse
qIncludePromotionCodeWhether to exclude the calculation codes that require a promotion code. Default value is <b>true</b>.querystringtruefalse
qThe query name.querystringtruefalse
qCategoryIdqueryintegerfalsefalse
qDisplayLevelqueryintegerfalsefalse
qEnableStorePathquerybooleanfalsefalse
qIncludeCategoryPromotionsquerybooleanfalsefalse
qIncludeChildItemsquerybooleanfalsefalse
qIncludeNonManagementCenterPromotionsquerybooleanfalsefalse
qIncludeParentCategoriesquerybooleanfalsefalse
qIncludeParentProductquerybooleanfalsefalse
qIncludeUnentitledPromotionsByMemberGroupquerybooleanfalsefalse
qProductIdqueryintegerfalsefalse
qShipModeIdqueryintegerfalsefalse
qStoreIdqueryintegerfalsefalse
qUserIdqueryintegerfalsefalse
HTTP Status Codes:
HTTP Status CodeDescription
200The requested completed successfully.
400Bad request. Some of the inputs provided to the request aren't valid.
401Not authenticated. The user session isn't valid.
403The user isn't authorized to perform the specified request.
404The specified resource couldn't be found.
500Internal server error. Additional details will be contained on the server logs.
Response Data Type:

com.ibm.commerce.fulfillment.beans.CalculationCodeListDataBean_IBM_catalogEntryDetailed


Example

Request:
GET /wcs/resources/store/10001/associated_promotion?q=byName&profileName=IBM_catalogEntryDetailed&qIncludePromotionCode=true&qCalculationUsageId=-1&responseFormat=json&qCode=Register+and+Save
HTTP Status Code:

200

Response:
{
	"resultList": [
		{
			"attachedCatalogEntries": [
			],
			"calculationCodeId": "10007",
			"calculationUsageId": "-1",
			"code": "Register and Save",
			"descriptionString": "Register today and save 7%.",
			"endDate": "2999-12-31 23:59:59.0",
			"isPromotionRelated": true,
			"longDescriptionString": "Register with us today and save 7% on your next order.",
			"startDate": "2004-01-01 00:00:00.0"
		}
	]
}

GET /store/{storeId}/associated_promotion?q=byProduct

Get promotions list by product ID.

Handler Method:

findPromotionsByProduct

Secure Call Mandatory:

false

Partial Authentication Allowed:

true

Parameters:
NameDescriptionParameter TypeData TypeRequiredAllow Multiple
storeIdThe store identifier.pathstringtrueN/A
profileNameProfile name. Profiles determine the subset of data to be returned by a query.querystringfalsefalse
qProductIdThe product ID.querystringtruefalse
qCalculationUsageIdThe calculation usage ID.querystringfalsefalse
qCodeThe calculation code name.querystringfalsefalse
qEnableStorePathWhether the data bean searches for calculation code based on store path. Default value is <b>true</b>.querystringfalsefalse
qIncludeCategoryPromotionsWhether to exclude category promotions. Default value is <b>false</b>.querystringfalsefalse
qIncludeChildItemsWhether to include the child items. Default value is <b>false</b>.querystringfalsefalse
qIncludeNonManagementCenterPromotionsWhether all the promotions in the store have been created in Management Center. Default value is <b>false</b>querystringfalsefalse
qIncludeParentCategoriesWhether to retrieve the calculation codes attached to the parent category of the specified catalog group. Default value is <b>false</b>.querystringfalsefalse
qIncludeParentProductWhether to retrieve the calculation codes attached to the parent product of the specified catalog entry. Default value is <b>false</b>querystringfalsefalse
qIncludePromotionCodeWhether to exclude the calculation codes that require a promotion code. Default value is <b>true</b>.querystringfalsefalse
qIncludeUnentitledPromotionsByMemberGroupWhether to include promotions that are targeted to a member group if the user does not belong to the member group. Default value is <b>false</b>.querystringfalsefalse
qShipModeIdThe ship mode ID.querystringfalsefalse
qUserIdThe user ID.querystringfalsefalse
qThe query name.querystringtruefalse
qCategoryIdqueryintegerfalsefalse
qDisplayLevelqueryintegerfalsefalse
qStoreIdqueryintegerfalsefalse
HTTP Status Codes:
HTTP Status CodeDescription
200The requested completed successfully.
400Bad request. Some of the inputs provided to the request aren't valid.
401Not authenticated. The user session isn't valid.
403The user isn't authorized to perform the specified request.
404The specified resource couldn't be found.
500Internal server error. Additional details will be contained on the server logs.
Response Data Type:

com.ibm.commerce.fulfillment.beans.CalculationCodeListDataBean_IBM_catalogEntryDetailed


Example

Request:
GET /wcs/resources/store/10001/associated_promotion?q=byProduct&qCalculationUsageId=-1&profileName=IBM_catalogEntryDetailed&qProductId=12836&qIncludeChildItems=true&qIncludeParentProduct=true&responseFormat=json
HTTP Status Code:

200

Response:
{
	"resultList": [
		{
			"attachedCatalogEntries": [
			],
			"calculationCodeId": "10011",
			"calculationUsageId": "-1",
			"code": "Furniture Category Discount",
			"descriptionString": "Save 20% on Furniture!",
			"endDate": "2999-12-31 23:59:59.0",
			"isPromotionRelated": true,
			"longDescriptionString": "Save 20% on all Furniture items! No restrictions!",
			"startDate": "2004-01-01 00:00:00.0"
		}
	]
}

GET /store/{storeId}/associated_promotion?q=byProduct

Get promotions list by product ID.

Handler Method:

findPromotionsByProductWAssociatedPromotionSummaryProfileName

Secure Call Mandatory:

false

Partial Authentication Allowed:

true

Parameters:
NameDescriptionParameter TypeData TypeRequiredAllow Multiple
storeIdThe store identifier.pathstringtrueN/A
profileNameProfile name. Profiles determine the subset of data to be returned by a query.querystringfalsefalse
qProductIdThe product ID.querystringtruefalse
qCalculationUsageIdThe calculation usage ID.querystringfalsefalse
qCodeThe calculation code name.querystringfalsefalse
qEnableStorePathWhether the data bean searches for calculation code based on store path. Default value is <b>true</b>.querystringfalsefalse
qIncludeCategoryPromotionsWhether to exclude category promotions. Default value is <b>false</b>.querystringfalsefalse
qIncludeChildItemsWhether to include the child items. Default value is <b>false</b>.querystringfalsefalse
qIncludeNonManagementCenterPromotionsWhether all the promotions in the store have been created in Management Center. Default value is <b>false</b>querystringfalsefalse
qIncludeParentCategoriesWhether to retrieve the calculation codes attached to the parent category of the specified catalog group. Default value is <b>false</b>.querystringfalsefalse
qIncludeParentProductWhether to retrieve the calculation codes attached to the parent product of the specified catalog entry. Default value is <b>false</b>querystringfalsefalse
qIncludePromotionCodeWhether to exclude the calculation codes that require a promotion code. Default value is <b>true</b>.querystringfalsefalse
qIncludeUnentitledPromotionsByMemberGroupWhether to include promotions that are targeted to a member group if the user does not belong to the member group. Default value is <b>false</b>.querystringfalsefalse
qShipModeIdThe ship mode ID.querystringfalsefalse
qUserIdThe user ID.querystringfalsefalse
qThe query name.querystringtruefalse
qCategoryIdqueryintegerfalsefalse
qDisplayLevelqueryintegerfalsefalse
qStoreIdqueryintegerfalsefalse
HTTP Status Codes:
HTTP Status CodeDescription
200The requested completed successfully.
400Bad request. Some of the inputs provided to the request aren't valid.
401Not authenticated. The user session isn't valid.
403The user isn't authorized to perform the specified request.
404The specified resource couldn't be found.
500Internal server error. Additional details will be contained on the server logs.
Response Data Type:

com.ibm.commerce.fulfillment.beans.CalculationCodeListDataBean_IBM_associatedPromotionsList_Summary


Example

Request:
GET /wcs/resources/store/10001/associated_promotion?q=byProduct&qCalculationUsageId=-1&profileName=IBM_catalogEntryDetailed&qProductId=12836&qIncludeChildItems=true&qIncludeParentProduct=true&responseFormat=json
HTTP Status Code:

200

Response:
{
	"resultList": [
		{
			"attachedCatalogEntries": [
			],
			"calculationCodeId": "10011",
			"calculationUsageId": "-1",
			"code": "Furniture Category Discount",
			"descriptionString": "Save 20% on Furniture!",
			"endDate": "2999-12-31 23:59:59.0",
			"isPromotionRelated": true,
			"longDescriptionString": "Save 20% on all Furniture items! No restrictions!",
			"startDate": "2004-01-01 00:00:00.0"
		}
	]
}

Data Type Details

com.ibm.commerce.fulfillment.beans.CalculationCodeListDataBean_IBM_associatedPromotionsList_Summary

com.ibm.commerce.fulfillment.beans.CalculationCodeListDataBean_IBM_associatedPromotionsList_Summary.associatedPromotions

Properties:
NameData TypeRequired
startDatestringfalse
associatePromotionIdstringfalse
endDatestringfalse
descriptioncom.ibm.commerce.fulfillment.beans.CalculationCodeListDataBean_IBM_associatedPromotionsList_Summary.associatedPromotions.descriptionfalse
codestringfalse

com.ibm.commerce.fulfillment.beans.CalculationCodeListDataBean_IBM_associatedPromotionsList_Summary.associatedPromotions.description

Properties:
NameData TypeRequired
shortDescriptionstringfalse
longDescriptionstringfalse
langIdstringfalse

com.ibm.commerce.fulfillment.beans.CalculationCodeListDataBean_IBM_catalogEntryDetailed

com.ibm.commerce.fulfillment.beans.CalculationCodeListDataBean_IBM_catalogEntryDetailed.resultList

Properties:
NameData TypeRequired
startDatestringfalse
longDescriptionStringstringfalse
calculationCodeIdstringfalse
isPromotionRelatedstringfalse
calculationUsageIdstringfalse
endDatestringfalse
attachedCatalogEntriescom.ibm.commerce.fulfillment.beans.CalculationCodeListDataBean_IBM_catalogEntryDetailed.resultList.attachedCatalogEntries arrayfalse
descriptionStringstringfalse
codestringfalse

com.ibm.commerce.fulfillment.beans.CalculationCodeListDataBean_IBM_catalogEntryDetailed.resultList.attachedCatalogEntries

com.ibm.commerce.fulfillment.beans.CalculationCodeListDataBean_IBM_catalogEntryDetailed.resultList.attachedCatalogEntries.calculatedContractPrice

Properties:
NameData TypeRequired
currencystringfalse
amountstringfalse

com.ibm.commerce.fulfillment.beans.CalculationCodeListDataBean_IBM_catalogEntryDetailed.resultList.attachedCatalogEntries.description

Properties:
NameData TypeRequired
shortDescriptionstringfalse
longDescriptionstringfalse
keyWordstringfalse
availablestringfalse
availabilityDatestringfalse
auxDescription1stringfalse
auxDescription2stringfalse
namestringfalse
thumbNailstringfalse
fullImagestringfalse
publishedstringfalse

com.ibm.commerce.fulfillment.beans.CalculationCodeListDataBean_IBM_catalogEntryDetailed.resultList.attachedCatalogEntries.listPrice

Properties:
NameData TypeRequired
currencystringfalse
amountstringfalse

com.ibm.commerce.fulfillment.beans.CalculationCodeListDataBean_IBM_catalogEntryDetailed.resultList.attachedCatalogEntries.productDataBean

Properties:
NameData TypeRequired
productIdstringfalse