{ "parameters": {, "type": { "name": "type", "in": "query", "description": "The type of document to return from the search. 1 = Products. 2 = Categories. 3 = Manufacturers. 4 = All types. Default is 1/Products.", "required": false, "type": "integer" }, "sortBy": { "name": "sortBy", "in": "query", "description": "The name of the field to sort a search by. If empty the system will sort by relevance. Valid values are 'priceAsc', 'priceDesc', 'nameDesc', 'nameAsc', 'idDesc', 'idAsc', 'productOrder'", "required": false, "type": "string" }, "searchString": { "name": "searchString", "in": "query", "description": "The search term or phase to use for the search.", "required": true, "type": "string" }, "firstRow": { "name": "firstRow", "in": "query", "description": "The first row of results to display. Eg., if there are 10 results per page, to display page 2, set this to 11. Note: the number of items per page is set by administrators.", "required": false, "type": "integer" }, "categoryID": { "name": "categoryID", "in": "query", "description": "If provided, the search will be limited to products under the specified categoryID. Ignored if the 'type' parameter is anything other than 1.", "required": false, "type": "number" }, "categoryCode": { "name": "categoryCode", "in": "query", "description": "If provided, the search will be limited to products under the specified category code. Ignored if the 'type' parameter is anything other than 1.", "required": false, "type": "string" }, "facets": { "name": "facets", "in": "query", "description": "The list of checked off facets to filter the search by, if Faceted Search is enabled.", "required": false, "type": "array" }, "code": { "name": "code", "in": "query", "description": "The code for the item. If a product, this can be the code or seoCode.", "required": true, "type": "string" } }, "paths": { "/ProductList": { "get": { "summary": "Product List", "description": "List (one page) of active products in the store.", "tags": [ "Public/Customer-Facing Operations" ], "parameters": [ { "$ref": "#/parameters/firstRow" }, { "$ref": "#/parameters/sortBy" }, { "$ref": "#/parameters/facets" } ], "responses": { "200": { "description": "Search Result", "schema": { "$ref": "#/definitions/SearchResult" } }, "default": { "description": "Error", "schema": { "$ref": "../swagger-spec.json#/definitions/Error" } } } } }, "/Product": { "get": { "summary": "Product", "description": "Request for the details of a single Product in the system.", "tags": [ "Public/Customer-Facing Operations" ], "parameters": [ { "$ref": "#/parameters/code" } ], "responses": { "200": { "description": "Product Result", "schema": { "$ref": "product.json.html#/definitions/WrappedProduct" } }, "default": { "description": "Error", "schema": { "$ref": "../swagger-spec.json#/definitions/Error" } } } } }, "/Search": { "get": { "summary": "Basic Search", "description": "Perform a basic (database) search for products.", "tags": [ "Public/Customer-Facing Operations" ], "parameters": [ { "$ref": "#/parameters/searchString" }, { "$ref": "#/parameters/firstRow" } ], "responses": { "200": { "description": "Search Result", "schema": { "$ref": "#/definitions/SearchResult" } }, "default": { "description": "Error", "schema": { "$ref": "../swagger-spec.json#/definitions/Error" } } } } }, "/AdvancedSearch": { "get": { "summary": "Advanced Search", "description": "Perform a search for products or other documents from the Advanced Search index.", "tags": [ "Public/Customer-Facing Operations" ], "parameters": [ { "$ref": "#/parameters/searchString" }, { "$ref": "#/parameters/firstRow" }, { "$ref": "#/parameters/type" }, { "$ref": "#/parameters/sortBy" }, { "$ref": "#/parameters/categoryID" }, { "$ref": "#/parameters/categoryCode" }, { "$ref": "#/parameters/facets" } ], "responses": { "200": { "description": "Search Result", "schema": { "$ref": "#/definitions/SearchResult" } }, "default": { "description": "Error", "schema": { "$ref": "../swagger-spec.json#/definitions/Error" } } } } }, "/Category": { "get": { "summary": "Category", "description": "Request for the details of a single Category in the system.", "tags": [ "Public/Customer-Facing Operations" ], "parameters": [ { "$ref": "#/parameters/code" }, { "$ref": "#/parameters/firstRow" }, { "$ref": "#/parameters/sortBy" }, { "$ref": "#/parameters/facets" } ], "responses": { "200": { "description": "Category Result", "schema": { "$ref": "category.json.html#/definitions/WrappedCategory" } }, "default": { "description": "Error", "schema": { "$ref": "../swagger-spec.json#/definitions/Error" } } } } }, "/Manufacturer": { "get": { "summary": "Manufacturer", "description": "Request for the details of a single Manufacturer in the system.", "tags": [ "Public/Customer-Facing Operations" ], "parameters": [ { "$ref": "#/parameters/code" }, { "$ref": "#/parameters/firstRow" }, { "$ref": "#/parameters/sortBy" }, { "$ref": "#/parameters/facets" } ], "responses": { "200": { "description": "Manufacturer Result", "schema": { "$ref": "manufacturer.json.html#/definitions/WrappedManufacturer" } }, "default": { "description": "Error", "schema": { "$ref": "../swagger-spec.json#/definitions/Error" } } } } } }, "definitions": { "SearchResult": { "type": "object", "properties": { "success": { "type": "boolean" }, "errors": { "type": "array", "items": { "type": "string" } }, "messages": { "type": "array", "items": { "type": "string" } }, "jsonResult": { "type": "object", "properties": { "items": { "type": "array", "description": "The list of objects matching the search criteria. For Advanced Search it could be products, catgories, manufactures, or a mixture.", "items": { "$ref": "product.json.html#/definitions/Product" } }, "itemCount": { "description": "The total number of items matching the criteria. This value may used to compose paging parameters.", "type": "integer" }, "itemsPerPage": { "description": "The number of items listed per page. This value is set on the server. It may used to compose paging parameters.", "type": "integer" }, "firstRow": { "description": "The value of the 'firstRow' parameter that was submitted. This value may used to compose paging parameters.", "type": "integer" }, "sortBy": { "description": "How the search was sorted. Pertains to Advanced Search only.", "type": "string" } } } } } } }