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/outbound_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/order_attribute.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/outbound_listing.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/outbound_shipment.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/outbound_execution_error.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/outbound_order_reference.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/shipment_label_page_types.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/outbound_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,
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
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, null: false) # @return [String] A message that describes the error condition. attribute(:message, String, null: false) # @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, null: false, from: "addressLine1") # @return [String] Two-digit, ISO 3166-1 alpha-2 formatted country code where this address is located. attribute(:country_code, String, null: false, from: "countryCode") # @return [String] Name of the person, business, or institution at this address. attribute(:name, String, null: false) # @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, null: false, 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], null: false) 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, null: false, from: "expectedQuantity") # @return [String] The merchant stock keeping unit attribute(:sku, String, null: false) # @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, null: false, from: "createdAt") # @return [String] Inbound order ID. attribute(:order_id, String, null: false, from: "orderId") # @return [String] Inbound order status. attribute(:order_status, String, null: false, from: "orderStatus") # @return [Address] Origin address from where the inbound order will be shipped. attribute(:origin_address, Address, null: false, from: "originAddress") # @return [Array<DistributionPackageQuantity>] List of packages to be inbounded. attribute(:packages_to_inbound, [DistributionPackageQuantity], null: false, 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
- OutboundOrder =
Represents an AWD outbound order.
Structure.new do # @return [String] Order ID for the outbound order. attribute(:order_id, String, null: false, from: "orderId") # @return [String] Status for the outbound order. attribute(:order_status, String, null: false, from: "orderStatus") # @return [Array<OutboundShipment>] List of outbound shipments that are part of this order. attribute(:outbound_shipments, [OutboundShipment], null: false, from: "outboundShipments") # @return [Time] Date on which this outbound order was confirmed. attribute?(:confirmed_on, Time, from: "confirmedOn") # @return [Time] Date on which this outbound order was created. attribute?(:created_at, Time, from: "createdAt") # @return [Array<DistributionPackageQuantity>] List of packages that are eligible for outbound. attribute?(:eligible_packages_to_outbound, [DistributionPackageQuantity], from: "eligiblePackagesToOutbound") # @return [Array<ProductQuantity>] List of product units that are eligible for outbound. attribute?(:eligible_products_to_outbound, [ProductQuantity], from: "eligibleProductsToOutbound") # @return [Array<OutboundExecutionError>] Execution errors associated with the outbound order. This field will # be populated if the order failed validation. attribute?(:execution_errors, [OutboundExecutionError], from: "executionErrors") # @return [Array<OrderAttribute>] Order preferences for this outbound order. attribute?(:order_preferences, [OrderAttribute], from: "orderPreferences") # @return [Array<DistributionPackageQuantity>] List of packages to be outbound. attribute?(:packages_to_outbound, [DistributionPackageQuantity], from: "packagesToOutbound") # @return [Array<ProductQuantity>] List of product units to be outbound. attribute?(:products_to_outbound, [ProductQuantity], from: "productsToOutbound") # @return [Array<DistributionPackageQuantity>] Outbound packages that are shipped after the execution has # completed post confirmation. attribute?(:shipped_outbound_packages, [DistributionPackageQuantity], from: "shippedOutboundPackages") # @return [Array<ProductQuantity>] Outbound product units that are shipped after the execution has completed # post confirmation. attribute?(:shipped_outbound_products, [ProductQuantity], from: "shippedOutboundProducts") # @return [Time] Date on which this outbound 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, null: false, from: "unitOfMeasurement") # @return [Float] The package volume value. attribute(:volume, Float, null: false) 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, null: false, from: "unitOfMeasurement") # @return [Float] The package weight value. attribute(:weight, Float, null: false) end
- OrderAttribute =
Consists of the order preference and corresponding preference value.
Structure.new do # @return [String] Preference for the distribution order. attribute(:order_preference, String, null: false, from: "orderPreference") # @return [String] Value for the order preference. attribute(:order_preference_value, String, null: false, from: "orderPreferenceValue") end
- ShipmentLabels =
Shipment labels.
Structure.new do # @return [String] Status of label generation. attribute(:label_status, String, null: false, 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, null: false, from: "packageQuantity") # @return [String] attribute(:status, String, null: false) # @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], null: false, from: "packagesToInbound") end
- InboundShipment =
Represents an AWD inbound shipment.
Structure.new do # @return [Address] Destination address for this shipment. attribute(:destination_address, Address, null: false, from: "destinationAddress") # @return [String] The AWD inbound order ID that this inbound shipment belongs to. attribute(:order_id, String, null: false, from: "orderId") # @return [Address] Origin address for this shipment. attribute(:origin_address, Address, null: false, from: "originAddress") # @return [Array<DistributionPackageQuantity>] Packages that are part of this shipment. attribute(:shipment_container_quantities, [DistributionPackageQuantity], null: false, from: "shipmentContainerQuantities") # @return [String] Unique shipment ID. attribute(:shipment_id, String, null: false, from: "shipmentId") # @return [String] Current status of this shipment. attribute(:shipment_status, String, null: false, 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, null: false) # @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
- OutboundListing =
A list of paginated outbound orders filtered by the attributes passed in the request.
Structure.new do # @return [String] TA 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<OutboundOrder>] List of outbound orders. attribute?(:outbound_orders, [OutboundOrder], from: "outboundOrders") 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, null: false) # @return [String] The seller or merchant SKU. attribute(:sku, String, null: false) # @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, null: false, 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], null: false) # @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, null: false) # @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
- OutboundShipment =
Represents an AWD outbound shipment.
Structure.new do # @return [Address] Destination address for this shipment. attribute(:destination_address, Address, null: false, from: "destinationAddress") # @return [String] Outbound order ID this outbound shipment belongs to. attribute(:order_id, String, null: false, from: "orderId") # @return [Address] Origin address for this shipment. attribute(:origin_address, Address, null: false, from: "originAddress") # @return [String] Unique shipment ID. attribute(:shipment_id, String, null: false, from: "shipmentId") # @return [String] Current status of this shipment. attribute(:shipment_status, String, null: false, from: "shipmentStatus") # @return [Time] Timestamp when the shipment was created. attribute?(:created_at, Time, from: "createdAt") # @return [Array<DistributionPackageQuantity>] Specific distribution packages that are included in the context # of this shipment. attribute?(:shipment_package_quantities, [DistributionPackageQuantity], from: "shipmentPackageQuantities") # @return [Array<ProductQuantity>] Specific product units that are included in the context of this shipment. attribute?(:shipment_product_quantities, [ProductQuantity], from: "shipmentProductQuantities") # @return [Time] Timestamp when the shipment was updated. attribute?(:updated_at, Time, from: "updatedAt") 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, null: false) # @return [String] Unit of measurement for the inventory. attribute(:unit_of_measurement, String, null: false, from: "unitOfMeasurement") end
- PackageDimensions =
Dimensions of the package.
Structure.new do # @return [Float] Height of the package. attribute(:height, Float, null: false) # @return [Float] Length of the package. attribute(:length, Float, null: false) # @return [String] Unit of measurement for package dimensions. attribute(:unit_of_measurement, String, null: false, from: "unitOfMeasurement") # @return [Float] Width of the package. attribute(:width, Float, null: false) 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], null: false, from: "packagesToInbound") # @return [Time] Timestamp when the eligibility check is performed. attribute(:previewed_at, Time, null: false, from: "previewedAt") # @return [String] attribute(:status, String, null: false) # @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
- ReplenishmentOrder =
Represents an AWD replenishment order.
Structure.new do # @return [String] Order Id of the replenishment order. attribute(:order_id, String, null: false, from: "orderId") # @return [Array<OutboundShipmentSummary>] List of outbound shipments that are part of this order. attribute(:outbound_shipments, [OutboundShipmentSummary], null: false, from: "outboundShipments") # @return [String] attribute(:status, String, null: false) # @return [Time] Date on which this replenishment order was confirmed. attribute?(:confirmed_on, Time, from: "confirmedOn") # @return [Time] Date on which this replenishment order was created. attribute?(:created_at, Time, from: "createdAt") # @return [Array<DistributionIneligibleReason>] Distribution errors associated with the order related to the # products or packages to replenish. # This field will be populated if the order has products or packages which failed validation. attribute?(:distribution_ineligible_reasons, [DistributionIneligibleReason], from: "distributionIneligibleReasons") # @return [Array<DistributionProduct>] List of product units that are eligible for replenishment. attribute?(:eligible_products, [DistributionProduct], from: "eligibleProducts") # @return [Array<DistributionProduct>] Requested amount of single product units to be replenished. attribute?(:products, [DistributionProduct]) # @return [Array<DistributionProduct>] Outbound product units that are shipped after the execution has completed # post confirmation. attribute?(:shipped_products, [DistributionProduct], from: "shippedProducts") # @return [Time] Date on which this replenishment order was last updated. attribute?(:updated_at, Time, from: "updatedAt") end
- DistributionPackage =
Represents an AWD distribution package.
Structure.new do # @return [DistributionPackageContents] The contents appropriate for the type. attribute(:contents, DistributionPackageContents, null: false) # @return [MeasurementData] Measurements of a package, including weight, volume, and dimensions. attribute(:measurements, MeasurementData, null: false) # @return [String] Type of distribution package. attribute(:type, String, null: false) end
- DistributionProduct =
Represents a product with sku details and corresponding quantity
Structure.new do # @return [Integer] Quantity of the product attribute(:quantity, Integer, null: false) # @return [String] The seller/merchant stock keeping unit (SKU). attribute(:sku, String, null: false) # @return [Array<ProductAttribute>] Attributes for this instance of the product, i.e. already-prepped, or other # attributes that distinguish the product beyond the SKU. attribute?(:attributes, [ProductAttribute]) 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], null: false, 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, null: false, 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, null: false, from: "orderId") # @return [String] A unique shipment ID. attribute(:shipment_id, String, null: false, from: "shipmentId") # @return [String] attribute(:shipment_status, String, null: false, 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
- OutboundExecutionError =
Execution errors associated with the outbound order. This field will be populated if the order failed validation.
Structure.new do # @return [String] Failure code details for the error. attribute(:failure_code, String, null: false, from: "failureCode") # @return [Array<String>] Failure reasons for the error. attribute(:failure_reasons, [String], null: false, from: "failureReasons") # @return [String] MSKU associated with the error. attribute?(:sku, String) end
- OutboundOrderReference =
A response that contains the reference identifier for the newly created or updated outbound order. This includes an order ID.
Structure.new do # @return [String] outbound order ID. attribute(:order_id, String, null: false, from: "orderId") end
- SKUIneligibilityReason =
Represents the ineligibility reason for one SKU.
Structure.new do # @return [String] Code for the SKU ineligibility. attribute(:code, String, null: false) # @return [String] Detailed description of the SKU ineligibility. attribute(:description, String, null: false) end
- OutboundShipmentSummary =
Summary of an AWD inbound shipment containing the shipment ID which can be used to fetch the actual shipment
Structure.new do # @return [String] Order ID of AWD inbound order this inbound shipment belongs to attribute(:order_id, String, null: false, from: "orderId") # @return [String] Unique shipment ID attribute(:shipment_id, String, null: false, from: "shipmentId") # @return [String] attribute(:shipment_status, String, null: false, from: "shipmentStatus") # @return [Time] Timestamp denoting when the shipment was created attribute?(:created_at, Time, from: "createdAt") # @return [Time] Timestamp denoting when the shipment was updated attribute?(:updated_at, Time, from: "updatedAt") end
- ReplenishmentPreferences =
Preferences that can be passed in context of a replenishment order
Structure.new do # @return [String] Confirmation Mode to use for the created Replenishment order. attribute?(:confirmation, String) end
- ShipmentLabelPageTypes =
Shipment label page types.
Structure.new do # @return [String] Status of label page types. attribute(:label_status, String, null: false, from: "labelStatus") # @return [Array<PageType>] List of available page types. attribute?(:page_types, Array, from: "pageTypes") 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, null: false) # @return [String] Description detailing the ineligibility reason of the order. attribute(:description, String, null: false) 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, null: false, from: "originAddress") # @return [Array<DistributionPackageQuantity>] List of packages to be inbounded. attribute(:packages_to_inbound, [DistributionPackageQuantity], null: false, 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
- ReplenishmentOrderListing =
A list of paginated replenishment orders filtered by the attributes passed 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<ReplenishmentOrder>] List of replenishment orders. attribute?(:orders, [ReplenishmentOrder]) end
- OutboundOrderCreationData =
Payload for creating an outbound order.
Structure.new do # @return [Array<OrderAttribute>] Order preferences for the outbound order. attribute?(:order_preferences, [OrderAttribute], from: "orderPreferences") # @return [Array<DistributionPackageQuantity>] List of packages to be outbound. attribute?(:packages_to_outbound, [DistributionPackageQuantity], from: "packagesToOutbound") # @return [Array<ProductQuantity>] List of product units to be outbound. attribute?(:products_to_outbound, [ProductQuantity], from: "productsToOutbound") 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, null: false) # @return [DistributionPackage] attribute(:distribution_package, "DistributionPackage", null: false, from: "distributionPackage") end
- ReplenishmentOrderReference =
Response containing the reference identifier for the newly created/updated replenishment order consisting of the order ID.
Structure.new do # @return [String] Order ID of the Replenishment order. attribute(:order_id, String, null: false, from: "orderId") end
- DistributionIneligibleReason =
Execution errors associated with the replenishment order. This field will be populated if the order failed validation.
Structure.new do # @return [String] Failure code details of the error. attribute(:failure_code, String, null: false, from: "failureCode") # @return [Array<String>] Failure reasons of the error. attribute(:failure_reasons, [String], null: false, from: "failureReasons") # @return [String] SKU associated with the error. attribute?(:sku, String) end
- ReplenishmentOrderCreationData =
This structure represents the payload for creating an AFN Replenishment Order. By default, all replenishment orders created support Partial order preferences.
Structure.new do # @return [ReplenishmentPreferences] attribute?(:preferences, ReplenishmentPreferences) # @return [Array<DistributionProduct>] Requested amount of single product units to be replenished. attribute?(:products, [DistributionProduct]) end
Constants inherited from Peddler::API
Peddler::API::TRANSIENT_STATUSES
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.
-
#confirm_outbound(order_id, rate_limit: 1.0) ⇒ Peddler::Response
Confirms an AWD outbound order for a set of shipments that contain items that must be outbound to a destination node.
-
#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_outbound(body, rate_limit: 1.0) ⇒ Peddler::Response
Creates a draft AWD outbound order with the specified products.
-
#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_label_page_types(shipment_id, rate_limit: 1.0) ⇒ Peddler::Response
Retrieves the available label page types for a shipment ID that you specify.
-
#get_outbound(order_id, rate_limit: 1.0) ⇒ Peddler::Response
Retrieves an AWD outbound order with a set of shipments that contain items that are outbound into a destination channel.
-
#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_outbounds(updated_after: nil, updated_before: nil, sort_order: nil, max_results: 25, next_token: nil, rate_limit: 1.0) ⇒ Peddler::Response
Retrieves all outbound AWD orders (with optional filters) that pertain to a merchant.
-
#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 ‘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.
-
#update_outbound(order_id, body, rate_limit: 1.0) ⇒ Peddler::Response
Updates an AWD outbound order that is in ‘DRAFT`, `ELIGIBLE`, or `INELIGIBLE` status.
Methods inherited from Peddler::API
#endpoint_uri, #http, #initialize, #sandbox, #sandbox?
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.
143 144 145 146 147 |
# File 'lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09.rb', line 143 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_outbound(order_id, rate_limit: 1.0) ⇒ Peddler::Response
This operation can make a static sandbox call.
Confirms an AWD outbound order for a set of shipments that contain items that must be outbound to a destination node. You can confirm the order only if it’s in an`ELIGIBLE` state.
295 296 297 298 |
# File 'lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09.rb', line 295 def confirm_outbound(order_id, rate_limit: 1.0) path = "/awd/2024-05-09/outboundOrders/#{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.
363 364 365 366 367 368 |
# File 'lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09.rb', line 363 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_outbound(body, rate_limit: 1.0) ⇒ Peddler::Response
This operation can make a static sandbox call.
Creates a draft AWD outbound order with the specified products. The API returns the order ID for the newly created order and starts an async validation check on the outbound products. After the validation check, the order status transitions from ‘VALIDATING` to `ELIGIBLE/INELIGIBLE`.
252 253 254 255 256 |
# File 'lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09.rb', line 252 def create_outbound(body, rate_limit: 1.0) path = "/awd/2024-05-09/outboundOrders" parser = -> { OutboundOrderReference } 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
339 340 341 342 343 |
# File 'lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09.rb', line 339 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_label_page_types(shipment_id, rate_limit: 1.0) ⇒ Peddler::Response
This operation can make a static sandbox call.
Retrieves the available label page types for a shipment ID that you specify. This is an asynchronous operation. If the label status is ‘GENERATED`, then the pageTypes are available.
118 119 120 121 122 |
# File 'lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09.rb', line 118 def get_label_page_types(shipment_id, rate_limit: 1.0) path = "/awd/2024-05-09/inboundShipments/#{percent_encode(shipment_id)}/labelPageTypes" parser = -> { ShipmentLabelPageTypes } get(path, rate_limit:, parser:) end |
#get_outbound(order_id, rate_limit: 1.0) ⇒ Peddler::Response
This operation can make a static sandbox call.
Retrieves an AWD outbound order with a set of shipments that contain items that are outbound into a destination channel. If the order is not eligible, the validation errors field is included in the order response. The API returns the order ID for the newly created order and starts an async validation check on the outbound products. After the validation check, the order status transitions from ‘VALIDATING` to `ELIGIBLE/INELIGIBLE`.
267 268 269 270 271 |
# File 'lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09.rb', line 267 def get_outbound(order_id, rate_limit: 1.0) path = "/awd/2024-05-09/outboundOrders/#{percent_encode(order_id)}" parser = -> { OutboundOrder } get(path, 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.
351 352 353 354 355 |
# File 'lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09.rb', line 351 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.
169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 |
# File 'lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09.rb', line 169 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.
200 201 202 203 204 205 206 207 208 209 210 211 |
# File 'lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09.rb', line 200 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_outbounds(updated_after: nil, updated_before: nil, sort_order: nil, max_results: 25, next_token: nil, rate_limit: 1.0) ⇒ Peddler::Response
This operation can make a static sandbox call.
Retrieves all outbound AWD orders (with optional filters) that pertain to a merchant. By default, orders are sorted by the ‘updatedAt` attribute in descending order.
230 231 232 233 234 235 236 237 238 239 240 241 242 |
# File 'lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09.rb', line 230 def list_outbounds(updated_after: nil, updated_before: nil, sort_order: nil, max_results: 25, next_token: nil, rate_limit: 1.0) path = "/awd/2024-05-09/outboundOrders" params = { "updatedAfter" => updated_after, "updatedBefore" => updated_before, "sortOrder" => sort_order, "maxResults" => max_results, "nextToken" => next_token, }.compact parser = -> { OutboundListing } 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.
317 318 319 320 321 322 323 324 325 326 327 328 329 |
# File 'lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09.rb', line 317 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.
131 132 133 134 |
# File 'lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09.rb', line 131 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 |
#update_outbound(order_id, body, rate_limit: 1.0) ⇒ Peddler::Response
This operation can make a static sandbox call.
Updates an AWD outbound order that is in ‘DRAFT`, `ELIGIBLE`, or `INELIGIBLE` status. This API allows updates on `productsToOutbound` and `orderPreferences` attributes only. Any updates will restart the outbound order validation.
282 283 284 285 286 |
# File 'lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09.rb', line 282 def update_outbound(order_id, body, rate_limit: 1.0) path = "/awd/2024-05-09/outboundOrders/#{percent_encode(order_id)}" parser = -> { OutboundOrderReference } put(path, body:, rate_limit:, parser:) end |