Class: WalmartApIs::FeedsApi
- Defined in:
- lib/walmart_ap_is/apis/feeds_api.rb
Overview
FeedsApi
Constant Summary
Constants inherited from BaseApi
Instance Attribute Summary
Attributes inherited from BaseApi
Instance Method Summary collapse
-
#update_bulk_prices_legacy(feed_type, wm_sec_access_token, wm_consumer_channel_type, wm_qos_correlation_id, wm_svc_name, accept, file) ⇒ ApiResponse
Updates prices in bulk.
Methods inherited from BaseApi
#initialize, #new_parameter, #new_request_builder, #new_response_handler, user_agent, user_agent_parameters
Constructor Details
This class inherits a constructor from WalmartApIs::BaseApi
Instance Method Details
#update_bulk_prices_legacy(feed_type, wm_sec_access_token, wm_consumer_channel_type, wm_qos_correlation_id, wm_svc_name, accept, file) ⇒ ApiResponse
Updates prices in bulk. In one Feed you can update up to 10,000 items in bulk. To ensure optimal Feed processing time, we recommend sending no more than 1000 items in one Feed and keeping the Feed sizes below 10 MB. The price sequence guarantee is observed by the bulk price update functionality, subject to the following rules: The timestamp used to determine precedence is passed in the request headers. All price updates in the feed are considered to have the same timestamp. The timestamp in the XML file is used only for auditing. You can send a single SKU multiple times in one Feed. If a SKU is repeated in a Feed, the price will be set for that SKU on Walmart.com, but there is no guarantee as to which SKU’s price within that feed will be used. This API should be used in preference to the update a price. It should be called no sooner than 24 hours after a new item is set up and a wpid (Walmart Part ID) is available. Thereafter, the bulk price update has an service level agreement (SLA) of 15 minutes. After the update is submitted, wait for at least five minutes before verifying whether the bulk price update was successful. Individual SKU price update success or failure is only available after the entire feed is processed. If a SKU’s price update fails (for example, multiple price updates were sent for the same SKU in a single feed), an error will be returned. You can download the request body sample from <a href=“/file/mp/us/price-feed.zip”>here</a> retrieved in the Token API call to track the consumer request by channel. Use the Consumer Channel Type received during onboarding which identifies each API call and used to track and debug issues; use a random generated GUID for this ID
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 73 74 75 76 77 |
# File 'lib/walmart_ap_is/apis/feeds_api.rb', line 46 def update_bulk_prices_legacy(feed_type, wm_sec_access_token, wm_consumer_channel_type, wm_qos_correlation_id, wm_svc_name, accept, file) @api_call .request(new_request_builder(HttpMethodEnum::POST, '/feeds', Server::SERVER_1) .query_param(new_parameter(feed_type, key: 'feedType') .is_required(true)) .header_param(new_parameter(wm_sec_access_token, key: 'WM_SEC.ACCESS_TOKEN') .is_required(true)) .header_param(new_parameter(wm_consumer_channel_type, key: 'WM_CONSUMER.CHANNEL.TYPE') .is_required(true)) .header_param(new_parameter(wm_qos_correlation_id, key: 'WM_QOS.CORRELATION_ID') .is_required(true)) .header_param(new_parameter(wm_svc_name, key: 'WM_SVC.NAME') .is_required(true)) .header_param(new_parameter(accept, key: 'Accept') .is_required(true)) .multipart_param(new_parameter(file, key: 'file') .is_required(true) .default_content_type('application/octet-stream'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(Json1.method(:from_hash)) .is_api_response(true)) .execute end |