spot

This class provides RESTful services to retrieve spot details.

Handler Class:

com.ibm.commerce.rest.marketing.handler.SpotHandler

Method Summary

HTTP MethodPathDescription
GET/store/{storeId}/spot?q={q}Find spots in a store.
GET/store/{storeId}/spot/{spotId}Find a spot in a store using its unique identifier.

Method Details

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

Find spots in a store.

Handler Method:

findSpotsByQuery

Secure Call Mandatory:

true

Partial Authentication Allowed:

false

Parameters:
NameDescriptionParameter TypeData TypeRequiredAllow Multiple
storeIdThe store identifier.pathstringtrueN/A
qThe query name.querystringtruefalse
qTypeType of the e-spot. For instance : qType=MARKETING. Required for search by type.querystringfalsefalse
qNameName of the e-spot used to find all spots with at least a partial match in the name or description. Required for search by name.querystringfalsefalse
catalogIdThe catalog identifier. If none is specified, the store default catalog shall be used.querystringfalsefalse
pageSizePage size. Used to limit the amount of data returned by a query. Valid values include positive integers of 1 and above. The "pageNumber" must be specified for paging to work.querystringfalsefalse
pageNumberPage number, starting at 1. Valid values include positive integers of 1 and above. The "pageSize" must be specified for paging to work.querystringfalsefalse
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:

spot-spot

GET /store/{storeId}/spot/{spotId}

Find a spot in a store using its unique identifier.

Handler Method:

findSpotByID

Secure Call Mandatory:

true

Partial Authentication Allowed:

false

Parameters:
NameDescriptionParameter TypeData TypeRequiredAllow Multiple
storeIdThe store identifier.pathstringtrueN/A
spotIdE-Spot identifier.pathintegertrueN/A
pageNumberPage number, starting at 1. Valid values include positive integers of 1 and above. The "pageSize" must be specified for paging to work.queryintegerfalsefalse
pageSizePage size. Used to limit the amount of data returned by a query. Valid values include positive integers of 1 and above. The "pageNumber" must be specified for paging to work.queryintegerfalsefalse
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:

spot-spot


Example

Request:
GET /wcs/resources/store/10001/spot/10589
HTTP Status Code:

200

Response:
{
	"MarketingSpot": [
		{
			"description": "Display the main ad on About Dress Designer page",
			"spotId": "10589",
			"spotName": "AboutDressDesignerPageMainAd",
			"type": "MARKETING",
			"uiDisplayable": 1
		}
	],
	"recordSetComplete": true,
	"recordSetCount": 1,
	"recordSetStartNumber": 0,
	"recordSetTotal": 1,
	"resourceId": "https:\/\/localhost:443\/wcs\/resources\/store\/10001\/spot\/10589",
	"resourceName": "spot"
}

Data Type Details

spot-spot

Properties:
NameData TypeRequired
recordSetTotalstringfalse
MarketingSpotspot-spot_item arrayfalse
recordSetStartNumberstringfalse
recordSetCompletestringfalse
recordSetCountstringfalse

spot-spot_item

Properties:
NameData TypeRequired
userDataFieldspot-spot_item.userDataField arrayfalse
uiDisplayablestringfalse
typestringfalse
descriptionstringfalse
spotNamestringfalse
spotIdstringfalse

spot-spot_item.userDataField

Properties:
NameData TypeRequired
valuestringfalse
keystringtrue