Class: InventoryManagementAndItemManagementAndOrderManagementAndPriceManagement::SearchController
- Inherits:
-
BaseController
- Object
- BaseController
- InventoryManagementAndItemManagementAndOrderManagementAndPriceManagement::SearchController
- Defined in:
- lib/inventory_management_and_item_management_and_order_management_and_price_management/controllers/search_controller.rb
Overview
SearchController
Constant Summary
Constants inherited from BaseController
Instance Attribute Summary
Attributes inherited from BaseController
Instance Method Summary collapse
-
#catalog_search(page, limit, next_cursor, wm_sec_access_token, wm_consumer_channel_type, wm_qos_correlation_id, wm_svc_name, accept, body) ⇒ SuccessfulOperation11
Get Catalog Search API allows you to search your Seller Catalog by providing a payload with Query, and Filters, and Sort.
-
#item_search(query, upc, gtin, wm_sec_access_token, wm_consumer_channel_type, wm_qos_correlation_id, wm_svc_name, accept) ⇒ SuccessfulOperation41
The Item Search API allows you to query the Walmart.com global product catalog by item keyword, UPC or GTIN.
Methods inherited from BaseController
#initialize, #new_parameter, #new_request_builder, #new_response_handler, user_agent
Constructor Details
This class inherits a constructor from InventoryManagementAndItemManagementAndOrderManagementAndPriceManagement::BaseController
Instance Method Details
#catalog_search(page, limit, next_cursor, wm_sec_access_token, wm_consumer_channel_type, wm_qos_correlation_id, wm_svc_name, accept, body) ⇒ SuccessfulOperation11
Get Catalog Search API allows you to search your Seller Catalog by providing a payload with Query, and Filters, and Sort. You can search by attributes like Price, Listing Status, and Rating along with support for wildcard queries. retrieve for paginated data. to retrieve per page. pagination to fetch the next set of items from your search results more efficiently. access token retrieved in the Token API call to track the consumer request by channel. Use the Consumer Channel Type received during onboarding unique ID which identifies each API call and used to track and debug issues; use a random generated GUID for this ID Name description here
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/controllers/search_controller.rb', line 35 def catalog_search(page, limit, next_cursor, wm_sec_access_token, wm_consumer_channel_type, wm_qos_correlation_id, wm_svc_name, accept, body) @api_call .request(new_request_builder(HttpMethodEnum::POST, '/items/catalog/search', Server::DEFAULT) .query_param(new_parameter(page, key: 'page')) .query_param(new_parameter(limit, key: 'limit')) .query_param(new_parameter(next_cursor, key: 'nextCursor')) .header_param(new_parameter(wm_sec_access_token, key: 'WM_SEC.ACCESS_TOKEN')) .header_param(new_parameter(wm_consumer_channel_type, key: 'WM_CONSUMER.CHANNEL.TYPE')) .header_param(new_parameter(wm_qos_correlation_id, key: 'WM_QOS.CORRELATION_ID')) .header_param(new_parameter(wm_svc_name, key: 'WM_SVC.NAME')) .header_param(new_parameter(accept, key: 'Accept')) .header_param(new_parameter('application/json', key: 'Content-Type')) .body_param(new_parameter(body)) .body_serializer(proc do |param| param.to_json unless param.nil? end)) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(SuccessfulOperation11.method(:from_hash)) .local_error('400', 'Bad Request', ItemsCatalogSearch400ErrorException) .local_error('404', 'Not Found', ItemsCatalogSearch404ErrorException) .local_error('500', 'Internal Server Error', ItemsCatalogSearch500ErrorException)) .execute end |
#item_search(query, upc, gtin, wm_sec_access_token, wm_consumer_channel_type, wm_qos_correlation_id, wm_svc_name, accept) ⇒ SuccessfulOperation41
The Item Search API allows you to query the Walmart.com global product catalog by item keyword, UPC or GTIN. You can review all item information provided in the response, so you can decide whether or not you want to sell this item. You must specify at least one query parameter, either: ‘query’, ‘gtin’, or ‘upc’. If there are more than one item in the catalog, the search returns the first 20 items in the response. Additionally, you can use the information provided in the ‘relatedQueries’ response parameter to run a new search for similar items. Throttling: This endpoint is throttled at a maximum of 200 transactions per minute (TPM) per seller. String. This parameter allows users to perform a general search based on descriptive terms related to the product. Universal Product Code (UPC). 14-digit Global Trade Item Number (GTIN). access token retrieved in the Token API call to track the consumer request by channel. Use the Consumer Channel Type received during onboarding unique ID which identifies each API call and used to track and debug issues; use a random generated GUID for this ID Name
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/controllers/search_controller.rb', line 105 def item_search(query, upc, gtin, wm_sec_access_token, wm_consumer_channel_type, wm_qos_correlation_id, wm_svc_name, accept) @api_call .request(new_request_builder(HttpMethodEnum::GET, '/items/walmart/search', Server::DEFAULT) .query_param(new_parameter(query, key: 'query')) .query_param(new_parameter(upc, key: 'upc')) .query_param(new_parameter(gtin, key: 'gtin')) .header_param(new_parameter(wm_sec_access_token, key: 'WM_SEC.ACCESS_TOKEN')) .header_param(new_parameter(wm_consumer_channel_type, key: 'WM_CONSUMER.CHANNEL.TYPE')) .header_param(new_parameter(wm_qos_correlation_id, key: 'WM_QOS.CORRELATION_ID')) .header_param(new_parameter(wm_svc_name, key: 'WM_SVC.NAME')) .header_param(new_parameter(accept, key: 'Accept'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(SuccessfulOperation41.method(:from_hash)) .local_error('400', 'Bad Request', ItemsWalmartSearch400ErrorException) .local_error('500', 'Internal Server Error', ItemsWalmartSearch500ErrorException)) .execute end |