api

Information about the resources and APIs available on the server.

Handler Class:

com.ibm.commerce.rest.api.handler.ApiHandler

Method Summary

HTTP MethodPathDescription
GET/apiGet the list of available resources on the server.
GET/api/aggregatedGet the aggregated list of available resources on multiple server.
GET/api/bundle/{resourceName}Generate the default API resource bundle used for translation.
GET/api/resource/{resourceName}Describe the APIs available on a resource by name.

Method Details

GET /api

Get the list of available resources on the server.

Handler Method:

getResourceList

Secure Call Mandatory:

false

Partial Authentication Allowed:

false

HTTP Status Codes:
HTTP Status CodeDescription
200The requested completed successfully.
400Bad request. Some of the inputs provided to the request aren't valid.
403If API Discovery is disabled on the server.
500Internal server error. Additional details will be contained on the server logs.
Response Data Type:

com.ibm.commerce.rest.api.handler.ApiHandler$ResourceLinkList


Example

Request:
GET /wcs/resources/api
HTTP Status Code:

200

Response:
{
	"apiVersion": "WC.TOOLKIT Enterprise Version : 7 Fix Pack : 9 Feature Pack : 7.0.8.0",
	"apis": [
		{
			"description": "An aggregate of responses from multiple REST API requests.",
			"path": "http:\/\/localhost:80\/wcs\/resources\/api\/resource\/aggregate"
		},
		{
			"description": "Information about the resources and APIs available on the server.",
			"path": "http:\/\/localhost:80\/wcs\/resources\/api\/resource\/api"
		},
		{
			"description": "Accurate, secure transactions require that a second individual approve some electronic marketplace actions before they proceed. This individual, called an approver, can accept or reject requests to perform a specific action. This class provides RESTful services to retrieve order and buyer approval status record details and to approve or reject them. ",
			"path": "http:\/\/localhost:80\/wcs\/resources\/api\/resource\/approval_status"
		},
		{
			"description": "This class provides RESTful services to add, get, update, and delete assigned coupons for the current shopping cart.",
			"path": "http:\/\/localhost:80\/wcs\/resources\/api\/resource\/assigned_coupon"
		},
		{
			"description": "This class provides RESTful services to add, get, update, and delete assigned promotion codes for the current shopping cart.",
			"path": "http:\/\/localhost:80\/wcs\/resources\/api\/resource\/assigned_promotion_code"
		},
		{
			"description": "This class provides RESTful services to access retrieve associated promotions.",
			"path": "http:\/\/localhost:80\/wcs\/resources\/api\/resource\/associated_promotion"
		},
		{
			"description": "This class provides RESTful services to add, update, delete, and get items in the shopping cart and checkout.It also provides services to get usable shipping and payment information by delegating to the Order BOD service.",
			"path": "http:\/\/localhost:80\/wcs\/resources\/api\/resource\/cart"
		},
		{
			"description": "This class provides RESTful services to get category data for search-based catalog navigation. It performs the services by delegating to the CatalogNavigationView BOD service.",
			"path": "http:\/\/localhost:80\/wcs\/resources\/api\/resource\/category"
		},
		{
			"description": "This class provides RESTful services to get and update a checkout profile.",
			"path": "http:\/\/localhost:80\/wcs\/resources\/api\/resource\/checkout_profile"
		},
		{
			"description": "This class provides RESTful services to retrieve Configuration details.",
			"path": "http:\/\/localhost:80\/wcs\/resources\/api\/resource\/configuration"
		},
		{
			"description": "This class provides RESTful services to access retrieve contract details.",
			"path": "http:\/\/localhost:80\/wcs\/resources\/api\/resource\/contract"
		},
		{
			"description": "This class provides RESTful services to get countries or regions and states or provinces information.",
			"path": "http:\/\/localhost:80\/wcs\/resources\/api\/resource\/country"
		},
		{
			"description": "This class provides RESTful services to get and process coupon information. For example, deleting a coupon from the list.",
			"path": "http:\/\/localhost:80\/wcs\/resources\/api\/resource\/coupon"
		},
		{
			"description": "A currency format. Contains formatting information on a currency.",
			"path": "http:\/\/localhost:80\/wcs\/resources\/api\/resource\/currency_format"
		},
		{
			"description": "This class provides RESTful services to get display price(list price) for catalog entry. It uses the DisplayPrice noun.",
			"path": "http:\/\/localhost:80\/wcs\/resources\/api\/resource\/display_price"
		},
		{
			"description": "This class provides RESTful services to get e-Marketing Spot data. It uses the MarketingSpotData noun.",
			"path": "http:\/\/localhost:80\/wcs\/resources\/api\/resource\/espot"
		},
		{
			"description": "This class provides RESTful services to trigger marketing based on certain types of events. For example, CategoryDisplay, ProductDisplay, or Search.",
			"path": "http:\/\/localhost:80\/wcs\/resources\/api\/resource\/event"
		},
		{
			"description": "This class provides RESTful services to display summary and detail for a file upload job. It uses the FileUploadJob noun.",
			"path": "http:\/\/localhost:80\/wcs\/resources\/api\/resource\/file_upload_job"
		},
		{
			"description": "This class provides RESTful services to get geo node details. It performs the service by delegating to the GeoNode BOD service.",
			"path": "http:\/\/localhost:80\/wcs\/resources\/api\/resource\/geonode"
		},
		{
			"description": "This class provides RESTful services to create a guest and log the guest out. It performs the service by delegating to the Person BOD service.",
			"path": "http:\/\/localhost:80\/wcs\/resources\/api\/resource\/guest_identity"
		},
		{
			"description": "This class provides RESTful services to get inventory availability details for products. It performs the service by delegating to the InventoryAvailability BOD service.",
			"path": "http:\/\/localhost:80\/wcs\/resources\/api\/resource\/inventoryavailability"
		},
		{
			"description": "This class provides RESTful services to login and logout a registered shopper using their user name and password. It performs the service by delegating to the Person BOD service.",
			"path": "http:\/\/localhost:80\/wcs\/resources\/api\/resource\/login_identity"
		},
		{
			"description": "This class provides RESTful services to login and logout a registered user using an LTPA token. It performs the service by delegating to the Person BOD service.",
			"path": "http:\/\/localhost:80\/wcs\/resources\/api\/resource\/ltpa_identity"
		},
		{
			"description": "A member group is a grouping of members - users, organizations, or other member groups - used for various business purposes.",
			"path": "http:\/\/localhost:80\/wcs\/resources\/api\/resource\/member_group"
		},
		{
			"description": "This class provides RESTful services to get order history and order details.",
			"path": "http:\/\/localhost:80\/wcs\/resources\/api\/resource\/order"
		},
		{
			"description": "This class provides RESTful services to register an organization, to get or update organization information.",
			"path": "http:\/\/localhost:80\/wcs\/resources\/api\/resource\/organization"
		},
		{
			"description": "A store page. Contains information on the page such as SEO meta data.",
			"path": "http:\/\/localhost:80\/wcs\/resources\/api\/resource\/page"
		},
		{
			"description": "Layout of a store page. Contains information used by the store to render the page.",
			"path": "http:\/\/localhost:80\/wcs\/resources\/api\/resource\/page_design"
		},
		{
			"description": "This class provides RESTful services to add, get, update, and delete payment instructions for the current shopping cart.",
			"path": "http:\/\/localhost:80\/wcs\/resources\/api\/resource\/payment_instruction"
		},
		{
			"description": "This class provides RESTful services to get person details, register a member, and update a member.  This class also provides RESTful services used by an administrator to find person information, register new and update existing user information.",
			"path": "http:\/\/localhost:80\/wcs\/resources\/api\/resource\/person"
		},
		{
			"description": "This class provides RESTful services to get contact details, register a person as a member, and update a member.",
			"path": "http:\/\/localhost:80\/wcs\/resources\/api\/resource\/person_contact"
		},
		{
			"description": "This class provides RESTful services to generate the preview token.",
			"path": "http:\/\/localhost:80\/wcs\/resources\/api\/resource\/previewToken"
		},
		{
			"description": "This class provides RESTful services to retrieve entitled and range prices.",
			"path": "http:\/\/localhost:80\/wcs\/resources\/api\/resource\/price"
		},
		{
			"description": "This class provides RESTful services to get product data for search-based catalog navigation. It performs the service by delegating to the CatalogNavigationView BOD service.",
			"path": "http:\/\/localhost:80\/wcs\/resources\/api\/resource\/product"
		},
		{
			"description": "This class provides RESTful services to get promotion data using the Promotion noun.",
			"path": "http:\/\/localhost:80\/wcs\/resources\/api\/resource\/promotion"
		},
		{
			"description": "A requisition list is a list of items that is used to create orders at a later date.",
			"path": "http:\/\/localhost:80\/wcs\/resources\/api\/resource\/requisition_list"
		},
		{
			"description": "This class has the ability to return information about Search Term associations ie Landing pages",
			"path": "http:\/\/localhost:80\/wcs\/resources\/api\/resource\/search_term_association"
		},
		{
			"description": "This class provides RESTful services to retrieve the customer segment data",
			"path": "http:\/\/localhost:80\/wcs\/resources\/api\/resource\/segment"
		},
		{
			"description": "This class provides RESTful services to get and update shipping information in the shopping cart.",
			"path": "http:\/\/localhost:80\/wcs\/resources\/api\/resource\/shipping_info"
		},
		{
			"description": "This class provides RESTful services to retrieve spot details.",
			"path": "http:\/\/localhost:80\/wcs\/resources\/api\/resource\/spot"
		},
		{
			"description": "This class provides RESTful services to get available resource URLs for a store.",
			"path": "http:\/\/localhost:80\/wcs\/resources\/api\/resource\/store"
		},
		{
			"description": "This class provides RESTful services to get store locator details. It performs the service by delegating to the PhysicalStore and GeoNode BOD services.",
			"path": "http:\/\/localhost:80\/wcs\/resources\/api\/resource\/storelocator"
		},
		{
			"description": "This class has the ability to return information about subscriptions",
			"path": "http:\/\/localhost:80\/wcs\/resources\/api\/resource\/subscription"
		},
		{
			"description": "A term or condition of an account or contract.",
			"path": "http:\/\/localhost:80\/wcs\/resources\/api\/resource\/term_condition"
		},
		{
			"description": "This class provides RESTful services to get the user context of a shopper. For example, PersonalizationId.",
			"path": "http:\/\/localhost:80\/wcs\/resources\/api\/resource\/user_context"
		},
		{
			"description": "Definition of a widget. Contains information on the widget but not its inclusion in a layout.",
			"path": "http:\/\/localhost:80\/wcs\/resources\/api\/resource\/widget_definition"
		},
		{
			"description": "This class provides RESTful services to get and manage a shopper's wish lists. Note: You must enable the multiple wish lists feature in the Management Center Store Management tool.",
			"path": "http:\/\/localhost:80\/wcs\/resources\/api\/resource\/wishlist"
		}
	],
	"swaggerVersion": "1.2"
}

GET /api/aggregated

Get the aggregated list of available resources on multiple server.

Handler Method:

getAggregatedResourceList

Secure Call Mandatory:

false

Partial Authentication Allowed:

false

HTTP Status Codes:
HTTP Status CodeDescription
200The requested completed successfully.
400Bad request. Some of the inputs provided to the request aren't valid.
403If API Discovery is disabled on the server.
500Internal server error. Additional details will be contained on the server logs.
Response Data Type:

com.ibm.commerce.rest.api.handler.ApiHandler$ResourceLinkList

GET /api/bundle/{resourceName}

Generate the default API resource bundle used for translation.

Handler Method:

getResourceDescriptionBundle

Secure Call Mandatory:

false

Partial Authentication Allowed:

false

Parameters:
NameDescriptionParameter TypeData TypeRequiredAllow Multiple
resourceNameThe name of the resource.pathstringtrueN/A
HTTP Status Codes:
HTTP Status CodeDescription
200The requested completed successfully.
400Bad request. Some of the inputs provided to the request aren't valid.
403If API Discovery is disabled on the server.
500Internal server error. Additional details will be contained on the server logs.

GET /api/resource/{resourceName}

Describe the APIs available on a resource by name.

Handler Method:

getResourceDescription

Secure Call Mandatory:

false

Partial Authentication Allowed:

false

Parameters:
NameDescriptionParameter TypeData TypeRequiredAllow Multiple
resourceNameThe name of the resource.pathstringtrueN/A
HTTP Status Codes:
HTTP Status CodeDescription
200The requested completed successfully.
400Bad request. Some of the inputs provided to the request aren't valid.
403If API Discovery is disabled on the server.
500Internal server error. Additional details will be contained on the server logs.
Response Data Type:

com.ibm.commerce.rest.api.handler.ApiHandler$ResourceDescription


Example

Request:
GET /wcs/resources/api/resource/aggregate
HTTP Status Code:

200

Response:
{
	"apiVersion": "WC.TOOLKIT Enterprise Version : 7 Fix Pack : 9 Feature Pack : 7.0.8.0",
	"apis": [
		{
			"operations": [
				{
					"method": "GET",
					"nickname": "findByQuery",
					"notes": "",
					"parameters": [
						{
							"description": "The store identifier.",
							"enum": [
								"0",
								"10001",
								"10051",
								"10101",
								"10151",
								"10201",
								"10701",
								"10751",
								"10202",
								"10203",
								"10801"
							],
							"name": "storeId",
							"paramType": "path",
							"required": true,
							"type": "string"
						},
						{
							"allowMultiple": false,
							"description": "The query name.",
							"name": "q",
							"paramType": "query",
							"required": true,
							"type": "string"
						}
					],
					"partialAuthenticationAllowed": false,
					"produces": [
						"application\/json",
						"application\/xml",
						"application\/xhtml+xml",
						"application\/atom+xml"
					],
					"responseClass": "Empty",
					"responseMessages": [
						{
							"code": 200,
							"message": "The requested completed successfully."
						},
						{
							"code": 400,
							"message": "Bad request. Some of the inputs provided to the request aren't valid."
						},
						{
							"code": 401,
							"message": "Not authenticated. The user session isn't valid."
						},
						{
							"code": 403,
							"message": "The user isn't authorized to perform the specified request."
						},
						{
							"code": 404,
							"message": "The specified resource couldn't be found."
						},
						{
							"code": 500,
							"message": "Internal server error. Additional details will be contained on the server logs."
						}
					],
					"secureCallMandatory": false,
					"summary": "Finds an aggregate by a query.",
					"type": "Empty",
					"x-internal": "false",
					"x-pathPlus": "\/store\/{storeId}\/aggregate?q={q}"
				}
			],
			"path": "\/store\/{storeId}\/aggregate"
		}
	],
	"basePath": "http:\/\/@localhost\/wcs\/resources",
	"description": "An aggregate of responses from multiple REST API requests.",
	"models": {
		"Empty": {
			"description": "Empty model. Used as default value when no model is specified.",
			"id": "Empty",
			"properties": {
			}
		}
	},
	"resourcePath": "store\/{storeId}\/aggregate",
	"swaggerVersion": "1.2",
	"x-handlerClass": "com.ibm.commerce.rest.aggregate.handler.AggregateHandler"
}

Data Type Details

com.ibm.commerce.rest.api.handler.ApiHandler$ApiDescription

Description of an API and its operations.

Properties:
NameData TypeRequired
pathstringtrue
descriptionstringfalse
operationscom.ibm.commerce.rest.api.handler.ApiHandler$OperationDescription arrayfalse

com.ibm.commerce.rest.api.handler.ApiHandler$ErrorResponseDescription

Description of a potential error response.

Properties:
NameData TypeRequired
reasonstringfalse
codestringtrue

com.ibm.commerce.rest.api.handler.ApiHandler$ModelDescription

Model description.

Properties:
NameData TypeRequired
propertiescom.ibm.commerce.rest.api.handler.ApiHandler$ModelPropertyDescriptionContainerfalse
idstringtrue
descriptionstringfalse

com.ibm.commerce.rest.api.handler.ApiHandler$ModelDescriptionContainer

This object lists the models used by the operations. Each model is contained in a property where the property name matches the name of the model.

Properties:
NameData TypeRequired
samplecom.ibm.commerce.rest.api.handler.ApiHandler$ModelDescriptionfalse

com.ibm.commerce.rest.api.handler.ApiHandler$ModelPropertyDescription

Description of a property used in a model.

Properties:
NameData TypeRequired
itemscom.ibm.commerce.rest.api.handler.ApiHandler$ModelPropertyDescriptionfalse
enumstring arrayfalse
refstringfalse
typestringfalse
requiredstringfalse

com.ibm.commerce.rest.api.handler.ApiHandler$ModelPropertyDescriptionContainer

This object lists the "model property descriptions" used by the model. Each "model property description" is contained in a property where the property name matches the name of the "model property".

Properties:
NameData TypeRequired
samplecom.ibm.commerce.rest.api.handler.ApiHandler$ModelPropertyDescriptiontrue

com.ibm.commerce.rest.api.handler.ApiHandler$OperationDescription

Description of an operation.

Properties:
NameData TypeRequired
notesstringfalse
methodstringtrue
producesstring arrayfalse
secureCallMandatorystringfalse
summarystringfalse
consumesstring arrayfalse
parameterscom.ibm.commerce.rest.api.handler.ApiHandler$OperationParameterDescription arrayfalse
typestringfalse
errorResponsescom.ibm.commerce.rest.api.handler.ApiHandler$ErrorResponseDescription arrayfalse
nicknamestringfalse
partialAuthenticationAllowedstringfalse

com.ibm.commerce.rest.api.handler.ApiHandler$OperationParameterDescription

Description of an operation parameter.

Properties:
NameData TypeRequired
enumstring arrayfalse
paramTypestringtrue
formatstringfalse
allowMultiplestringfalse
typestringtrue
namestringtrue
descriptionstringfalse
requiredstringfalse

com.ibm.commerce.rest.api.handler.ApiHandler$ResourceDescription

Description of a resource and its APIs.

Properties:
NameData TypeRequired
resourcePathstringfalse
basePathstringtrue
apiscom.ibm.commerce.rest.api.handler.ApiHandler$ApiDescription arrayfalse
modelscom.ibm.commerce.rest.api.handler.ApiHandler$ModelDescriptionContainerfalse
descriptionstringfalse
swaggerVersionstringtrue
apiVersionstringtrue