Class: Peddler::APIs::AmazonWarehousingAndDistribution20240509
- Inherits:
-
Peddler::API
- Object
- Peddler::API
- Peddler::APIs::AmazonWarehousingAndDistribution20240509
- Defined in:
- lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/error.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/address.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/error_list.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/carrier_code.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/prep_details.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/sku_quantity.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/inbound_order.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/package_volume.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/package_weight.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/shipment_labels.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/sku_eligibility.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/inbound_packages.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/inbound_shipment.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/measurement_data.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/prep_instruction.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/product_quantity.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/shipment_listing.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/tracking_details.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/inventory_details.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/inventory_listing.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/inventory_summary.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/product_attribute.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/expiration_details.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/inventory_quantity.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/package_dimensions.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/destination_details.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/inbound_eligibility.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/inbound_preferences.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/replenishment_order.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/distribution_package.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/distribution_product.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/transportation_details.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/inbound_order_reference.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/inbound_shipment_summary.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/sku_ineligibility_reason.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/outbound_shipment_summary.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/replenishment_preferences.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/order_ineligibility_reason.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/inbound_order_creation_data.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/replenishment_order_listing.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/distribution_package_contents.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/distribution_package_quantity.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/replenishment_order_reference.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/distribution_ineligible_reason.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/replenishment_order_creation_data.rb,
sig/peddler/apis/amazon_warehousing_and_distribution_2024_05_09.rbs
Overview
The Selling Partner API for Amazon Warehousing and Distribution
The Selling Partner API for Amazon Warehousing and Distribution (AWD) provides programmatic access to information about AWD shipments and inventory.
Defined Under Namespace
Classes: Address, CarrierCode, DestinationDetails, DistributionIneligibleReason, DistributionPackage, DistributionPackageContents, DistributionPackageQuantity, DistributionProduct, Error, ErrorList, ExpirationDetails, InboundEligibility, InboundOrder, InboundOrderCreationData, InboundOrderReference, InboundPackages, InboundPreferences, InboundShipment, InboundShipmentSummary, InventoryDetails, InventoryListing, InventoryQuantity, InventorySummary, MeasurementData, OrderIneligibilityReason, OutboundShipmentSummary, PackageDimensions, PackageVolume, PackageWeight, PrepDetails, PrepInstruction, ProductAttribute, ProductQuantity, ReplenishmentOrder, ReplenishmentOrderCreationData, ReplenishmentOrderListing, ReplenishmentOrderReference, ReplenishmentPreferences, SKUEligibility, SKUIneligibilityReason, SKUQuantity, ShipmentLabels, ShipmentListing, TrackingDetails, TransportationDetails
Instance Attribute Summary
Attributes inherited from Peddler::API
#access_token, #endpoint, #retries
Instance Method Summary collapse
-
#cancel_inbound(order_id, rate_limit: 1.0) ⇒ Peddler::Response
Cancels an AWD Inbound order and its associated shipment.
-
#check_inbound_eligibility(body, rate_limit: 1.0) ⇒ Peddler::Response
Determines if the packages you specify are eligible for an AWD inbound order and contains error details for ineligible packages.
-
#confirm_inbound(order_id, rate_limit: 1.0) ⇒ Peddler::Response
Confirms an AWD inbound order in
DRAFTstatus. -
#confirm_replenishment_order(order_id) ⇒ Peddler::Response
Confirms an AWD replenishment order in ELIGIBLE state with a set of shipments containing items that are needed to be replenished to an FBA node.
-
#create_inbound(body, rate_limit: 1.0) ⇒ Peddler::Response
Creates a draft AWD inbound order with a list of packages for inbound shipment.
-
#create_replenishment_order(body) ⇒ Peddler::Response
Creates an AWD replenishment order with given products to replenish.
-
#get_inbound(order_id, rate_limit: 2.0) ⇒ Peddler::Response
Retrieves an AWD inbound order.
-
#get_inbound_shipment(shipment_id, sku_quantities: nil, rate_limit: 2.0) ⇒ Peddler::Response
Retrieves an AWD inbound shipment.
-
#get_inbound_shipment_labels(shipment_id, page_type: nil, format_type: nil, rate_limit: 1.0) ⇒ Peddler::Response
Retrieves the box labels for a shipment ID that you specify.
-
#get_replenishment_order(order_id) ⇒ Peddler::Response
Retrieves an AWD Replenishment order with a set of shipments containing items that is/was planned to be replenished into an FBA node.
-
#list_inbound_shipments(sort_by: nil, sort_order: nil, shipment_status: nil, updated_after: nil, updated_before: nil, max_results: 25, next_token: nil, rate_limit: 1.0) ⇒ Peddler::Response
Retrieves a summary of all the inbound AWD shipments associated with a merchant, with the ability to apply optional filters.
-
#list_inventory(sku: nil, sort_order: nil, details: nil, next_token: nil, max_results: 25, rate_limit: 2.0) ⇒ Peddler::Response
Lists AWD inventory associated with a merchant with the ability to apply optional filters.
-
#list_replenishment_orders(updated_after: nil, updated_before: nil, sort_order: nil, max_results: 25, next_token: nil) ⇒ Peddler::Response
Retrieves all the AWD replenishment orders pertaining to a merchant with optional filters.
-
#update_inbound(order_id, body, rate_limit: 1.0) ⇒ Peddler::Response
Updates an AWD inbound order that is in
DRAFTstatus and not yet confirmed. -
#update_inbound_shipment_transport_details(shipment_id, body, rate_limit: 1.0) ⇒ Peddler::Response
Updates transport details for an AWD shipment.
Methods inherited from Peddler::API
#cannot_sandbox!, #delete, #endpoint_uri, #get, #http, #initialize, #must_sandbox!, #patch, #percent_encode, #post, #put, #request, #sandbox, #sandbox?, #stringify_array, #timestamp, #user_agent
Constructor Details
This class inherits a constructor from Peddler::API
Instance Method Details
#cancel_inbound(order_id, rate_limit: 1.0) ⇒ Peddler::Response
This operation can make a static sandbox call.
Cancels an AWD Inbound order and its associated shipment.
58 59 60 61 |
# File 'lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09.rb', line 58 def cancel_inbound(order_id, rate_limit: 1.0) path = "/awd/2024-05-09/inboundOrders/#{percent_encode(order_id)}/cancellation" post(path, rate_limit:) end |
#check_inbound_eligibility(body, rate_limit: 1.0) ⇒ Peddler::Response
This operation can make a static sandbox call.
Determines if the packages you specify are eligible for an AWD inbound order and contains error details for ineligible packages.
130 131 132 133 134 |
# File 'lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09.rb', line 130 def check_inbound_eligibility(body, rate_limit: 1.0) path = "/awd/2024-05-09/inboundEligibility" parser = -> { InboundEligibility } post(path, body:, rate_limit:, parser:) end |
#confirm_inbound(order_id, rate_limit: 1.0) ⇒ Peddler::Response
This operation can make a static sandbox call.
Confirms an AWD inbound order in DRAFT status.
69 70 71 72 |
# File 'lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09.rb', line 69 def confirm_inbound(order_id, rate_limit: 1.0) path = "/awd/2024-05-09/inboundOrders/#{percent_encode(order_id)}/confirmation" post(path, rate_limit:) end |
#confirm_replenishment_order(order_id) ⇒ Peddler::Response
Confirms an AWD replenishment order in ELIGIBLE state with a set of shipments containing items that are needed to be replenished to an FBA node. Order can only be confirmed in ELIGIBLE state.
263 264 265 266 267 268 |
# File 'lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09.rb', line 263 def confirm_replenishment_order(order_id) cannot_sandbox! path = "/awd/2024-05-09/replenishmentOrders/#{percent_encode(order_id)}/confirmation" post(path) end |
#create_inbound(body, rate_limit: 1.0) ⇒ Peddler::Response
This operation can make a static sandbox call.
Creates a draft AWD inbound order with a list of packages for inbound shipment. The operation creates one shipment per order.
21 22 23 24 25 |
# File 'lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09.rb', line 21 def create_inbound(body, rate_limit: 1.0) path = "/awd/2024-05-09/inboundOrders" parser = -> { InboundOrderReference } post(path, body:, rate_limit:, parser:) end |
#create_replenishment_order(body) ⇒ Peddler::Response
This operation can make a static sandbox call.
Creates an AWD replenishment order with given products to replenish. The API will return the order ID of the newly created order and also start an async validation check on the products to e. The order status will transition to ELIGIBLE/INELIGIBLE status from VALIDATING post validation check
239 240 241 242 243 |
# File 'lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09.rb', line 239 def create_replenishment_order(body) path = "/awd/2024-05-09/replenishmentOrders" parser = -> { ReplenishmentOrderReference } post(path, body:, parser:) end |
#get_inbound(order_id, rate_limit: 2.0) ⇒ Peddler::Response
This operation can make a static sandbox call.
Retrieves an AWD inbound order.
33 34 35 36 37 |
# File 'lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09.rb', line 33 def get_inbound(order_id, rate_limit: 2.0) path = "/awd/2024-05-09/inboundOrders/#{percent_encode(order_id)}" parser = -> { InboundOrder } get(path, rate_limit:, parser:) end |
#get_inbound_shipment(shipment_id, sku_quantities: nil, rate_limit: 2.0) ⇒ Peddler::Response
This operation can make a static sandbox call.
Retrieves an AWD inbound shipment.
82 83 84 85 86 87 88 89 |
# File 'lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09.rb', line 82 def get_inbound_shipment(shipment_id, sku_quantities: nil, rate_limit: 2.0) path = "/awd/2024-05-09/inboundShipments/#{percent_encode(shipment_id)}" params = { "skuQuantities" => sku_quantities, }.compact parser = -> { InboundShipment } get(path, params:, rate_limit:, parser:) end |
#get_inbound_shipment_labels(shipment_id, page_type: nil, format_type: nil, rate_limit: 1.0) ⇒ Peddler::Response
This operation can make a static sandbox call.
Retrieves the box labels for a shipment ID that you specify. This is an asynchronous operation. If the label
status is GENERATED, then the label URL is available.
101 102 103 104 105 106 107 108 109 |
# File 'lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09.rb', line 101 def get_inbound_shipment_labels(shipment_id, page_type: nil, format_type: nil, rate_limit: 1.0) path = "/awd/2024-05-09/inboundShipments/#{percent_encode(shipment_id)}/labels" params = { "pageType" => page_type, "formatType" => format_type, }.compact parser = -> { ShipmentLabels } get(path, params:, rate_limit:, parser:) end |
#get_replenishment_order(order_id) ⇒ Peddler::Response
This operation can make a static sandbox call.
Retrieves an AWD Replenishment order with a set of shipments containing items that is/was planned to be replenished into an FBA node.
251 252 253 254 255 |
# File 'lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09.rb', line 251 def get_replenishment_order(order_id) path = "/awd/2024-05-09/replenishmentOrders/#{percent_encode(order_id)}" parser = -> { ReplenishmentOrder } get(path, parser:) end |
#list_inbound_shipments(sort_by: nil, sort_order: nil, shipment_status: nil, updated_after: nil, updated_before: nil, max_results: 25, next_token: nil, rate_limit: 1.0) ⇒ Peddler::Response
This operation can make a static sandbox call.
Retrieves a summary of all the inbound AWD shipments associated with a merchant, with the ability to apply optional filters.
156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 |
# File 'lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09.rb', line 156 def list_inbound_shipments(sort_by: nil, sort_order: nil, shipment_status: nil, updated_after: nil, updated_before: nil, max_results: 25, next_token: nil, rate_limit: 1.0) path = "/awd/2024-05-09/inboundShipments" params = { "sortBy" => sort_by, "sortOrder" => sort_order, "shipmentStatus" => shipment_status, "updatedAfter" => updated_after, "updatedBefore" => updated_before, "maxResults" => max_results, "nextToken" => next_token, }.compact parser = -> { ShipmentListing } get(path, params:, rate_limit:, parser:) end |
#list_inventory(sku: nil, sort_order: nil, details: nil, next_token: nil, max_results: 25, rate_limit: 2.0) ⇒ Peddler::Response
This operation can make a static sandbox call.
Lists AWD inventory associated with a merchant with the ability to apply optional filters.
187 188 189 190 191 192 193 194 195 196 197 198 |
# File 'lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09.rb', line 187 def list_inventory(sku: nil, sort_order: nil, details: nil, next_token: nil, max_results: 25, rate_limit: 2.0) path = "/awd/2024-05-09/inventory" params = { "sku" => sku, "sortOrder" => sort_order, "details" => details, "nextToken" => next_token, "maxResults" => max_results, }.compact parser = -> { InventoryListing } get(path, params:, rate_limit:, parser:) end |
#list_replenishment_orders(updated_after: nil, updated_before: nil, sort_order: nil, max_results: 25, next_token: nil) ⇒ Peddler::Response
This operation can make a static sandbox call.
Retrieves all the AWD replenishment orders pertaining to a merchant with optional filters. API by default will sort orders by updatedAt attribute in descending order.
217 218 219 220 221 222 223 224 225 226 227 228 229 |
# File 'lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09.rb', line 217 def list_replenishment_orders(updated_after: nil, updated_before: nil, sort_order: nil, max_results: 25, next_token: nil) path = "/awd/2024-05-09/replenishmentOrders" params = { "updatedAfter" => updated_after, "updatedBefore" => updated_before, "sortOrder" => sort_order, "maxResults" => max_results, "nextToken" => next_token, }.compact parser = -> { ReplenishmentOrderListing } get(path, params:, parser:) end |
#update_inbound(order_id, body, rate_limit: 1.0) ⇒ Peddler::Response
This operation can make a static sandbox call.
Updates an AWD inbound order that is in DRAFT status and not yet confirmed. Use this operation to update the
packagesToInbound, originAddress and preferences attributes.
47 48 49 50 |
# File 'lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09.rb', line 47 def update_inbound(order_id, body, rate_limit: 1.0) path = "/awd/2024-05-09/inboundOrders/#{percent_encode(order_id)}" put(path, body:, rate_limit:) end |
#update_inbound_shipment_transport_details(shipment_id, body, rate_limit: 1.0) ⇒ Peddler::Response
This operation can make a static sandbox call.
Updates transport details for an AWD shipment.
118 119 120 121 |
# File 'lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09.rb', line 118 def update_inbound_shipment_transport_details(shipment_id, body, rate_limit: 1.0) path = "/awd/2024-05-09/inboundShipments/#{percent_encode(shipment_id)}/transport" put(path, body:, rate_limit:) end |