Feature Pack 7

Get promotion list by query type and parameters

The following example shows how to get promotion list by query type and parameters. The query type could be byProduct or byCategory.

Request


GET /wcs/resources/store/10001/associated_promotion?q=byProduct&qProductId=12831 HTTPS/1.1
Host: testserver.mycompany.com
Content-Type: application/json

Response


HTTPS/1.1 200 OK
Content-Type: application/json

{
	"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"
		}
	]
}