Class: Peddler::APIs::Orders20260101
- Inherits:
-
Peddler::API
- Object
- Peddler::API
- Peddler::APIs::Orders20260101
- Defined in:
- lib/peddler/apis/orders_2026_01_01.rb,
lib/peddler/apis/orders_2026_01_01/alias.rb,
lib/peddler/apis/orders_2026_01_01/buyer.rb,
lib/peddler/apis/orders_2026_01_01/error.rb,
lib/peddler/apis/orders_2026_01_01/order.rb,
lib/peddler/apis/orders_2026_01_01/recipient.rb,
lib/peddler/apis/orders_2026_01_01/error_list.rb,
lib/peddler/apis/orders_2026_01_01/item_price.rb,
lib/peddler/apis/orders_2026_01_01/order_item.rb,
lib/peddler/apis/orders_2026_01_01/pagination.rb,
lib/peddler/apis/orders_2026_01_01/gift_option.rb,
lib/peddler/apis/orders_2026_01_01/hour_minute.rb,
lib/peddler/apis/orders_2026_01_01/measurement.rb,
lib/peddler/apis/orders_2026_01_01/time_window.rb,
lib/peddler/apis/orders_2026_01_01/item_expense.rb,
lib/peddler/apis/orders_2026_01_01/item_packing.rb,
lib/peddler/apis/orders_2026_01_01/item_picking.rb,
lib/peddler/apis/orders_2026_01_01/item_product.rb,
lib/peddler/apis/orders_2026_01_01/package_item.rb,
lib/peddler/apis/orders_2026_01_01/business_hour.rb,
lib/peddler/apis/orders_2026_01_01/item_proceeds.rb,
lib/peddler/apis/orders_2026_01_01/item_shipping.rb,
lib/peddler/apis/orders_2026_01_01/order_package.rb,
lib/peddler/apis/orders_2026_01_01/sales_channel.rb,
lib/peddler/apis/orders_2026_01_01/exception_date.rb,
lib/peddler/apis/orders_2026_01_01/item_condition.rb,
lib/peddler/apis/orders_2026_01_01/item_promotion.rb,
lib/peddler/apis/orders_2026_01_01/order_proceeds.rb,
lib/peddler/apis/orders_2026_01_01/package_status.rb,
lib/peddler/apis/orders_2026_01_01/points_granted.rb,
lib/peddler/apis/orders_2026_01_01/date_time_range.rb,
lib/peddler/apis/orders_2026_01_01/associated_order.rb,
lib/peddler/apis/orders_2026_01_01/customer_address.rb,
lib/peddler/apis/orders_2026_01_01/item_fulfillment.rb,
lib/peddler/apis/orders_2026_01_01/item_points_cost.rb,
lib/peddler/apis/orders_2026_01_01/merchant_address.rb,
lib/peddler/apis/orders_2026_01_01/item_cancellation.rb,
lib/peddler/apis/orders_2026_01_01/order_fulfillment.rb,
lib/peddler/apis/orders_2026_01_01/get_order_response.rb,
lib/peddler/apis/orders_2026_01_01/item_customization.rb,
lib/peddler/apis/orders_2026_01_01/delivery_preference.rb,
lib/peddler/apis/orders_2026_01_01/search_orders_response.rb,
lib/peddler/apis/orders_2026_01_01/address_extended_fields.rb,
lib/peddler/apis/orders_2026_01_01/item_proceeds_breakdown.rb,
lib/peddler/apis/orders_2026_01_01/preferred_delivery_time.rb,
lib/peddler/apis/orders_2026_01_01/item_promotion_breakdown.rb,
lib/peddler/apis/orders_2026_01_01/item_substitution_option.rb,
lib/peddler/apis/orders_2026_01_01/item_cancellation_request.rb,
lib/peddler/apis/orders_2026_01_01/item_shipping_constraints.rb,
lib/peddler/apis/orders_2026_01_01/item_international_shipping.rb,
lib/peddler/apis/orders_2026_01_01/item_substitution_preference.rb,
lib/peddler/apis/orders_2026_01_01/item_proceeds_detailed_breakdown.rb
Overview
The Selling Partner API for Orders
The Selling Partner API for Orders returns orders information. This API supports the following types of orders:
- FBM (Fulfilled by Merchant) - FBA (Fulfilled by Amazon) - read only - Amazon Fresh
This API does not display order data that is more than two years old, except in the JP, AU, and SG marketplaces, for which data from 2016 and after is available.
Constant Summary collapse
- Alias =
An alternative identifier that provides a different way to reference the same order.
Structure.new do # @return [String] The alternative identifier value that can be used to reference this order. attribute(:alias_id, String, from: "aliasId") # @return [String] The kind of alternative identifier this represents. # # **Possible values**: `SELLER_ORDER_ID` attribute(:alias_type, String, from: "aliasType") end
- Buyer =
Information about the customer who purchased the order.
Structure.new do # @return [String] The name of the company or organization for a business order. attribute?(:buyer_company_name, String, from: "buyerCompanyName") # @return [String] The anonymized email address of the buyer. **Note:** Only available for merchant-fulfilled # (FBM) orders. attribute?(:buyer_email, String, from: "buyerEmail") # @return [String] The full name of the customer who placed the order. attribute?(:buyer_name, String, from: "buyerName") # @return [String] The purchase order (PO) number entered by the buyer at checkout. Only returned for orders # where the buyer entered a PO number at checkout. attribute?(:buyer_purchase_order_number, String, from: "buyerPurchaseOrderNumber") end
- 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
- Order =
Comprehensive information about a customer order.
Structure.new do # @return [Time] The time when the customer placed the order. In [ISO # 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format. attribute(:created_time, Time, from: "createdTime") # @return [Time] The most recent time when any aspect of this order was modified by Amazon or the seller. In # [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format. attribute(:last_updated_time, Time, from: "lastUpdatedTime") # @return [String] An Amazon-defined order identifier. attribute(:order_id, String, from: "orderId") # @return [Array<OrderItem>] The list of all order items included in this order. attribute(:order_items, [OrderItem], from: "orderItems") # @return [SalesChannel] Information about where this order was placed. attribute(:sales_channel, SalesChannel, from: "salesChannel") # @return [Array<AssociatedOrder>] Other orders that have a direct relationship to this order, such as # replacement or exchange orders. attribute?(:associated_orders, [AssociatedOrder], from: "associatedOrders") # @return [Buyer] Information about the customer who purchased this order. attribute?(:buyer, Buyer) # @return [OrderFulfillment] Information about how this order is being processed and shipped. attribute?(:fulfillment, OrderFulfillment) # @return [Array<Alias>] Alternative identifiers that can be used to reference this order, such as # seller-defined order numbers. attribute?(:order_aliases, [Alias], from: "orderAliases") # @return [Array<OrderPackage>] Shipping packages created for this order, including tracking information. # **Note:** Only available for merchant-fulfilled (FBM) orders. attribute?(:packages, [OrderPackage]) # @return [OrderProceeds] Financial information about this order. attribute?(:proceeds, OrderProceeds) # @return [Array<String>] Special programs associated with this order that may affect fulfillment or customer # experience. # # **Possible values**: `AMAZON_BAZAAR`, `AMAZON_BUSINESS`, `AMAZON_EASY_SHIP`, `AMAZON_HAUL`, # `DELIVERY_BY_AMAZON`, `FBM_SHIP_PLUS`, `IN_STORE_PICK_UP`, `PREMIUM`, `PREORDER`, `PRIME` attribute?(:programs, [String]) # @return [Recipient] Information about the person or location where this order should be delivered. attribute?(:recipient, Recipient) end
- Recipient =
Information about the recipient to whom the order should be delivered.
Structure.new do # @return [CustomerAddress] The address where the order should be delivered to the customer. attribute?(:delivery_address, CustomerAddress, from: "deliveryAddress") # @return [DeliveryPreference] Special instructions and preferences that the customer specifies for how the # order should be delivered. attribute?(:delivery_preference, DeliveryPreference, from: "deliveryPreference") end
- ErrorList =
A list of error responses returned when a request is unsuccessful.
Structure.new do # @return [Array<Error>] A list of errors. attribute(:errors, [Error]) end
- ItemPrice =
Pricing information for the order item.
Structure.new do # @return [String] Indicates that the selling price is a special price that is only available for Amazon # Business orders. For more information about the Amazon Business Seller Program, refer to the [Amazon # Business website](https://www.amazon.com/b2b/info/amazon-business). # # **Possible value**: `BUSINESS_PRICE` attribute?(:price_designation, String, from: "priceDesignation") # @return [Money] The price charged for a single unit of this product, before any quantity-based calculations. attribute?(:unit_price, Money, from: "unitPrice") end
- OrderItem =
Information about a single product within an order.
Structure.new do # @return [String] A unique identifier for this specific item within the order. attribute(:order_item_id, String, from: "orderItemId") # @return [ItemProduct] Information about the product being ordered. attribute(:product, ItemProduct) # @return [Integer] The number of units of this item that the customer ordered. attribute(:quantity_ordered, Integer, from: "quantityOrdered") # @return [ItemCancellation] The cancellation information of the order item. attribute?(:cancellation, ItemCancellation) # @return [ItemExpense] The expense information related to this specific item. attribute?(:expense, ItemExpense) # @return [ItemFulfillment] Information about how the order item should be processed, packed, and shipped to the # customer. attribute?(:fulfillment, ItemFulfillment) # @return [Measurement] The unit of measure and value for items sold by weight, volume, or other measurements # rather than simple count. attribute?(:measurement, Measurement) # @return [ItemProceeds] The money that the seller receives from the sale of this specific item. attribute?(:proceeds, ItemProceeds) # @return [Array<String>] Special programs that apply specifically to this item within the order. # # **Possible values**: `TRANSPARENCY`, `SUBSCRIBE_AND_SAVE` attribute?(:programs, [String]) # @return [ItemPromotion] Details about any discounts, coupons, or promotional offers applied to this item. attribute?(:promotion, ItemPromotion) end
- Pagination =
When a request has results that are not included in the response, pagination occurs. This means the results are divided into individual pages. To retrieve a different page, you must pass the token value as the
paginationTokenquery parameter in the subsequent request. All other parameters must be provided with the same values that were provided with the request that generated this token, with the exception ofmaxResultsPerPageandincludedData, which can be modified between calls. The token will expire after 24 hours. When there are no other pages to fetch, thepaginationfield will be absent from the response. Structure.new do # @return [String] A token that can be used to fetch the next page of results. attribute?(:next_token, String, from: "nextToken") end
- GiftOption =
Gift wrapping and personalization options selected by the customer for an order item.
Structure.new do # @return [String] Personal message from the buyer to be included with the gift-wrapped item. attribute?(:gift_message, String, from: "giftMessage") # @return [String] Type or quality level of gift wrapping service selected by the customer. attribute?(:gift_wrap_level, String, from: "giftWrapLevel") end
- HourMinute =
The time when the business opens or closes.
Structure.new do # @return [Integer] The hour when the business opens or closes, in 24-hour format (0-23). attribute?(:hour, Integer) # @return [Integer] The minute when the business opens or closes. attribute?(:minute, Integer) end
- Measurement =
Specifies the unit of measure and quantity for items that are sold by weight, volume, length, or other measurements rather than simple count.
Structure.new do # @return [String] The specific unit of measurement used to quantify this item. attribute(:unit, String) # @return [Float] The numerical quantity or amount being measured in the specified unit. attribute(:value, Float) end
- TimeWindow =
Specific time interval defining the start and end times.
Structure.new do # @return [HourMinute] The end of the time window. attribute?(:end_time, HourMinute, from: "endTime") # @return [HourMinute] The beginning of the time window. attribute?(:start_time, HourMinute, from: "startTime") end
- ItemExpense =
The expense information related to this specific item.
Structure.new do # @return [ItemPointsCost] The cost of points. attribute?(:points_cost, ItemPointsCost, from: "pointsCost") end
- ItemPacking =
Information related to the packaging process for an order item.
Structure.new do # @return [GiftOption] Gift wrapping and messaging specified for this item. attribute?(:gift_option, GiftOption, from: "giftOption") end
- ItemPicking =
Information related to the warehouse picking process for an order item.
Structure.new do # @return [ItemSubstitutionPreference] Substitution preference for an order item when it becomes unavailable # during fulfillment attribute?(:substitution_preference, ItemSubstitutionPreference, from: "substitutionPreference") end
- ItemProduct =
Product information for an order item.
Structure.new do # @return [String] The Amazon Standard Identification Number (ASIN) of the item. attribute?(:asin, String) # @return [ItemCondition] Information about the physical condition and quality of the item being sold. attribute?(:condition, ItemCondition) # @return [ItemCustomization] Information about any personalization or customization applied to this product. attribute?(:customization, ItemCustomization) # @return [ItemPrice] Pricing information for this product. attribute?(:price, ItemPrice) # @return [String] The item's seller stock keeping unit (SKU). attribute?(:seller_sku, String, from: "sellerSku") # @return [Array<String>] Unique serial numbers for products that require individual tracking, typically # provided for FBA orders. attribute?(:serial_numbers, [String], from: "serialNumbers") # @return [String] The product name or title as displayed to customers in the marketplace. attribute?(:title, String) end
- PackageItem =
Individual order item contained within a shipping package.
Structure.new do # @return [String] Unique identifier of the order item included in this package. attribute(:order_item_id, String, from: "orderItemId") # @return [Integer] Number of units of this item included in the package shipment. attribute(:quantity, Integer) # @return [Array<String>] The transparency codes associated with this item for product authentication. attribute?(:transparency_codes, [String], from: "transparencyCodes") end
- BusinessHour =
Business days and hours when the destination is open for deliveries.
Structure.new do # @return [String] Specific day of the week for which operating hours are being defined. attribute?(:day_of_week, String, from: "dayOfWeek") # @return [Array<TimeWindow>] Collection of time windows during which the location is available for deliveries # on the specified day. attribute?(:time_windows, [TimeWindow], from: "timeWindows") end
- ItemProceeds =
The money that the seller receives from the sale of this specific item.
Structure.new do # @return [Array<ItemProceedsBreakdown>] The breakdown of proceeds. attribute?(:breakdowns, [ItemProceedsBreakdown]) # @return [Money] The total monetary amount for this order item. attribute?(:proceeds_total, Money, from: "proceedsTotal") end
- ItemShipping =
Information related to the shipping and delivery process for an order item.
Structure.new do # @return [ItemInternationalShipping] Additional information needed for cross-border delivery of this item. attribute?(:international_shipping, ItemInternationalShipping, from: "internationalShipping") # @return [DateTimeRange] When this item is expected to be delivered to the customer. attribute?(:scheduled_delivery_window, DateTimeRange, from: "scheduledDeliveryWindow") # @return [ItemShippingConstraints] Special shipping requirements and restrictions that apply to this item. attribute?(:shipping_constraints, ItemShippingConstraints, from: "shippingConstraints") end
- OrderPackage =
Information about a physical shipping package, including tracking details. Note: Only available for merchant-fulfilled (FBM) orders.
Structure.new do # @return [String] A unique identifier for this package within the context of the order. attribute(:package_reference_id, String, from: "packageReferenceId") # @return [String] The carrier responsible for transporting this package to the customer. attribute?(:carrier, String) # @return [Time] The exact time when this shipping package was created and prepared for shipment. In [ISO # 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format. attribute?(:created_time, Time, from: "createdTime") # @return [Array<PackageItem>] A list of all order items included in this specific package. attribute?(:package_items, [PackageItem], from: "packageItems") # @return [PackageStatus] The current status of this package. attribute?(:package_status, PackageStatus, from: "packageStatus") # @return [MerchantAddress] The physical address from which this package was shipped, typically the merchant's # warehouse or fulfillment center. attribute?(:ship_from_address, MerchantAddress, from: "shipFromAddress") # @return [Time] The exact time when this package was handed over to the carrier and began its journey to the # customer. In [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format. attribute?(:ship_time, Time, from: "shipTime") # @return [String] The specific shipping method or service used for delivering this package. attribute?(:shipping_service, String, from: "shippingService") # @return [String] The carrier-provided tracking number that customers can use to monitor the package's delivery # progress. attribute?(:tracking_number, String, from: "trackingNumber") end
- SalesChannel =
Information about where the customer placed this order.
Structure.new do # @return [String] The name of the sales platform or channel where the customer placed this order. # # **Possible values**: `AMAZON`, `NON_AMAZON` attribute(:channel_name, String, from: "channelName") # @return [String] The unique identifier for the specific marketplace within the sales channel where this order # was placed. attribute?(:marketplace_id, String, from: "marketplaceId") # @return [String] The human-readable name of the marketplace where this order was placed. attribute?(:marketplace_name, String, from: "marketplaceName") end
- ExceptionDate =
Special dates when normal business hours are modified or suspended, requiring different delivery scheduling.
Structure.new do # @return [Date] Specific calendar date when normal operating hours do not apply. In [ISO # 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format at day granularity. attribute?(:exception_date, Date, from: "exceptionDate") # @return [String] Operational status of the business on the specified exception date. attribute?(:exception_date_type, String, from: "exceptionDateType") # @return [Array<TimeWindow>] Alternative operating hours that apply specifically to this exception date. attribute?(:time_windows, [TimeWindow], from: "timeWindows") end
- ItemCondition =
Detailed information about the physical condition and quality state of the item being sold.
Structure.new do # @return [String] Additional details provided by the seller to describe the specific condition of this # particular item. attribute?(:condition_note, String, from: "conditionNote") # @return [String] A more specific condition classification that provides additional detail about the item's # quality within the main condition type. # # **Possible values**: `NEW`, `MINT`, `VERY_GOOD`, `GOOD`, `ACCEPTABLE`, `POOR`, `CLUB`, `OEM`, `WARRANTY`, # `REFURBISHED_WARRANTY`, `REFURBISHED`, `OPEN_BOX`, `ANY`, `OTHER`. attribute?(:condition_subtype, String, from: "conditionSubtype") # @return [String] The primary condition category that broadly describes the item's state. # # **Possible values**: `NEW`, `USED`, `COLLECTIBLE`, `REFURBISHED`, `PREORDER`, `CLUB`. attribute?(:condition_type, String, from: "conditionType") end
- ItemPromotion =
Details about any discounts, coupons, or promotional offers applied to this item.
Structure.new do # @return [Array<ItemPromotionBreakdown>] A list of promotions applied to the order item. attribute?(:breakdowns, [ItemPromotionBreakdown]) end
- OrderProceeds =
The money that the seller receives from the sale of the order.
Structure.new do # @return [Money] The total amount that the seller receives from the sale of the order. attribute?(:grand_total, Money, from: "grandTotal") end
- PackageStatus =
Current status and detailed tracking information for a shipping package throughout the delivery process.
Structure.new do # @return [String] Primary status classification of the package in the shipping workflow. attribute(:status, String) # @return [String] Granular status information providing specific details about the package's current location # and handling stage. # # **Possible values:** - `PENDING_SCHEDULE` (Package awaiting pickup scheduling) - `PENDING_PICK_UP` (Package # ready for carrier collection from seller) - `PENDING_DROP_OFF` (Package awaiting seller delivery to carrier) # - `LABEL_CANCELLED` (Shipping label canceled by seller) - `PICKED_UP` (Package collected by carrier from # seller location) - `DROPPED_OFF` (Package delivered to carrier by seller) - `AT_ORIGIN_FC` (Package at # originating fulfillment center) - `AT_DESTINATION_FC` (Package at destination fulfillment center) - # `DELIVERED` (Package successfully delivered to recipient) - `REJECTED_BY_BUYER` (Package refused by intended # recipient) - `UNDELIVERABLE` (Package cannot be delivered due to address or access issues) - # `RETURNING_TO_SELLER` (Package in transit back to seller) - `RETURNED_TO_SELLER` (Package successfully # returned to seller) - `LOST` (Package location unknown or confirmed lost) - `OUT_FOR_DELIVERY` (Package on # delivery vehicle for final delivery) - `DAMAGED` (Package damaged during transit) attribute?(:detailed_status, String, from: "detailedStatus") end
- PointsGranted =
Information about Amazon Points awarded with an item purchase.
Structure.new do # @return [Money] Cash equivalent value of the awarded Amazon Points. attribute?(:points_monetary_value, Money, from: "pointsMonetaryValue") # @return [Integer] Total number of Amazon Points granted to the customer's account for this item purchase. attribute?(:points_number, Integer, from: "pointsNumber") end
- DateTimeRange =
A time period with start and end boundaries.
Structure.new do # @return [Time] The beginning of the time period, in [ISO # 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format. attribute?(:earliest_date_time, Time, from: "earliestDateTime") # @return [Time] The end of the time period, in [ISO # 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format. attribute?(:latest_date_time, Time, from: "latestDateTime") end
- AssociatedOrder =
Another order that has a direct business relationship with the current order, such as replacements or exchanges.
Structure.new do # @return [String] The relationship between the current order and the associated order. # # **Possible values**: `REPLACEMENT_ORIGINAL_ID`, `EXCHANGE_ORIGINAL_ID` attribute?(:association_type, String, from: "associationType") # @return [String] The unique identifier of the related order that is associated with the current order. attribute?(:order_id, String, from: "orderId") end
- CustomerAddress =
The physical address of the customer.
Structure.new do # @return [String] The primary street address. attribute?(:address_line1, String, from: "addressLine1") # @return [String] Additional address information. attribute?(:address_line2, String, from: "addressLine2") # @return [String] Additional address information. attribute?(:address_line3, String, from: "addressLine3") # @return [String] The type of location. # # **Possible values**: `RESIDENTIAL`, `COMMERCIAL`, `PICKUP_POINT` attribute?(:address_type, String, from: "addressType") # @return [String] The city of the address. attribute?(:city, String) # @return [String] The name of the business or organization at this address. attribute?(:company_name, String, from: "companyName") # @return [String] The two-letter country code identifying the country of the address, in ISO 3166-1 format. attribute?(:country_code, String, from: "countryCode") # @return [String] The district or county of the address. attribute?(:district_or_county, String, from: "districtOrCounty") # @return [AddressExtendedFields] Additional address components specific to certain countries that provide more # detailed location information. # # **Note**: Only available with Brazil shipping addresses. attribute?(:extended_fields, AddressExtendedFields, from: "extendedFields") # @return [String] The municipality of the address. attribute?(:municipality, String) # @return [String] The full name of the person who will receive the delivery at this address. attribute?(:name, String) # @return [String] The contact phone number for delivery coordination and customer communication. # # **Note**: The buyer phone number will be suppressed in some cases, including but not limited to: # # - All FBA (Fulfillment by Amazon) orders. # - Shipped FBM (Fulfilled by the merchant) orders when current date is past the latest delivery date. attribute?(:phone, String) # @return [String] The postal code, ZIP code, or equivalent mailing code of the address. attribute?(:postal_code, String, from: "postalCode") # @return [String] The state, province, or region of the address. attribute?(:state_or_region, String, from: "stateOrRegion") end
- ItemFulfillment =
Information about how the order item should be processed, packed, and shipped to the customer.
Structure.new do # @return [ItemPacking] Information related to the packaging process for this item. attribute?(:packing, ItemPacking) # @return [ItemPicking] Information related to the warehouse picking process for this item. attribute?(:picking, ItemPicking) # @return [Integer] The number of units of this item that have been successfully processed and shipped. attribute?(:quantity_fulfilled, Integer, from: "quantityFulfilled") # @return [Integer] The number of units of this item that remain to be processed and shipped. attribute?(:quantity_unfulfilled, Integer, from: "quantityUnfulfilled") # @return [ItemShipping] Information related to the shipping and delivery process for this item. attribute?(:shipping, ItemShipping) end
- ItemPointsCost =
Information about Amazon Points granted with the purchase of an item, including both quantity and monetary equivalent value.
Structure.new do # @return [PointsGranted] Details of the Amazon Points granted, including count and monetary value. attribute?(:points_granted, PointsGranted, from: "pointsGranted") end
- MerchantAddress =
The physical address of the merchant.
Structure.new do # @return [String] The primary street address of the merchant's location. attribute?(:address_line1, String, from: "addressLine1") # @return [String] Additional address information. attribute?(:address_line2, String, from: "addressLine2") # @return [String] Additional address information. attribute?(:address_line3, String, from: "addressLine3") # @return [String] The city of the address. attribute?(:city, String) # @return [String] The two-letter country code for the address, in ISO 3166-1 format. attribute?(:country_code, String, from: "countryCode") # @return [String] The district or county of the address. attribute?(:district_or_county, String, from: "districtOrCounty") # @return [String] The municipality of the address. attribute?(:municipality, String) # @return [String] The name of the business or facility at this address. attribute?(:name, String) # @return [String] The postal code or ZIP code of the address. attribute?(:postal_code, String, from: "postalCode") # @return [String] The state, province, or region of the address. attribute?(:state_or_region, String, from: "stateOrRegion") end
- ItemCancellation =
The cancellation information of the order item.
Structure.new do # @return [ItemCancellationRequest] Details of the cancellation request submitted for this order item. attribute?(:cancellation_request, ItemCancellationRequest, from: "cancellationRequest") end
- OrderFulfillment =
Information about how the order is being processed, packed, and shipped to the customer.
Structure.new do # @return [String] The current status of the order in the fulfillment process, from pending to handover to # carrier. attribute(:fulfillment_status, String, from: "fulfillmentStatus") # @return [DateTimeRange] The promised time period within which the order should be delivered to the customer. attribute?(:deliver_by_window, DateTimeRange, from: "deliverByWindow") # @return [String] Specifies whether Amazon or the merchant is responsible for fulfilling this order. # # **Possible values**: `AMAZON`, `MERCHANT`. attribute?(:fulfilled_by, String, from: "fulfilledBy") # @return [String] The category of the shipping speed option selected by the customer at checkout. # # **Possible values**: `EXPEDITED`, `FREE_ECONOMY`, `NEXT_DAY`, `PRIORITY`, `SAME_DAY`, `SECOND_DAY`, # `SCHEDULED`, `STANDARD`. attribute?(:fulfillment_service_level, String, from: "fulfillmentServiceLevel") # @return [DateTimeRange] The promised time period within which the order must be shipped to meet the customer's # delivery expectations. attribute?(:ship_by_window, DateTimeRange, from: "shipByWindow") end
- GetOrderResponse =
Order details.
Structure.new do # @return [Order] All available information about the requested order. attribute(:order, Order) end
- ItemCustomization =
Information about any personalization, customization, or special modifications applied to this order item.
Structure.new do # @return [String] The URL of the customized data for custom orders from the Amazon Custom program. attribute?(:customized_url, String, from: "customizedUrl") end
- DeliveryPreference =
Contains all delivery instructions that the customer provides for the shipping address.
Structure.new do # @return [String] Building instructions, nearby landmark, or navigation instructions. attribute?(:address_instruction, String, from: "addressInstruction") # @return [Array<PreferredDeliveryCapability>] A list of miscellaneous delivery capabilities associated with the # shipping address. attribute?(:delivery_capabilities, Array, from: "deliveryCapabilities") # @return [PreferredDeliveryTime] Business hours and days when the delivery is preferred. attribute?(:delivery_time, PreferredDeliveryTime, from: "deliveryTime") # @return [String] The drop-off location selected by the customer. attribute?(:drop_off_location, String, from: "dropOffLocation") end
- SearchOrdersResponse =
A list of orders.
Structure.new do # @return [Array<Order>] An array containing all orders that match the search criteria. attribute(:orders, [Order]) # @return [Time] Only orders placed before the specified time are returned. The date must be in # {https://developer-docs.amazon.com/sp-api/docs/iso-8601 ISO 8601} format. attribute?(:created_before, Time, from: "createdBefore") # @return [Time] Only orders updated before the specified time are returned. The date must be in # {https://developer-docs.amazon.com/sp-api/docs/iso-8601 ISO 8601} format. attribute?(:last_updated_before, Time, from: "lastUpdatedBefore") # @return [Pagination] When a request has results that are not included in the response, pagination occurs. This # means the results are divided into individual pages. To retrieve a different page, you must pass the token # value as the `paginationToken` query parameter in the subsequent request. All other parameters must be # provided with the same values that were provided with the request that generated this token, with the # exception of `maxResultsPerPage` and `includedData`, which can be modified between calls. The token will # expire after 24 hours. When there are no other pages to fetch, the `pagination` field will be absent from # the response. attribute?(:pagination, Pagination) end
- AddressExtendedFields =
Additional address components that provide more detailed location information, helping with precise delivery routing.
Note: Only available with Brazil shipping addresses.
Structure.new do # @return [String] The floor number / unit number. attribute?(:complement, String) # @return [String] The neighborhood. This value is only used in some countries (such as Brazil). attribute?(:neighborhood, String) # @return [String] The name of the street. attribute?(:street_name, String, from: "streetName") # @return [String] The house, building, or property number associated with the location's street address. attribute?(:street_number, String, from: "streetNumber") end
- ItemProceedsBreakdown =
Detailed proceeds breakdown for a specific order item.
Structure.new do # @return [Array<ItemProceedsDetailedBreakdown>] Further granular breakdown of the subtotal. attribute?(:detailed_breakdowns, [ItemProceedsDetailedBreakdown], from: "detailedBreakdowns") # @return [Money] Monetary amount for the proceeds breakdown. attribute?(:subtotal, Money) # @return [String] Category classification of the proceeds breakdown. # # **Possible values**: `ITEM`, `SHIPPING`, `GIFT_WRAP`, `COD_FEE`, `OTHER`, `TAX`, `DISCOUNT` attribute?(:type, String) end
- PreferredDeliveryTime =
Customer-specified time preferences for when deliveries should be attempted at the destination address.
Structure.new do # @return [Array<BusinessHour>] Business hours when the business is open for deliveries. attribute?(:business_hours, [BusinessHour], from: "businessHours") # @return [Array<ExceptionDate>] Specific dates within the next 30 days when normal business hours do not apply. attribute?(:exception_dates, [ExceptionDate], from: "exceptionDates") end
- ItemPromotionBreakdown =
Detailed information about a specific promotional offer applied to an order item.
Structure.new do # @return [String] Unique identifier for the promotion applied to this item. attribute?(:promotion_id, String, from: "promotionId") end
- ItemSubstitutionOption =
Alternative product that can be substituted for an original order item when it becomes unavailable during fulfillment.
Structure.new do # @return [String] Amazon Standard Identification Number of the substitute product. attribute?(:asin, String) # @return [Measurement] Unit of measure and quantity specifications for the substitute product. attribute?(:measurement, Measurement) # @return [Integer] Number of units of the substitute item to be selected if substitution occurs. attribute?(:quantity_ordered, Integer, from: "quantityOrdered") # @return [String] The item's seller stock keeping unit (SKU). attribute?(:seller_sku, String, from: "sellerSku") # @return [String] Product name or title of the substitute item as displayed to customers. attribute?(:title, String) end
- ItemCancellationRequest =
Detailed information about a cancellation request submitted for a specific order item.
Structure.new do # @return [String] Explanation provided for why the cancellation was requested. attribute?(:cancel_reason, String, from: "cancelReason") # @return [String] Entity that initiated the cancellation request for this item. # # **Possible values**: `BUYER` attribute?(:requester, String) end
- ItemShippingConstraints =
Special shipping requirements and restrictions that must be observed when shipping an order item.
Structure.new do # @return [String] Payment must be collected from the customer at the time of delivery. attribute?(:cash_on_delivery, String, from: "cashOnDelivery") # @return [String] The line item must be delivered by pallet. attribute?(:pallet_delivery, String, from: "palletDelivery") # @return [String] The carrier must confirm that the recipient is of the legal age to receive the line item upon # delivery. attribute?(:recipient_age_verification, String, from: "recipientAgeVerification") # @return [String] The person receiving the line item must be the same as the intended recipient of the order. attribute?(:recipient_identity_verification, String, from: "recipientIdentityVerification") # @return [String] The recipient of the line item must sign to confirm its delivery. attribute?(:signature_confirmation, String, from: "signatureConfirmation") end
- ItemInternationalShipping =
Additional requirements needed for cross-border shipping of an order item.
Structure.new do # @return [String] Import One-Stop Shop registration number required for EU VAT compliance when shipping from # outside the European Union. Sellers shipping to the EU from outside the EU must provide this IOSS number to # their carrier when Amazon has collected the VAT on the sale. attribute?(:ioss_number, String, from: "iossNumber") end
- ItemSubstitutionPreference =
Substitution preference for an order item when it becomes unavailable during fulfillment.
Structure.new do # @return [String] Source and nature of the substitution preferences for this item. attribute(:substitution_type, String, from: "substitutionType") # @return [Array<ItemSubstitutionOption>] List of alternative products that can be substituted for the original # item if it becomes unavailable. attribute?(:substitution_options, [ItemSubstitutionOption], from: "substitutionOptions") end
- ItemProceedsDetailedBreakdown =
Further granular breakdown of the subtotal of the proceeds breakdown, only available for TAX and DISCOUNT proceeds type.
Structure.new do # @return [String] Specific classification of the further granular breakdown. # # **Possible values**: `ITEM`, `SHIPPING`, `GIFT_WRAP`, `COD_FEE`, `OTHER`, `DISCOUNT` attribute?(:subtype, String) # @return [Money] Monetary amount for the further granular breakdown. attribute?(:value, Money) end
Instance Attribute Summary
Attributes inherited from Peddler::API
#access_token, #endpoint, #retries
Instance Method Summary collapse
-
#get_order(order_id, included_data: nil) ⇒ Peddler::Response
Returns the order that you specify.
-
#search_orders(created_after: nil, created_before: nil, last_updated_after: nil, last_updated_before: nil, fulfillment_statuses: nil, marketplace_ids: nil, fulfilled_by: nil, max_results_per_page: nil, pagination_token: nil, included_data: nil) ⇒ Peddler::Response
Returns orders that are created or updated during the time period that you specify.
Methods inherited from Peddler::API
#endpoint_uri, #http, #initialize, #sandbox, #sandbox?
Constructor Details
This class inherits a constructor from Peddler::API
Instance Method Details
#get_order(order_id, included_data: nil) ⇒ Peddler::Response
This operation can make a static sandbox call.
Returns the order that you specify.
83 84 85 86 87 88 89 90 |
# File 'lib/peddler/apis/orders_2026_01_01.rb', line 83 def get_order(order_id, included_data: nil) path = "/orders/2026-01-01/orders/#{percent_encode(order_id)}" params = { "includedData" => stringify_array(included_data), }.compact parser = -> { GetOrderResponse } get(path, params:, parser:) end |
#search_orders(created_after: nil, created_before: nil, last_updated_after: nil, last_updated_before: nil, fulfillment_statuses: nil, marketplace_ids: nil, fulfilled_by: nil, max_results_per_page: nil, pagination_token: nil, included_data: nil) ⇒ Peddler::Response
This operation can make a static sandbox call.
Returns orders that are created or updated during the time period that you specify. You can filter the response for specific types of orders.
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/peddler/apis/orders_2026_01_01.rb', line 57 def search_orders(created_after: nil, created_before: nil, last_updated_after: nil, last_updated_before: nil, fulfillment_statuses: nil, marketplace_ids: nil, fulfilled_by: nil, max_results_per_page: nil, pagination_token: nil, included_data: nil) path = "/orders/2026-01-01/orders" params = { "createdAfter" => created_after, "createdBefore" => created_before, "lastUpdatedAfter" => last_updated_after, "lastUpdatedBefore" => last_updated_before, "fulfillmentStatuses" => stringify_array(fulfillment_statuses), "marketplaceIds" => stringify_array(marketplace_ids), "fulfilledBy" => stringify_array(fulfilled_by), "maxResultsPerPage" => max_results_per_page, "paginationToken" => pagination_token, "includedData" => stringify_array(included_data), }.compact parser = -> { SearchOrdersResponse } get(path, params:, parser:) end |