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/distribution_package.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/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/distribution_package_contents.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/distribution_package_quantity.rb
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.
Constant Summary collapse
- Error =
Error response returned when the request is unsuccessful.
Structure.new do # @return [String] An error code that identifies the type of error that occurred. attribute(:code, String) # @return [String] A message that describes the error condition. attribute(:message, String) # @return [String] Additional details that can help the caller understand or fix the issue. attribute?(:details, String) end
- Address =
Shipping address that represents the origin or destination location.
Structure.new do # @return [String] First line of the address text. attribute(:address_line1, String, from: "addressLine1") # @return [String] Two-digit, ISO 3166-1 alpha-2 formatted country code where this address is located. attribute(:country_code, String, from: "countryCode") # @return [String] Name of the person, business, or institution at this address. attribute(:name, String) # @return [String] State or region where this address is located. Note that this is contextual to the specified # country code. attribute(:state_or_region, String, from: "stateOrRegion") # @return [String] Optional second line of the address text. attribute?(:address_line2, String, from: "addressLine2") # @return [String] Optional third line of the address text. attribute?(:address_line3, String, from: "addressLine3") # @return [String] Optional city where this address is located. attribute?(:city, String) # @return [String] Optional county where this address is located. attribute?(:county, String) # @return [String] Optional district where this address is located. attribute?(:district, String) # @return [String] Optional E.164-formatted phone number for an available contact at this address. attribute?(:phone_number, String, from: "phoneNumber") # @return [String] Optional postal code where this address is located. attribute?(:postal_code, String, from: "postalCode") end
- ErrorList =
This exception is thrown when client inputs are invalid.
Structure.new do # @return [Array<Error>] A list of errors describing the failures. attribute(:errors, [Error]) end
- CarrierCode =
Identifies the carrier that will deliver the shipment.
Structure.new do # @return [String] Denotes the carrier type. attribute?(:carrier_code_type, String, from: "carrierCodeType") # @return [String] Value of the carrier code. attribute?(:carrier_code_value, String, from: "carrierCodeValue") end
- PrepDetails =
The preparation details for a product. This contains the prep category, prep owner, and label owner. Prep instructions are generated based on the specified category.
Structure.new do # @return [String] attribute?(:label_owner, String, from: "labelOwner") # @return [String] The preparation category for shipping an item to Amazon's fulfillment network. attribute?(:prep_category, String, from: "prepCategory") # @return [Array<PrepInstruction>] Contains information about the preparation of the inbound products. The # system auto-generates this field with the use of the `prepCategory`, and if you attempt to pass a value for # this field, the system will ignore it. attribute?(:prep_instructions, [PrepInstruction], from: "prepInstructions") # @return [String] attribute?(:prep_owner, String, from: "prepOwner") end
- SKUQuantity =
Quantity details for a SKU as part of a shipment
Structure.new do # @return [InventoryQuantity] attribute(:expected_quantity, InventoryQuantity, from: "expectedQuantity") # @return [String] The merchant stock keeping unit attribute(:sku, String) # @return [InventoryQuantity] attribute?(:received_quantity, InventoryQuantity, from: "receivedQuantity") end
- InboundOrder =
Represents an AWD inbound order.
Structure.new do # @return [Time] Date when this order was created. attribute(:created_at, Time, from: "createdAt") # @return [String] Inbound order ID. attribute(:order_id, String, from: "orderId") # @return [String] Inbound order status. attribute(:order_status, String, from: "orderStatus") # @return [Address] Origin address from where the inbound order will be shipped. attribute(:origin_address, Address, from: "originAddress") # @return [Array<DistributionPackageQuantity>] List of packages to be inbounded. attribute(:packages_to_inbound, [DistributionPackageQuantity], from: "packagesToInbound") # @return [DestinationDetails] Destination details of an inbound order based on the assigned region and DC for # the order. attribute?(:destination_details, DestinationDetails, from: "destinationDetails") # @return [String] Reference ID that can be used to correlate the order with partner resources. attribute?(:external_reference_id, String, from: "externalReferenceId") # @return [InboundPreferences] attribute?(:preferences, InboundPreferences) # @return [Time] Date when this order was last updated. attribute?(:updated_at, Time, from: "updatedAt") end
- PackageVolume =
Represents the volume of the package with a unit of measurement.
Structure.new do # @return [String] Unit of measurement for the package volume. attribute(:unit_of_measurement, String, from: "unitOfMeasurement") # @return [Float] The package volume value. attribute(:volume, Float) end
- PackageWeight =
Represents the weight of the package with a unit of measurement.
Structure.new do # @return [String] Unit of measurement for the package weight. attribute(:unit_of_measurement, String, from: "unitOfMeasurement") # @return [Float] The package weight value. attribute(:weight, Float) end
- ShipmentLabels =
Shipment labels.
Structure.new do # @return [String] Status of label generation. attribute(:label_status, String, from: "labelStatus") # @return [String] The URL to download shipment labels. The URL is active for 600 seconds from generation. attribute?(:label_download_url, String, from: "labelDownloadURL") end
- SKUEligibility =
Represents eligibility of one SKU.
Structure.new do # @return [DistributionPackageQuantity] attribute(:package_quantity, DistributionPackageQuantity, from: "packageQuantity") # @return [String] attribute(:status, String) # @return [Array<SkuIneligibilityReason>] If not eligible, these are list of error codes and descriptions. attribute?(:ineligibility_reasons, [SKUIneligibilityReason], from: "ineligibilityReasons") end
- InboundPackages =
Represents the packages to inbound.
Structure.new do # @return [Array<DistributionPackageQuantity>] List of packages to be inbounded. attribute(:packages_to_inbound, [DistributionPackageQuantity], from: "packagesToInbound") end
- InboundShipment =
Represents an AWD inbound shipment.
Structure.new do # @return [Address] Destination address for this shipment. attribute(:destination_address, Address, from: "destinationAddress") # @return [String] The AWD inbound order ID that this inbound shipment belongs to. attribute(:order_id, String, from: "orderId") # @return [Address] Origin address for this shipment. attribute(:origin_address, Address, from: "originAddress") # @return [Array<DistributionPackageQuantity>] Packages that are part of this shipment. attribute(:shipment_container_quantities, [DistributionPackageQuantity], from: "shipmentContainerQuantities") # @return [String] Unique shipment ID. attribute(:shipment_id, String, from: "shipmentId") # @return [String] Current status of this shipment. attribute(:shipment_status, String, from: "shipmentStatus") # @return [CarrierCode] The shipment carrier code. attribute?(:carrier_code, CarrierCode, from: "carrierCode") # @return [Time] Timestamp when the shipment was created. The date is returned in # {https://developer-docs.amazon.com/sp-api/docs/iso-8601 ISO 8601} format. attribute?(:created_at, Time, from: "createdAt") # @return [String] Assigned region where the order will be shipped. This can differ from what was passed as # preference. AWD currently supports following region IDs: [us-west, us-east, us-southcentral, us-southeast] attribute?(:destination_region, String, from: "destinationRegion") # @return [String] Client-provided reference ID that can correlate this shipment to client resources. For # example, to map this shipment to an internal bookkeeping order record. attribute?(:external_reference_id, String, from: "externalReferenceId") # @return [Array<InventoryQuantity>] Quantity received (at the receiving end) as part of this shipment. attribute?(:received_quantity, [InventoryQuantity], from: "receivedQuantity") # @return [Time] Timestamp when the shipment will be shipped. attribute?(:ship_by, Time, from: "shipBy") # @return [Array<SkuQuantity>] Quantity details at SKU level for the shipment. This attribute will only appear # if the skuQuantities parameter in the request is set to SHOW. attribute?(:shipment_sku_quantities, [SKUQuantity], from: "shipmentSkuQuantities") # @return [String] Carrier-unique tracking ID for this shipment. attribute?(:tracking_id, String, from: "trackingId") # @return [Time] Timestamp when the shipment was updated. The date is returned in # {https://developer-docs.amazon.com/sp-api/docs/iso-8601 ISO 8601} format. attribute?(:updated_at, Time, from: "updatedAt") # @return [String] An AWD-provided reference ID that you can use to interact with the warehouse. For example, a # carrier appointment booking. attribute?(:warehouse_reference_id, String, from: "warehouseReferenceId") end
- MeasurementData =
Package weight and dimension.
Structure.new do # @return [PackageWeight] Weight of the package. attribute(:weight, PackageWeight) # @return [PackageDimensions] Dimensions of the package. Dimensions are required when creating an inbound or # outbound order. attribute?(:dimensions, PackageDimensions) # @return [PackageVolume] Volume of the package. attribute?(:volume, PackageVolume) end
- PrepInstruction =
Information pertaining to the preparation of inbound products.
Structure.new do # @return [String] attribute?(:prep_owner, String, from: "prepOwner") # @return [String] The type of preparation to be done. For more information about preparing items, refer to # [Prep guidance](https://sellercentral.amazon.com/help/hub/reference/external/GF4G7547KSLDX2KC) on Seller # Central. attribute?(:prep_type, String, from: "prepType") end
- ProductQuantity =
Represents a product with the SKU details and the corresponding quantity.
Structure.new do # @return [Integer] Product quantity. attribute(:quantity, Integer) # @return [String] The seller or merchant SKU. attribute(:sku, String) # @return [Array<ProductAttribute>] Contains attributes for this instance of the product. For example, item # color, or other attributes that distinguish the product beyond the SKU. This is metadata for the product and # Amazon does not process this data. attribute?(:attributes, [ProductAttribute]) # @return [Time] The expiration date for the SKU. Values are in [ISO # 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format. attribute?(:expiration, Time) # @return [PrepDetails] Preparation details of a product which contains the prep category, prep owner and the # label owner. # If not passed while creating an inbound order, NO_PREP will be used on the product by-default. # Prep instructions will be generated based on the category passed attribute?(:prep_details, PrepDetails, from: "prepDetails") end
- ShipmentListing =
A list of inbound shipment summaries filtered by the attributes specified in the request.
Structure.new do # @return [String] A token that is used to retrieve the next page of results. The response includes `nextToken` # when the number of results exceeds the specified `maxResults` value. To get the next page of results, call the # operation with this token and include the same arguments as the call that produced the token. To get a # complete list, call this operation until `nextToken` is null. Note that this operation can return empty pages. attribute?(:next_token, String, from: "nextToken") # @return [Array<InboundShipmentSummary>] List of inbound shipment summaries. attribute?(:shipments, [InboundShipmentSummary]) end
- TrackingDetails =
Tracking details for the shipment. If using SPD transportation, this can be for each case. If not using SPD transportation, this is a single tracking entry for the entire shipment.
Structure.new do # @return [String] The identifier that is received from transportation to uniquely identify a booking. attribute(:booking_id, String, from: "bookingId") # @return [CarrierCode] Unique or identifying code for the carrier. attribute?(:carrier_code, CarrierCode, from: "carrierCode") end
- InventoryDetails =
Additional inventory details. This object is only displayed if the details parameter in the request is set to
SHOW
. Structure.new do # @return [Integer] Quantity that is available for downstream channel replenishment. attribute?(:available_distributable_quantity, Integer, from: "availableDistributableQuantity") # @return [Integer] Quantity that is in transit from AWD and has not yet been received at FBA. attribute?(:replenishment_quantity, Integer, from: "replenishmentQuantity") # @return [Integer] Quantity that is reserved for a downstream channel replenishment order that is being # prepared for shipment. attribute?(:reserved_distributable_quantity, Integer, from: "reservedDistributableQuantity") end
- InventoryListing =
AWD inventory payload.
Structure.new do # @return [Array<InventorySummary>] List of inventory summaries. attribute(:inventory, [InventorySummary]) # @return [String] A token that is used to retrieve the next page of results. The response includes `nextToken` # when the number of results exceeds the specified `maxResults` value. To get the next page of results, call the # operation with this token and include the same arguments as the call that produced the token. To get a # complete list, call this operation until `nextToken` is null. Note that this operation can return empty pages. attribute?(:next_token, String, from: "nextToken") end
- InventorySummary =
Summary of inventory per SKU.
Structure.new do # @return [String] The seller or merchant SKU. attribute(:sku, String) # @return [Array<ExpirationDetails>] The expiration details of the inventory. This object will only appear if # the `details` parameter in the request is set to `SHOW`. attribute?(:expiration_details, [ExpirationDetails], from: "expirationDetails") # @return [InventoryDetails] attribute?(:inventory_details, InventoryDetails, from: "inventoryDetails") # @return [Integer] Total quantity that is in-transit from the seller and has not yet been received at an AWD # Distribution Center attribute?(:total_inbound_quantity, Integer, from: "totalInboundQuantity") # @return [Integer] Total quantity that is present in AWD distribution centers. attribute?(:total_onhand_quantity, Integer, from: "totalOnhandQuantity") end
- ProductAttribute =
Product instance attribute that is not described at the SKU level in the catalog.
Structure.new do # @return [String] Product attribute name. attribute?(:name, String) # @return [String] Product attribute value. attribute?(:value, String) end
- ExpirationDetails =
The expiration details of the inventory. This object will only appear if the details parameter in the request is set to
SHOW
. Structure.new do # @return [Time] The expiration date of the SKU. attribute?(:expiration, Time) # @return [Integer] The quantity that is present in AWD. attribute?(:onhand_quantity, Integer, from: "onhandQuantity") end
- InventoryQuantity =
Quantity of inventory with an associated measurement unit context.
Structure.new do # @return [Float] Quantity of the respective inventory. attribute(:quantity, Float) # @return [String] Unit of measurement for the inventory. attribute(:unit_of_measurement, String, from: "unitOfMeasurement") end
- PackageDimensions =
Dimensions of the package.
Structure.new do # @return [Float] Height of the package. attribute(:height, Float) # @return [Float] Length of the package. attribute(:length, Float) # @return [String] Unit of measurement for package dimensions. attribute(:unit_of_measurement, String, from: "unitOfMeasurement") # @return [Float] Width of the package. attribute(:width, Float) end
- DestinationDetails =
Destination details of an inbound order based on the assigned region and DC for the order.
Structure.new do # @return [Address] Destination address of the AWD facility where the shipment will be shipped to attribute?(:destination_address, Address, from: "destinationAddress") # @return [String] Assigned region where the order will be shipped. This can differ from what was passed as # preference. AWD currently supports following region IDs: [us-west, us-east, us-southcentral, us-southeast] attribute?(:destination_region, String, from: "destinationRegion") # @return [String] Unique ID of the confirmed shipment being shipped to the assigned destination. This will be # available only after an inbound order is confirmed and can be used to track the shipment. attribute?(:shipment_id, String, from: "shipmentId") end
- InboundEligibility =
Represents the eligibility status of the inbound packages.
Structure.new do # @return [Array<SkuEligibility>] Details on SKU eligibility for each inbound package. attribute(:packages_to_inbound, [SKUEligibility], from: "packagesToInbound") # @return [Time] Timestamp when the eligibility check is performed. attribute(:previewed_at, Time, from: "previewedAt") # @return [String] attribute(:status, String) # @return [Array<OrderIneligibilityReason>] If there are order level eligibility issues, then this list will # contain those error codes and descriptions. attribute?(:ineligibility_reasons, [OrderIneligibilityReason], from: "ineligibilityReasons") end
- InboundPreferences =
Preferences that can be passed in context of an inbound order
Structure.new do # @return [String] Pass a preferred region so that the inbound order can be shipped to an AWD warehouse located # in that region. This doesn't guarantee the order to be assigned in the specified destination region as it # depends on warehouse capacity availability. AWD currently supports following region IDs: [us-west, us-east, # us-southcentral, us-southeast] attribute?(:destination_region, String, from: "destinationRegion") end
- DistributionPackage =
Represents an AWD distribution package.
Structure.new do # @return [DistributionPackageContents] The contents appropriate for the type. attribute(:contents, DistributionPackageContents) # @return [MeasurementData] Measurements of a package, including weight, volume, and dimensions. attribute(:measurements, MeasurementData) # @return [String] Type of distribution package. attribute(:type, String) end
- TransportationDetails =
Transportation details for the shipment.
Structure.new do # @return [Array<TrackingDetails>] Tracking details for the shipment. If using SPD transportation, this can be # for each case. If not using SPD transportation, this is a single tracking entry for the entire shipment. attribute(:tracking_details, [TrackingDetails], from: "trackingDetails") end
- InboundOrderReference =
A response that contains the reference identifiers for the newly created or updated inbound order. Consists of an order ID and version.
Structure.new do # @return [String] Order ID of the inbound order. attribute(:order_id, String, from: "orderId") end
- InboundShipmentSummary =
Summary for an AWD inbound shipment containing the shipment ID, which can be used to retrieve the actual shipment.
Structure.new do # @return [String] The AWD inbound order ID that this inbound shipment belongs to. attribute(:order_id, String, from: "orderId") # @return [String] A unique shipment ID. attribute(:shipment_id, String, from: "shipmentId") # @return [String] attribute(:shipment_status, String, from: "shipmentStatus") # @return [Time] Timestamp when the shipment was created. attribute?(:created_at, Time, from: "createdAt") # @return [String] Optional client-provided reference ID that can be used to correlate this shipment with client # resources. For example, to map this shipment to an internal bookkeeping order record. attribute?(:external_reference_id, String, from: "externalReferenceId") # @return [Time] Timestamp when the shipment was updated. attribute?(:updated_at, Time, from: "updatedAt") end
- SKUIneligibilityReason =
Represents the ineligibility reason for one SKU.
Structure.new do # @return [String] Code for the SKU ineligibility. attribute(:code, String) # @return [String] Detailed description of the SKU ineligibility. attribute(:description, String) end
- OrderIneligibilityReason =
Represents one ineligibility reason for the order (there can be multiple reasons).
Structure.new do # @return [String] Code for the order ineligibility. attribute(:code, String) # @return [String] Description detailing the ineligibility reason of the order. attribute(:description, String) end
- InboundOrderCreationData =
Payload for creating an inbound order.
Structure.new do # @return [Address] Origin address from where the inbound order will be shipped. attribute(:origin_address, Address, from: "originAddress") # @return [Array<DistributionPackageQuantity>] List of packages to be inbounded. attribute(:packages_to_inbound, [DistributionPackageQuantity], from: "packagesToInbound") # @return [String] Reference ID that can be used to correlate the order with partner resources. attribute?(:external_reference_id, String, from: "externalReferenceId") # @return [InboundPreferences] attribute?(:preferences, InboundPreferences) end
- DistributionPackageContents =
Represents the contents inside a package, which can be products or a nested package.
Structure.new do # @return [Array<DistributionPackageQuantity>] This is required only when `DistributionPackageType=PALLET`. attribute?(:packages, [DistributionPackageQuantity]) # @return [Array<ProductQuantity>] This is required only when `DistributionPackageType=CASE`. attribute?(:products, [ProductQuantity]) end
- DistributionPackageQuantity =
Represents a distribution package with its respective quantity.
Structure.new do # @return [Integer] Number of cases or pallets with the same package configuration. attribute(:count, Integer) # @return [DistributionPackage] attribute(:distribution_package, "DistributionPackage", from: "distributionPackage") end
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
DRAFT
status. -
#create_inbound(body, rate_limit: 1.0) ⇒ Peddler::Response
Creates a draft AWD inbound order with a list of packages for inbound shipment.
-
#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.
-
#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.
-
#update_inbound(order_id, body, rate_limit: 1.0) ⇒ Peddler::Response
Updates an AWD inbound order that is in
DRAFT
status 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
#endpoint_uri, #http, #initialize, #meter, #retriable, #sandbox, #sandbox?, #use, #via
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" meter(rate_limit).post(path) 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 } meter(rate_limit).post(path, body:, 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" meter(rate_limit).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 } meter(rate_limit).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 } meter(rate_limit).get(path, 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.
Defaults to HIDE
, in which case the response does not contain SKU quantities
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 } meter(rate_limit).get(path, params:, 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.
type is PDF
.
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 } meter(rate_limit).get(path, params:, 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.
sorted in DESCENDING order.
date must be in ISO 8601 format.
The date must be in ISO 8601 format.
nextToken
when the number of results exceeds the specified maxResults
value. To get the next page of
results, call the operation with this token and include the same arguments as the call that produced the token.
To get a complete list, call this operation until nextToken
is null. Note that this operation can return empty
pages.
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 } meter(rate_limit).get(path, params:, 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.
which returns only inventory summary totals.
nextToken
when the number of results exceeds the specified maxResults
value. To get the next page of
results, call the operation with this token and include the same arguments as the call that produced the token.
To get a complete list, call this operation until nextToken
is null. Note that this operation can return empty
pages.
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 } meter(rate_limit).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)}" meter(rate_limit).put(path, body:) 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" meter(rate_limit).put(path, body:) end |