Class: Peddler::APIs::OrdersV0
- Inherits:
-
Peddler::API
- Object
- Peddler::API
- Peddler::APIs::OrdersV0
- Defined in:
- lib/peddler/apis/orders_v0.rb,
lib/peddler/apis/orders_v0/error.rb,
lib/peddler/apis/orders_v0/order.rb,
lib/peddler/apis/orders_v0/address.rb,
lib/peddler/apis/orders_v0/buyer_info.rb,
lib/peddler/apis/orders_v0/error_list.rb,
lib/peddler/apis/orders_v0/order_item.rb,
lib/peddler/apis/orders_v0/order_list.rb,
lib/peddler/apis/orders_v0/measurement.rb,
lib/peddler/apis/orders_v0/order_items.rb,
lib/peddler/apis/orders_v0/orders_list.rb,
lib/peddler/apis/orders_v0/open_interval.rb,
lib/peddler/apis/orders_v0/order_address.rb,
lib/peddler/apis/orders_v0/business_hours.rb,
lib/peddler/apis/orders_v0/buyer_tax_info.rb,
lib/peddler/apis/orders_v0/package_detail.rb,
lib/peddler/apis/orders_v0/tax_collection.rb,
lib/peddler/apis/orders_v0/amazon_programs.rb,
lib/peddler/apis/orders_v0/associated_item.rb,
lib/peddler/apis/orders_v0/exception_dates.rb,
lib/peddler/apis/orders_v0/item_buyer_info.rb,
lib/peddler/apis/orders_v0/order_item_list.rb,
lib/peddler/apis/orders_v0/order_buyer_info.rb,
lib/peddler/apis/orders_v0/order_items_list.rb,
lib/peddler/apis/orders_v0/rejection_reason.rb,
lib/peddler/apis/orders_v0/promotion_id_list.rb,
lib/peddler/apis/orders_v0/get_order_response.rb,
lib/peddler/apis/orders_v0/open_time_interval.rb,
lib/peddler/apis/orders_v0/tax_classification.rb,
lib/peddler/apis/orders_v0/get_orders_response.rb,
lib/peddler/apis/orders_v0/prescription_detail.rb,
lib/peddler/apis/orders_v0/product_info_detail.rb,
lib/peddler/apis/orders_v0/substitution_option.rb,
lib/peddler/apis/orders_v0/delivery_preferences.rb,
lib/peddler/apis/orders_v0/marketplace_tax_info.rb,
lib/peddler/apis/orders_v0/order_regulated_info.rb,
lib/peddler/apis/orders_v0/shipping_constraints.rb,
lib/peddler/apis/orders_v0/verification_details.rb,
lib/peddler/apis/orders_v0/buyer_tax_information.rb,
lib/peddler/apis/orders_v0/order_item_buyer_info.rb,
lib/peddler/apis/orders_v0/points_granted_detail.rb,
lib/peddler/apis/orders_v0/regulated_information.rb,
lib/peddler/apis/orders_v0/buyer_requested_cancel.rb,
lib/peddler/apis/orders_v0/transparency_code_list.rb,
lib/peddler/apis/orders_v0/address_extended_fields.rb,
lib/peddler/apis/orders_v0/fulfillment_instruction.rb,
lib/peddler/apis/orders_v0/preferred_delivery_time.rb,
lib/peddler/apis/orders_v0/confirm_shipment_request.rb,
lib/peddler/apis/orders_v0/get_order_items_response.rb,
lib/peddler/apis/orders_v0/substitution_option_list.rb,
lib/peddler/apis/orders_v0/substitution_preferences.rb,
lib/peddler/apis/orders_v0/valid_verification_detail.rb,
lib/peddler/apis/orders_v0/get_order_address_response.rb,
lib/peddler/apis/orders_v0/order_item_buyer_info_list.rb,
lib/peddler/apis/orders_v0/automated_shipping_settings.rb,
lib/peddler/apis/orders_v0/confirm_shipment_order_item.rb,
lib/peddler/apis/orders_v0/order_items_buyer_info_list.rb,
lib/peddler/apis/orders_v0/regulated_information_field.rb,
lib/peddler/apis/orders_v0/buyer_customized_info_detail.rb,
lib/peddler/apis/orders_v0/get_order_buyer_info_response.rb,
lib/peddler/apis/orders_v0/payment_execution_detail_item.rb,
lib/peddler/apis/orders_v0/update_shipment_status_request.rb,
lib/peddler/apis/orders_v0/confirm_shipment_error_response.rb,
lib/peddler/apis/orders_v0/payment_method_detail_item_list.rb,
lib/peddler/apis/orders_v0/confirm_shipment_order_items_list.rb,
lib/peddler/apis/orders_v0/get_order_regulated_info_response.rb,
lib/peddler/apis/orders_v0/payment_execution_detail_item_list.rb,
lib/peddler/apis/orders_v0/update_verification_status_request.rb,
lib/peddler/apis/orders_v0/get_order_items_buyer_info_response.rb,
lib/peddler/apis/orders_v0/regulated_order_verification_status.rb,
lib/peddler/apis/orders_v0/update_shipment_status_error_response.rb,
lib/peddler/apis/orders_v0/update_verification_status_request_body.rb,
lib/peddler/apis/orders_v0/update_verification_status_error_response.rb
Overview
Selling Partner API for Orders
Use the Orders Selling Partner API to programmatically retrieve order information. With this API, you can develop fast, flexible, and custom applications to manage order synchronization, perform order research, and create demand-based decision support tools.
Note: For the JP, AU, and SG marketplaces, the Orders API supports orders from 2016 onward. For all other marketplaces, the Orders API supports orders for the last two years (orders older than this don't show up in the response).
Defined Under Namespace
Classes: ConfirmShipmentOrderItemsList, ErrorList, OrderItemBuyerInfoList, OrderItemList, OrderItems, OrderList, PaymentExecutionDetailItemList, PaymentMethodDetailItemList, PromotionIdList, SubstitutionOptionList, TransparencyCodeList
Constant Summary collapse
- Error =
Error response returned when the request is unsuccessful.
Structure.new do # @return [String] An error code that identifies the type of error that occurred. attribute(:code, String) # @return [String] A message that describes the error condition. attribute(:message, String) # @return [String] Additional details that can help the caller understand or fix the issue. attribute?(:details, String) end
- Order =
Order information.
Structure.new do # @return [String] An Amazon-defined order identifier, in 3-7-7 format. attribute(:amazon_order_id, String, from: "AmazonOrderId") # @return [String] The date when the order was last updated. # # **Note**: `LastUpdateDate` is returned with an incorrect date for orders that were last updated before # 2009-04-01. attribute(:last_update_date, String, from: "LastUpdateDate") # @return [String] The current order status. attribute(:order_status, String, from: "OrderStatus") # @return [String] The date when the order was created. attribute(:purchase_date, String, from: "PurchaseDate") # @return [AutomatedShippingSettings] Contains information regarding the Shipping Settings Automaton program, # such as whether the order's shipping settings were generated automatically, and what those settings are. attribute?(:automated_shipping_settings, AutomatedShippingSettings, from: "AutomatedShippingSettings") # @return [BuyerInfo] Buyer information. # # **Note**: The `BuyerInfo` contains restricted data. Use the Restricted Data Token (RDT) and restricted SPDS # roles to access the restricted data in `BuyerInfo`. For example, `BuyerName`, `BuyerTaxInfo`, and # `PurchaseOrderNumber`. attribute?(:buyer_info, BuyerInfo, from: "BuyerInfo") # @return [String] The buyer's invoicing preference. Sellers can use this data to issue electronic invoices for # orders in Turkey. # # **Note**: This attribute is only available in the Turkey marketplace. attribute?(:buyer_invoice_preference, String, from: "BuyerInvoicePreference") # @return [BuyerTaxInformation] Contains the business invoice tax information. Sellers could use this data to # issue electronic invoices for business orders in Turkey. # # **Note**: # 1. This attribute is only available in the Turkey marketplace for the orders that `BuyerInvoicePreference` is # BUSINESS. # 2. The `BuyerTaxInformation` is a restricted data. Use the Restricted Data Token (RDT) and restricted SPDS # roles to access this restricted data. attribute?(:buyer_tax_information, BuyerTaxInformation, from: "BuyerTaxInformation") # @return [String] Custom ship label for Checkout by Amazon (CBA). attribute?(:cba_displayable_shipping_label, String, from: "CbaDisplayableShippingLabel") # @return [Address] The recommended location for the seller to ship the items from. It is calculated at # checkout. The seller may or may not choose to ship from this location. attribute?(:default_ship_from_location_address, Address, from: "DefaultShipFromLocationAddress") # @return [String] The start of the time period within which you have committed to fulfill the order. In [ISO # 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date time format. Only returned for # seller-fulfilled orders. attribute?(:earliest_delivery_date, String, from: "EarliestDeliveryDate") # @return [String] The start of the time period within which you have committed to ship the order. In [ISO # 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date time format. Only returned for # seller-fulfilled orders. # # **Note**: `EarliestShipDate` might not be returned for orders placed before February 1, 2013. attribute?(:earliest_ship_date, String, from: "EarliestShipDate") # @return [String] The status of the Amazon Easy Ship order. This property is only included for Amazon Easy Ship # orders. attribute?(:easy_ship_shipment_status, String, from: "EasyShipShipmentStatus") # @return [String] The status of the electronic invoice. attribute?(:electronic_invoice_status, String, from: "ElectronicInvoiceStatus") # @return [String] Whether the order was fulfilled by Amazon (`AFN`) or by the seller (`MFN`). attribute?(:fulfillment_channel, String, from: "FulfillmentChannel") # @return [FulfillmentInstruction] Contains the instructions about the fulfillment, such as the location from # where you want the order filled. attribute?(:fulfillment_instruction, FulfillmentInstruction, from: "FulfillmentInstruction") # @return [:boolean] Whether the order contains regulated items which may require additional approval steps # before being fulfilled. attribute?(:has_regulated_items, :boolean, from: "HasRegulatedItems") # @return [:boolean] When true, this order is marked to be delivered to an Access Point. The access location is # chosen by the customer. Access Points include Amazon Hub Lockers, Amazon Hub Counters, and pickup points # operated by carriers. attribute?(:access_point_order, :boolean, from: "IsAccessPointOrder") # @return [:boolean] When true, the order is an Amazon Business order. An Amazon Business order is an order # where the buyer is a Verified Business Buyer. attribute?(:business_order, :boolean, from: "IsBusinessOrder") # @return [:boolean] When true, the estimated ship date is set for the order. Only returned for Sourcing on # Demand orders. attribute?(:estimated_ship_date_set, :boolean, from: "IsEstimatedShipDateSet") # @return [:boolean] When true, the order is a `GlobalExpress` order. attribute?(:global_express_enabled, :boolean, from: "IsGlobalExpressEnabled") # @return [:boolean] When true, the item within this order was bought and re-sold by Amazon Business EU SARL # (ABEU). By buying and instantly re-selling your items, ABEU becomes the seller of record, making your # inventory available for sale to customers who would not otherwise purchase from a third-party seller. attribute?(:iba, :boolean, from: "IsIBA") # @return [:boolean] When true, this order is marked to be picked up from a store rather than delivered. attribute?(:ispu, :boolean, from: "IsISPU") # @return [:boolean] When true, the order has a Premium Shipping Service Level Agreement. For more information # about Premium Shipping orders, refer to "Premium Shipping Options" in the Seller Central Help for your # marketplace. attribute?(:premium_order, :boolean, from: "IsPremiumOrder") # @return [:boolean] When true, the order is a seller-fulfilled Amazon Prime order. attribute?(:prime, :boolean, from: "IsPrime") # @return [:boolean] When true, this is a replacement order. attribute?(:replacement_order, :boolean, from: "IsReplacementOrder") # @return [:boolean] When true, the item within this order was bought and re-sold by Amazon Business EU SARL # (ABEU). By buying and instantly re-selling your items, ABEU becomes the seller of record, making your # inventory available for sale to customers who would not otherwise purchase from a third-party seller. attribute?(:sold_by_ab, :boolean, from: "IsSoldByAB") # @return [String] The end of the time period within which you have committed to fulfill the order. In [ISO # 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date time format. Only returned for # seller-fulfilled orders that do not have a `PendingAvailability`, `Pending`, or `Canceled` status. attribute?(:latest_delivery_date, String, from: "LatestDeliveryDate") # @return [String] The end of the time period within which you have committed to ship the order. In [ISO # 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date time format. Only returned for # seller-fulfilled orders. # # **Note**: `LatestShipDate` might not be returned for orders placed before February 1, 2013. attribute?(:latest_ship_date, String, from: "LatestShipDate") # @return [String] The identifier for the marketplace where the order was placed. attribute?(:marketplace_id, String, from: "MarketplaceId") # @return [MarketplaceTaxInfo] Tax information about the marketplace where the sale took place. Sellers can use # this data to issue electronic invoices for orders in Brazil. # # **Note**: This attribute is only available in the Brazil marketplace for the orders with `Pending` or # `Unshipped` status. attribute?(:marketplace_tax_info, MarketplaceTaxInfo, from: "MarketplaceTaxInfo") # @return [Integer] The number of items shipped. attribute?(:number_of_items_shipped, Integer, from: "NumberOfItemsShipped") # @return [Integer] The number of items unshipped. attribute?(:number_of_items_unshipped, Integer, from: "NumberOfItemsUnshipped") # @return [String] The order channel for the first item in the order. attribute?(:order_channel, String, from: "OrderChannel") # @return [Money] The total charge for this order. attribute?(:order_total, Money, from: "OrderTotal") # @return [String] The order's type. attribute?(:order_type, String, from: "OrderType") # @return [Array<PaymentExecutionDetailItem>] Information about the sub-payment methods for an order. attribute?(:payment_execution_detail, [PaymentExecutionDetailItem], from: "PaymentExecutionDetail") # @return [String] The payment method for the order. This property is limited to COD and CVS payment methods. # Unless you need the specific COD payment information provided by the `PaymentExecutionDetailItem` object, we # recommend using the `PaymentMethodDetails` property to get payment method information. attribute?(:payment_method, String, from: "PaymentMethod") # @return [Array<String>] A list of payment methods for the order. attribute?(:payment_method_details, [String], from: "PaymentMethodDetails") # @return [String] Indicates the date by which the seller must respond to the buyer with an estimated ship date. # Only returned for Sourcing on Demand orders. attribute?(:promise_response_due_date, String, from: "PromiseResponseDueDate") # @return [String] The order ID value for the order that is being replaced. Returned only if IsReplacementOrder # = true. attribute?(:replaced_order_id, String, from: "ReplacedOrderId") # @return [String] The sales channel for the first item in the order. attribute?(:sales_channel, String, from: "SalesChannel") # @return [String] The seller’s friendly name registered in the marketplace where the sale took place. Sellers # can use this data to issue electronic invoices for orders in Brazil. # # **Note**: This attribute is only available in the Brazil marketplace for the orders with `Pending` or # `Unshipped` status. attribute?(:seller_display_name, String, from: "SellerDisplayName") # @return [String] A seller-defined order identifier. attribute?(:seller_order_id, String, from: "SellerOrderId") # @return [String] The order's shipment service level. attribute?(:ship_service_level, String, from: "ShipServiceLevel") # @return [String] The shipment service level category for the order. # # **Possible values**: `Expedited`, `FreeEconomy`, `NextDay`, `Priority`, `SameDay`, `SecondDay`, `Scheduled`, # and `Standard`. attribute?(:shipment_service_level_category, String, from: "ShipmentServiceLevelCategory") # @return [Address] The shipping address for the order. # # **Note**: # 1. `ShippingAddress` is only available for orders with the following status values: Unshipped, # `PartiallyShipped`, Shipped and `InvoiceUnconfirmed`. # 2. The `ShippingAddress` contains restricted data. Use the Restricted Data Token (RDT) and restricted SPDS # roles to access the restricted data in `ShippingAddress`. For example, `Name`, `AddressLine1`, `AddressLine2`, # `AddressLine3`, `Phone`, `AddressType`, and `ExtendedFields`. attribute?(:shipping_address, Address, from: "ShippingAddress") end
- Address =
The shipping address for the order.
Structure.new do # @return [String] The street address. attribute?(:address_line1, String, from: "AddressLine1") # @return [String] Additional street address information, if required. attribute?(:address_line2, String, from: "AddressLine2") # @return [String] Additional street address information, if required. attribute?(:address_line3, String, from: "AddressLine3") # @return [String] The address type of the shipping address. attribute?(:address_type, String, from: "AddressType") # @return [String] The city. attribute?(:city, String, from: "City") # @return [String] The company name of the recipient. # # **Note**: This attribute is only available for shipping address. attribute?(:company_name, String, from: "CompanyName") # @return [String] The country code. A two-character country code, in ISO 3166-1 alpha-2 format. attribute?(:country_code, String, from: "CountryCode") # @return [String] The county. attribute?(:county, String, from: "County") # @return [String] The district. attribute?(:district, String, from: "District") # @return [AddressExtendedFields] The container for address extended fields. For example, street name or street # number. # # **Note**: This attribute is currently only available with Brazil shipping addresses. attribute?(:extended_fields, AddressExtendedFields, from: "ExtendedFields") # @return [String] The municipality. attribute?(:municipality, String, from: "Municipality") # @return [String] The name. attribute?(:name, String, from: "Name") # @return [String] The phone number of the buyer. # # **Note**: # 1. This attribute is only available for shipping address. # 2. In some cases, the buyer phone number is suppressed: # a. Phone is suppressed for all `AFN` (fulfilled by Amazon) orders. # b. Phone is suppressed for the shipped `MFN` (fulfilled by seller) order when the current date is past the # Latest Delivery Date. attribute?(:phone, String, from: "Phone") # @return [String] The postal code. attribute?(:postal_code, String, from: "PostalCode") # @return [String] The state or region. attribute?(:state_or_region, String, from: "StateOrRegion") end
- BuyerInfo =
Buyer information.
Structure.new do # @return [String] The county of the buyer. # # **Note**: This attribute is only available in the Brazil marketplace. attribute?(:buyer_county, String, from: "BuyerCounty") # @return [String] The anonymized email address of the buyer. attribute?(:buyer_email, String, from: "BuyerEmail") # @return [String] The buyer name or the recipient name. attribute?(:buyer_name, String, from: "BuyerName") # @return [BuyerTaxInfo] Tax information about the buyer. Sellers could use this data to issue electronic # invoices for business orders. # # **Note**: This attribute is only available for business orders in the Brazil, Mexico and India marketplaces. attribute?(:buyer_tax_info, BuyerTaxInfo, from: "BuyerTaxInfo") # @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?(:purchase_order_number, String, from: "PurchaseOrderNumber") end
- OrderItem =
A single order item.
Structure.new do # @return [String] The item's Amazon Standard Identification Number (ASIN). attribute(:asin, String, from: "ASIN") # @return [String] An Amazon-defined order item identifier. attribute(:order_item_id, String, from: "OrderItemId") # @return [Integer] The number of items in the order. attribute(:quantity_ordered, Integer, from: "QuantityOrdered") # @return [AmazonPrograms] Contains the list of programs that are associated with an item. attribute?(:amazon_programs, AmazonPrograms, from: "AmazonPrograms") # @return [Array<AssociatedItem>] A list of associated items that a customer has purchased with a product. For # example, a tire installation service purchased with tires. attribute?(:associated_items, [AssociatedItem], from: "AssociatedItems") # @return [ItemBuyerInfo] A single item's buyer information. # # **Note**: The `BuyerInfo` contains restricted data. Use the Restricted Data Token (RDT) and restricted SPDS # roles to access the restricted data in `BuyerInfo`. For example, `BuyerCustomizedInfo` and `GiftMessageText`. attribute?(:buyer_info, ItemBuyerInfo, from: "BuyerInfo") # @return [BuyerRequestedCancel] Information about whether or not a buyer requested cancellation. attribute?(:buyer_requested_cancel, BuyerRequestedCancel, from: "BuyerRequestedCancel") # @return [Money] The fee charged for COD service. attribute?(:cod_fee, Money, from: "CODFee") # @return [Money] The discount on the COD fee. attribute?(:cod_fee_discount, Money, from: "CODFeeDiscount") # @return [String] The condition of the item. # # **Possible values**: `New`, `Used`, `Collectible`, `Refurbished`, `Preorder`, and `Club`. attribute?(:condition_id, String, from: "ConditionId") # @return [String] The condition of the item, as described by the seller. attribute?(:condition_note, String, from: "ConditionNote") # @return [String] The subcondition of the item. # # **Possible values**: `New`, `Mint`, `Very Good`, `Good`, `Acceptable`, `Poor`, `Club`, `OEM`, `Warranty`, # `Refurbished Warranty`, `Refurbished`, `Open Box`, `Any`, and `Other`. attribute?(:condition_subtype_id, String, from: "ConditionSubtypeId") # @return [String] The category of deemed reseller. This applies to selling partners that are not based in the # EU and is used to help them meet the VAT Deemed Reseller tax laws in the EU and UK. attribute?(:deemed_reseller_category, String, from: "DeemedResellerCategory") # @return [String] The IOSS number of the marketplace. 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") # @return [String] Indicates whether the item is a gift. # # **Possible values**: `true` and `false`. attribute?(:is_gift, String, from: "IsGift") # @return [:boolean] When true, the ASIN is enrolled in Transparency. The Transparency serial number that you # must submit is determined by: # # **1D or 2D Barcode:** This has a **T** logo. Submit either the 29-character alpha-numeric identifier beginning # with **AZ** or **ZA**, or the 38-character Serialized Global Trade Item Number (SGTIN). # **2D Barcode SN:** Submit the 7- to 20-character serial number barcode, which likely has the prefix **SN**. # The serial number is applied to the same side of the packaging as the GTIN (UPC/EAN/ISBN) barcode. # **QR code SN:** Submit the URL that the QR code generates. attribute?(:transparency, :boolean, from: "IsTransparency") # @return [Money] The selling price of the order item. Note that an order item is an item and a quantity. This # means that the value of `ItemPrice` is equal to the selling price of the item multiplied by the quantity # ordered. `ItemPrice` excludes `ShippingPrice` and GiftWrapPrice. attribute?(:item_price, Money, from: "ItemPrice") # @return [Money] The tax on the item price. attribute?(:item_tax, Money, from: "ItemTax") # @return [Measurement] Measurement information for the order item. attribute?(:measurement, Measurement, from: "Measurement") # @return [PointsGrantedDetail] The number and value of Amazon Points granted with the purchase of an item. attribute?(:points_granted, PointsGrantedDetail, from: "PointsGranted") # @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 values**: `BusinessPrice` attribute?(:price_designation, String, from: "PriceDesignation") # @return [ProductInfoDetail] The item's product information. attribute?(:product_info, ProductInfoDetail, from: "ProductInfo") # @return [Money] The total of all promotional discounts in the offer. attribute?(:promotion_discount, Money, from: "PromotionDiscount") # @return [Money] The tax on the total of all promotional discounts in the offer. attribute?(:promotion_discount_tax, Money, from: "PromotionDiscountTax") # @return [Array<String>] attribute?(:promotion_ids, [String], from: "PromotionIds") # @return [Integer] The number of items shipped. attribute?(:quantity_shipped, Integer, from: "QuantityShipped") # @return [String] The end date of the scheduled delivery window in the time zone for the order destination. In # [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date time format. attribute?(:scheduled_delivery_end_date, String, from: "ScheduledDeliveryEndDate") # @return [String] The start date of the scheduled delivery window in the time zone for the order destination. # In [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date time format. attribute?(:scheduled_delivery_start_date, String, from: "ScheduledDeliveryStartDate") # @return [String] The item's seller stock keeping unit (SKU). attribute?(:seller_sku, String, from: "SellerSKU") # @return [:boolean] When true, the product type for this item has a serial number. # # Only returned for Amazon Easy Ship orders. attribute?(:serial_number_required, :boolean, from: "SerialNumberRequired") # @return [Array<String>] A list of serial numbers for electronic products that are shipped to customers. # Returned for FBA orders only. attribute?(:serial_numbers, [String], from: "SerialNumbers") # @return [ShippingConstraints] Shipping constraints applicable to this order. attribute?(:shipping_constraints, ShippingConstraints, from: "ShippingConstraints") # @return [Money] The discount on the shipping price. attribute?(:shipping_discount, Money, from: "ShippingDiscount") # @return [Money] The tax on the discount on the shipping price. attribute?(:shipping_discount_tax, Money, from: "ShippingDiscountTax") # @return [Money] The item's shipping price. attribute?(:shipping_price, Money, from: "ShippingPrice") # @return [Money] The tax on the shipping price. attribute?(:shipping_tax, Money, from: "ShippingTax") # @return [String] The store chain store identifier. Linked to a specific store in a store chain. attribute?(:store_chain_store_id, String, from: "StoreChainStoreId") # @return [SubstitutionPreferences] Substitution preferences for the order item. This is an optional field that # is only present if a seller supports substitutions, as is the case with some grocery sellers. attribute?(:substitution_preferences, SubstitutionPreferences, from: "SubstitutionPreferences") # @return [TaxCollection] Information about withheld taxes. attribute?(:tax_collection, TaxCollection, from: "TaxCollection") # @return [String] The item's name. attribute?(:title, String, from: "Title") end
- Measurement =
Measurement information for an order item.
Structure.new do # @return [String] The unit of measure. attribute(:unit, String, from: "Unit") # @return [Float] The measurement value. attribute(:value, Float, from: "Value") end
- OrdersList =
A list of orders along with additional information to make subsequent API calls.
Structure.new do # @return [Array<Order>] attribute(:orders, [Order], from: "Orders") # @return [String] Use this date to select orders created before (or at) a specified time. Only orders placed # before the specified time are returned. The date must be in [ISO # 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format. attribute?(:created_before, String, from: "CreatedBefore") # @return [String] Use this date to select orders that were last updated before (or at) a specified time. An # update is defined as any change in order status, including the creation of a new order. Includes updates made # by Amazon and by the seller. Use [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format for # all dates. attribute?(:last_updated_before, String, from: "LastUpdatedBefore") # @return [String] When present and not empty, pass this string token in the next request to return the next # response page. attribute?(:next_token, String, from: "NextToken") end
- OpenInterval =
The time interval for which the business is open.
Structure.new do # @return [OpenTimeInterval] The time when the business closes. attribute?(:end_time, OpenTimeInterval, from: "EndTime") # @return [OpenTimeInterval] The time when the business opens. attribute?(:start_time, OpenTimeInterval, from: "StartTime") end
- OrderAddress =
The shipping address for the order.
Structure.new do # @return [String] An Amazon-defined order identifier, in 3-7-7 format. attribute(:amazon_order_id, String, from: "AmazonOrderId") # @return [String] The company name of the contact buyer. For IBA orders, the buyer company must be Amazon # entities. attribute?(:buyer_company_name, String, from: "BuyerCompanyName") # @return [DeliveryPreferences] attribute?(:delivery_preferences, DeliveryPreferences, from: "DeliveryPreferences") # @return [Address] The shipping address for the order. # # **Note**: `ShippingAddress` is only available for orders with the following status values: `Unshipped`, # `PartiallyShipped`, `Shipped`, and `InvoiceUnconfirmed`. attribute?(:shipping_address, Address, from: "ShippingAddress") end
- BusinessHours =
Business days and hours when the destination is open for deliveries.
Structure.new do # @return [String] Day of the week. attribute?(:day_of_week, String, from: "DayOfWeek") # @return [Array<OpenInterval>] Time window during the day when the business is open. attribute?(:open_intervals, [OpenInterval], from: "OpenIntervals") end
- BuyerTaxInfo =
Tax information about the buyer.
Structure.new do # @return [String] The legal name of the company. attribute?(:company_legal_name, String, from: "CompanyLegalName") # @return [Array<TaxClassification>] A list of tax classifications that apply to the order. attribute?(:tax_classifications, [TaxClassification], from: "TaxClassifications") # @return [String] The country or region imposing the tax. attribute?(:taxing_region, String, from: "TaxingRegion") end
- PackageDetail =
Properties of packages
Structure.new do # @return [String] Identifies the carrier that will deliver the package. This field is required for all # marketplaces. For more information, refer to the [`CarrierCode` # announcement](https://developer-docs.amazon.com/sp-api/changelog/carriercode-value-required-in-shipment-confirmations-for-br-mx-ca-sg-au-in-jp-marketplaces). attribute(:carrier_code, String, from: "carrierCode") # @return [Array<ConfirmShipmentOrderItem>] The list of order items and quantities to be updated. attribute(:order_items, [ConfirmShipmentOrderItem], from: "orderItems") # @return [String] attribute(:package_reference_id, String, from: "packageReferenceId") # @return [Time] The shipping date for the package. Must be in # {https://developer-docs.amazon.com/sp-api/docs/iso-8601 ISO 8601} date/time format. attribute(:ship_date, Time, from: "shipDate") # @return [String] The tracking number used to obtain tracking and delivery information. attribute(:tracking_number, String, from: "trackingNumber") # @return [String] Carrier name that will deliver the package. Required when `carrierCode` is "Other" attribute?(:carrier_name, String, from: "carrierName") # @return [String] The unique identifier for the supply source. attribute?(:ship_from_supply_source_id, String, from: "shipFromSupplySourceId") # @return [String] Ship method to be used for shipping the order. attribute?(:shipping_method, String, from: "shippingMethod") end
- TaxCollection =
Information about withheld taxes.
Structure.new do # @return [String] The tax collection model applied to the item. attribute?(:model, String, from: "Model") # @return [String] The party responsible for withholding the taxes and remitting them to the taxing authority. attribute?(:responsible_party, String, from: "ResponsibleParty") end
- AmazonPrograms =
Contains the list of programs that Amazon associates with an item.
Possible programs are:
- Subscribe and Save: Offers recurring, scheduled deliveries to Amazon customers and Amazon Business customers for their frequently ordered products. - FBM Ship+: Unlocks expedited shipping without the extra cost. Helps you to provide accurate and fast delivery dates to Amazon customers. You also receive protection from late deliveries, a discount on expedited shipping rates, and cash back when you ship.
Structure.new do # @return [Array<String>] A list of the programs that Amazon associates with the order item. # # **Possible values**: `SUBSCRIBE_AND_SAVE`, `FBM_SHIP_PLUS` attribute(:programs, [String], from: "Programs") end
- AssociatedItem =
An item that is associated with an order item. For example, a tire installation service that is purchased with tires.
Structure.new do # @return [String] attribute?(:association_type, String, from: "AssociationType") # @return [String] The order item's order identifier, in 3-7-7 format. attribute?(:order_id, String, from: "OrderId") # @return [String] An Amazon-defined item identifier for the associated item. attribute?(:order_item_id, String, from: "OrderItemId") end
- ExceptionDates =
Dates when the business is closed or open with a different time window.
Structure.new do # @return [String] Date when the business is closed, in {https://developer-docs.amazon.com/sp-api/docs/iso-8601 # ISO 8601} date format. attribute?(:exception_date, String, from: "ExceptionDate") # @return [:boolean] Boolean indicating if the business is closed or open on that date. attribute?(:open, :boolean, from: "IsOpen") # @return [Array<OpenInterval>] Time window during the day when the business is open. attribute?(:open_intervals, [OpenInterval], from: "OpenIntervals") end
- ItemBuyerInfo =
A single item's buyer information.
Structure.new do # @return [BuyerCustomizedInfoDetail] Buyer information for custom orders from the Amazon Custom program. # # **Note**: This attribute is only available for MFN (fulfilled by seller) orders. attribute?(:buyer_customized_info, BuyerCustomizedInfoDetail, from: "BuyerCustomizedInfo") # @return [String] A gift message provided by the buyer. # # **Note**: This attribute is only available for MFN (fulfilled by seller) orders. attribute?(:gift_message_text, String, from: "GiftMessageText") # @return [String] The gift wrap level specified by the buyer. attribute?(:gift_wrap_level, String, from: "GiftWrapLevel") # @return [Money] The gift wrap price of the item. attribute?(:gift_wrap_price, Money, from: "GiftWrapPrice") # @return [Money] The tax on the gift wrap price. attribute?(:gift_wrap_tax, Money, from: "GiftWrapTax") end
- OrderBuyerInfo =
Buyer information for an order.
Structure.new do # @return [String] An Amazon-defined order identifier, in 3-7-7 format. attribute(:amazon_order_id, String, from: "AmazonOrderId") # @return [String] The county of the buyer. # # **Note**: This attribute is only available in the Brazil marketplace. attribute?(:buyer_county, String, from: "BuyerCounty") # @return [String] The anonymized email address of the buyer. attribute?(:buyer_email, String, from: "BuyerEmail") # @return [String] The buyer name or the recipient name. attribute?(:buyer_name, String, from: "BuyerName") # @return [BuyerTaxInfo] Tax information about the buyer. Sellers can use this data to issue electronic invoices # for business orders. # # **Note**: This attribute is only available for business orders in the Brazil, Mexico and India marketplaces. attribute?(:buyer_tax_info, BuyerTaxInfo, from: "BuyerTaxInfo") # @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?(:purchase_order_number, String, from: "PurchaseOrderNumber") end
- OrderItemsList =
The order items list along with the order ID.
Structure.new do # @return [String] An Amazon-defined order identifier, in 3-7-7 format. attribute(:amazon_order_id, String, from: "AmazonOrderId") # @return [Array<OrderItem>] attribute(:order_items, [OrderItem], from: "OrderItems") # @return [String] When present and not empty, pass this string token in the next request to return the next # response page. attribute?(:next_token, String, from: "NextToken") end
- RejectionReason =
The reason for rejecting the order's regulated information. This is only present if the order is rejected.
Structure.new do # @return [String] The description of this rejection reason. attribute(:rejection_reason_description, String, from: "RejectionReasonDescription") # @return [String] The unique identifier for the rejection reason. attribute(:rejection_reason_id, String, from: "RejectionReasonId") end
- GetOrderResponse =
The response schema for the
getOrder
operation. Structure.new do # @return [Array<Error>] One or more unexpected errors occurred during the `getOrder` operation. attribute?(:errors, [Error]) # @return [Order] The payload for the `getOrder` operation. attribute?(:payload, Order) end
- OpenTimeInterval =
The time when the business opens or closes.
Structure.new do # @return [Integer] The hour when the business opens or closes. attribute?(:hour, Integer, from: "Hour") # @return [Integer] The minute when the business opens or closes. attribute?(:minute, Integer, from: "Minute") end
- TaxClassification =
The tax classification of the order.
Structure.new do # @return [String] The type of tax. attribute?(:name, String, from: "Name") # @return [String] The buyer's tax identifier. attribute?(:value, String, from: "Value") end
- GetOrdersResponse =
The response schema for the
getOrders
operation. Structure.new do # @return [Array<Error>] One or more unexpected errors occurred during the `getOrders` operation. attribute?(:errors, [Error]) # @return [OrdersList] The payload for the `getOrders` operation. attribute?(:payload, OrdersList) end
- PrescriptionDetail =
Information about the prescription that is used to verify a regulated product. This must be provided once per order and reflect the seller’s own records. Only approved orders can have prescriptions.
Structure.new do # @return [String] The identifier for the clinic which provided the prescription used to verify the regulated # product. attribute(:clinic_id, String, from: "clinicId") # @return [Time] The expiration date of the prescription used to verify the regulated product, in [ISO # 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date time format. attribute(:expiration_date, Time, from: "expirationDate") # @return [String] The identifier for the prescription used to verify the regulated product. attribute(:prescription_id, String, from: "prescriptionId") # @return [Integer] The number of refills remaining for the prescription used to verify the regulated product. # If a prescription originally had 10 total refills, this value must be `10` for the first order, `9` for the # second order, and `0` for the eleventh order. If a prescription originally had no refills, this value must be # 0. attribute(:refills_remaining, Integer, from: "refillsRemaining") # @return [Integer] The total number of refills written in the original prescription used to verify the # regulated product. If a prescription originally had no refills, this value must be 0. attribute(:total_refills_authorized, Integer, from: "totalRefillsAuthorized") # @return [String] The instructions for the prescription as provided by the approver of the regulated product. attribute(:usage_instructions, String, from: "usageInstructions") # @return [Integer] The number of units in each fill as provided in the prescription. attribute(:written_quantity, Integer, from: "writtenQuantity") end
- ProductInfoDetail =
Product information on the number of items.
Structure.new do # @return [String] The total number of items that are included in the ASIN. attribute?(:number_of_items, String, from: "NumberOfItems") end
- SubstitutionOption =
Substitution options for an order item.
Structure.new do # @return [String] The item's Amazon Standard Identification Number (ASIN). attribute?(:asin, String, from: "ASIN") # @return [Measurement] Measurement information for the substitution option. attribute?(:measurement, Measurement, from: "Measurement") # @return [Integer] The number of items to be picked for this substitution option. attribute?(:quantity_ordered, Integer, from: "QuantityOrdered") # @return [String] The item's seller stock keeping unit (SKU). attribute?(:seller_sku, String, from: "SellerSKU") # @return [String] The item's title. attribute?(:title, String, from: "Title") end
- DeliveryPreferences =
Contains all of the delivery instructions provided by the customer for the shipping address.
Structure.new do # @return [String] Building instructions, nearby landmark or navigation instructions. attribute?(:address_instructions, String, from: "AddressInstructions") # @return [String] Drop-off location selected by the customer. attribute?(:drop_off_location, String, from: "DropOffLocation") # @return [Array<OtherDeliveryAttributes>] Enumerated list of miscellaneous delivery attributes associated with # the shipping address. attribute?(:other_attributes, Array, from: "OtherAttributes") # @return [PreferredDeliveryTime] Business hours and days when the delivery is preferred. attribute?(:preferred_delivery_time, PreferredDeliveryTime, from: "PreferredDeliveryTime") end
- MarketplaceTaxInfo =
Tax information about the marketplace.
Structure.new do # @return [Array<TaxClassification>] A list of tax classifications that apply to the order. attribute?(:tax_classifications, [TaxClassification], from: "TaxClassifications") end
- OrderRegulatedInfo =
The order's regulated information along with its verification status.
Structure.new do # @return [String] An Amazon-defined order identifier, in 3-7-7 format. attribute(:amazon_order_id, String, from: "AmazonOrderId") # @return [RegulatedInformation] The regulated information collected during purchase and used to verify the # order. attribute(:regulated_information, RegulatedInformation, from: "RegulatedInformation") # @return [RegulatedOrderVerificationStatus] The order's verification status. attribute(:regulated_order_verification_status, RegulatedOrderVerificationStatus, from: "RegulatedOrderVerificationStatus") # @return [:boolean] When true, the order requires attaching a dosage information label when shipped. attribute(:requires_dosage_label, :boolean, from: "RequiresDosageLabel") end
- ShippingConstraints =
Delivery constraints applicable to this order.
Structure.new do # @return [String] Indicates if the line item needs to be delivered by pallet. attribute?(:pallet_delivery, String, from: "PalletDelivery") # @return [String] Indicates that the carrier must confirm the recipient is of the legal age to receive the line # item upon delivery. attribute?(:recipient_age_verification, String, from: "RecipientAgeVerification") # @return [String] Indicates that 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] Indicates that the recipient of the line item must sign to confirm its delivery. attribute?(:signature_confirmation, String, from: "SignatureConfirmation") end
- VerificationDetails =
Additional information related to the verification of a regulated order.
Structure.new do # @return [PrescriptionDetail] Information regarding the prescription tied to the order. attribute?(:prescription_detail, PrescriptionDetail, from: "prescriptionDetail") end
- BuyerTaxInformation =
Contains the business invoice tax information. Available only in the TR marketplace.
Structure.new do # @return [String] Business buyer's address. attribute?(:buyer_business_address, String, from: "BuyerBusinessAddress") # @return [String] Business buyer's company legal name. attribute?(:buyer_legal_company_name, String, from: "BuyerLegalCompanyName") # @return [String] Business buyer's tax office. attribute?(:buyer_tax_office, String, from: "BuyerTaxOffice") # @return [String] Business buyer's tax registration ID. attribute?(:buyer_tax_registration_id, String, from: "BuyerTaxRegistrationId") end
- OrderItemBuyerInfo =
A single order item's buyer information.
Structure.new do # @return [String] An Amazon-defined order item identifier. attribute(:order_item_id, String, from: "OrderItemId") # @return [BuyerCustomizedInfoDetail] Buyer information for custom orders from the Amazon Custom program. # # **Note**: This attribute is only available for MFN (fulfilled by seller) orders. attribute?(:buyer_customized_info, BuyerCustomizedInfoDetail, from: "BuyerCustomizedInfo") # @return [String] A gift message provided by the buyer. # # **Note**: This attribute is only available for MFN (fulfilled by seller) orders. attribute?(:gift_message_text, String, from: "GiftMessageText") # @return [String] The gift wrap level specified by the buyer. attribute?(:gift_wrap_level, String, from: "GiftWrapLevel") # @return [Money] The gift wrap price of the item. attribute?(:gift_wrap_price, Money, from: "GiftWrapPrice") # @return [Money] The tax on the gift wrap price. attribute?(:gift_wrap_tax, Money, from: "GiftWrapTax") end
- PointsGrantedDetail =
The number of Amazon Points offered with the purchase of an item, and their monetary value.
Structure.new do # @return [Money] The monetary value of the Amazon Points granted. attribute?(:points_monetary_value, Money, from: "PointsMonetaryValue") # @return [Integer] The number of Amazon Points granted with the purchase of an item. attribute?(:points_number, Integer, from: "PointsNumber") end
- RegulatedInformation =
The regulated information collected during purchase and used to verify the order.
Structure.new do # @return [Array<RegulatedInformationField>] A list of regulated information fields as collected from the # regulatory form. attribute(:fields, [RegulatedInformationField], from: "Fields") end
- BuyerRequestedCancel =
Information about whether or not a buyer requested cancellation.
Structure.new do # @return [String] The reason that the buyer requested cancellation. attribute?(:buyer_cancel_reason, String, from: "BuyerCancelReason") # @return [String] Indicate whether the buyer has requested cancellation. # # **Possible Values**: `true`, `false`. attribute?(:is_buyer_requested_cancel, String, from: "IsBuyerRequestedCancel") end
- AddressExtendedFields =
The container for address extended fields (such as
street name
andstreet number
). Currently only available with Brazil shipping addresses. Structure.new do # @return [String] The floor number/unit number in the building/private house number. attribute?(:complement, String, from: "Complement") # @return [String] The neighborhood. This value is only used in some countries (such as Brazil). attribute?(:neighborhood, String, from: "Neighborhood") # @return [String] The street name. 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
- FulfillmentInstruction =
Contains the instructions about the fulfillment, such as the location from where you want the order filled.
Structure.new do # @return [String] The `sourceId` of the location from where you want the order fulfilled. attribute?(:fulfillment_supply_source_id, String, from: "FulfillmentSupplySourceId") end
- PreferredDeliveryTime =
The time window when the delivery is preferred.
Structure.new do # @return [Array<BusinessHours>] Business hours when the business is open for deliveries. attribute?(:business_hours, [BusinessHours], from: "BusinessHours") # @return [Array<ExceptionDates>] Dates when the business is closed during the next 30 days. attribute?(:exception_dates, [ExceptionDates], from: "ExceptionDates") end
- ConfirmShipmentRequest =
The request schema for an shipment confirmation.
Structure.new do # @return [String] attribute(:marketplace_id, String, from: "marketplaceId") # @return [PackageDetail] attribute(:package_detail, PackageDetail, from: "packageDetail") # @return [String] The COD collection method (only supported in the JP marketplace). attribute?(:cod_collection_method, String, from: "codCollectionMethod") end
- GetOrderItemsResponse =
The response schema for the
getOrderItems
operation. Structure.new do # @return [Array<Error>] One or more unexpected errors occurred during the `getOrderItems` operation. attribute?(:errors, [Error]) # @return [OrderItemsList] The payload for the `getOrderItems` operation. attribute?(:payload, OrderItemsList) end
- SubstitutionPreferences =
Substitution preferences for an order item.
Structure.new do # @return [String] The type of substitution that these preferences represent. attribute(:substitution_type, String, from: "SubstitutionType") # @return [Array<SubstitutionOption>] Substitution options for the order item. attribute?(:substitution_options, [SubstitutionOption], from: "SubstitutionOptions") end
- ValidVerificationDetail =
The types of verification details that may be provided for the order and the criteria required for when the type of verification detail can be provided. The types of verification details allowed depend on the type of regulated product and will not change order to order.
Structure.new do # @return [Array<VerificationStatus>] A list of valid verification statuses where the associated verification # detail type may be provided. For example, if the value of this field is ["Approved"], calls to provide the # associated verification detail will fail for orders with a `VerificationStatus` of `Pending`, `Rejected`, # `Expired`, or `Cancelled`. attribute(:valid_verification_statuses, Array, from: "ValidVerificationStatuses") # @return [String] A supported type of verification detail. The type indicates which verification detail could # be shared while updating the regulated order. Valid value: `prescriptionDetail`. attribute(:verification_detail_type, String, from: "VerificationDetailType") end
- GetOrderAddressResponse =
The response schema for the
getOrderAddress
operation. Structure.new do # @return [Array<Error>] One or more unexpected errors occurred during the `getOrderAddress` operation. attribute?(:errors, [Error]) # @return [OrderAddress] The payload for the `getOrderAddress` operations. attribute?(:payload, OrderAddress) end
- AutomatedShippingSettings =
Contains information regarding the Shipping Settings Automation program, such as whether the order's shipping settings were generated automatically, and what those settings are.
Structure.new do # @return [String] Auto-generated carrier for SSA orders. attribute?(:automated_carrier, String, from: "AutomatedCarrier") # @return [String] Auto-generated ship method for SSA orders. attribute?(:automated_ship_method, String, from: "AutomatedShipMethod") # @return [:boolean] When true, this order has automated shipping settings generated by Amazon. This order could # be identified as an SSA order. attribute?(:has_automated_shipping_settings, :boolean, from: "HasAutomatedShippingSettings") end
- ConfirmShipmentOrderItem =
A single order item.
Structure.new do # @return [String] The order item's unique identifier. attribute(:order_item_id, String, from: "orderItemId") # @return [Integer] The item's quantity. attribute(:quantity, Integer) # @return [Array<TransparencyCode>] The list of transparency codes. attribute?(:transparency_codes, Array, from: "transparencyCodes") end
- OrderItemsBuyerInfoList =
A single order item's buyer information list with the order ID.
Structure.new do # @return [String] An Amazon-defined order identifier, in 3-7-7 format. attribute(:amazon_order_id, String, from: "AmazonOrderId") # @return [Array<OrderItemBuyerInfo>] attribute(:order_items, [OrderItemBuyerInfo], from: "OrderItems") # @return [String] When present and not empty, pass this string token in the next request to return the next # response page. attribute?(:next_token, String, from: "NextToken") end
- RegulatedInformationField =
A field collected from the regulatory form.
Structure.new do # @return [String] The unique identifier of the field. attribute(:field_id, String, from: "FieldId") # @return [String] The name of the field. attribute(:field_label, String, from: "FieldLabel") # @return [String] The type of field. attribute(:field_type, String, from: "FieldType") # @return [String] The content of the field as collected in regulatory form. Note that `FileAttachment` type # fields contain a URL where you can download the attachment. attribute(:field_value, String, from: "FieldValue") end
- BuyerCustomizedInfoDetail =
Buyer information for custom orders from the Amazon Custom program.
Structure.new do # @return [String] The location of a ZIP file containing Amazon Custom data. attribute?(:customized_url, String, from: "CustomizedURL") end
- GetOrderBuyerInfoResponse =
The response schema for the
getOrderBuyerInfo
operation. Structure.new do # @return [Array<Error>] One or more unexpected errors occurred during the `getOrderBuyerInfo` operation. attribute?(:errors, [Error]) # @return [OrderBuyerInfo] The payload for the `getOrderBuyerInfo` operation. attribute?(:payload, OrderBuyerInfo) end
- PaymentExecutionDetailItem =
Information about a sub-payment method used to pay for a COD order.
Structure.new do # @return [Money] attribute(:payment, Money, from: "Payment") # @return [String] The sub-payment method for an order. # # **Possible values**: # * `COD`: Cash on delivery # * `GC`: Gift card # * `PointsAccount`: Amazon Points # * `Invoice`: Invoice # * `CreditCard`: Credit card # * `Pix`: Pix # * `Other`: Other. attribute(:payment_method, String, from: "PaymentMethod") # @return [String] The Brazilian Taxpayer Identifier (CNPJ) of the payment processor or acquiring bank that # authorizes the payment. # # **Note**: This attribute is only available for orders in the Brazil (BR) marketplace when the `PaymentMethod` # is `CreditCard` or `Pix`. attribute?(:acquirer_id, String, from: "AcquirerId") # @return [String] The unique code that confirms the payment authorization. # # **Note**: This attribute is only available for orders in the Brazil (BR) marketplace when the `PaymentMethod` # is `CreditCard` or `Pix`. attribute?(:authorization_code, String, from: "AuthorizationCode") # @return [String] The card network or brand used in the payment transaction (for example, Visa or Mastercard). # # **Note**: This attribute is only available for orders in the Brazil (BR) marketplace when the `PaymentMethod` # is `CreditCard`. attribute?(:card_brand, String, from: "CardBrand") end
- UpdateShipmentStatusRequest =
The request body for the
updateShipmentStatus
operation. Structure.new do # @return [String] attribute(:marketplace_id, String, from: "marketplaceId") # @return [String] attribute(:shipment_status, String, from: "shipmentStatus") # @return [Array<Object>] attribute?(:order_items, Array, from: "orderItems") end
- ConfirmShipmentErrorResponse =
The error response schema for the
confirmShipment
operation. Structure.new do # @return [Array<Error>] One or more unexpected errors occurred during the `confirmShipment` operation. attribute?(:errors, [Error]) end
- GetOrderRegulatedInfoResponse =
The response schema for the
getOrderRegulatedInfo
operation. Structure.new do # @return [Array<Error>] One or more unexpected errors occurred during the `getOrderRegulatedInfo` operation. attribute?(:errors, [Error]) # @return [OrderRegulatedInfo] The payload for the `getOrderRegulatedInfo` operation. attribute?(:payload, OrderRegulatedInfo) end
- UpdateVerificationStatusRequest =
The request body for the
updateVerificationStatus
operation. Structure.new do # @return [UpdateVerificationStatusRequestBody] The updated values of the `VerificationStatus` field. attribute(:regulated_order_verification_status, UpdateVerificationStatusRequestBody, from: "regulatedOrderVerificationStatus") end
- GetOrderItemsBuyerInfoResponse =
The response schema for the
getOrderItemsBuyerInfo
operation. Structure.new do # @return [Array<Error>] One or more unexpected errors occurred during the `getOrderItemsBuyerInfo` operation. attribute?(:errors, [Error]) # @return [OrderItemsBuyerInfoList] The payload for the `getOrderItemsBuyerInfo` operation. attribute?(:payload, OrderItemsBuyerInfoList) end
- RegulatedOrderVerificationStatus =
The verification status of the order, along with associated approval or rejection metadata.
Structure.new do # @return [:boolean] When true, the regulated information provided in the order requires a review by the # merchant. attribute(:requires_merchant_action, :boolean, from: "RequiresMerchantAction") # @return [String] The verification status of the order. attribute(:status, String, from: "Status") # @return [Array<RejectionReason>] A list of valid rejection reasons that may be used to reject the order's # regulated information. attribute(:valid_rejection_reasons, [RejectionReason], from: "ValidRejectionReasons") # @return [String] The identifier for the order's regulated information reviewer. attribute?(:external_reviewer_id, String, from: "ExternalReviewerId") # @return [RejectionReason] The reason for rejecting the order's regulated information. Not present if the order # isn't rejected. attribute?(:rejection_reason, RejectionReason, from: "RejectionReason") # @return [String] The date the order was reviewed. In [ISO # 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date time format. attribute?(:review_date, String, from: "ReviewDate") # @return [Array<ValidVerificationDetail>] A list of valid verification details that may be provided and the # criteria required for when the verification detail can be provided. attribute?(:valid_verification_details, [ValidVerificationDetail], from: "ValidVerificationDetails") end
- UpdateShipmentStatusErrorResponse =
The error response schema for the
UpdateShipmentStatus
operation. Structure.new do # @return [Array<Error>] One or more unexpected errors occurred during the `UpdateShipmentStatus` operation. attribute?(:errors, [Error]) end
- UpdateVerificationStatusRequestBody =
The updated values of the
VerificationStatus
field. Structure.new do # @return [String] The identifier of the order's regulated information reviewer. attribute(:external_reviewer_id, String, from: "externalReviewerId") # @return [String] The unique identifier of the rejection reason used for rejecting the order's regulated # information. Only required if the new status is rejected. attribute?(:rejection_reason_id, String, from: "rejectionReasonId") # @return [String] The new verification status of the order. attribute?(:status, String) # @return [VerificationDetails] Additional information regarding the verification of the order. attribute?(:verification_details, VerificationDetails, from: "verificationDetails") end
- UpdateVerificationStatusErrorResponse =
The error response schema for the
UpdateVerificationStatus
operation. Structure.new do # @return [Array<Error>] One or more unexpected errors occurred during the `UpdateVerificationStatus` operation. attribute?(:errors, [Error]) end
Instance Attribute Summary
Attributes inherited from Peddler::API
#access_token, #endpoint, #retries
Instance Method Summary collapse
-
#confirm_shipment(order_id, payload, rate_limit: 2.0) ⇒ Peddler::Response
Updates the shipment confirmation status for a specified order.
-
#get_order(order_id, rate_limit: 0.5) ⇒ Peddler::Response
Returns the order that you specify.
-
#get_order_address(order_id, rate_limit: 0.5) ⇒ Peddler::Response
Returns the shipping address for the order that you specify.
-
#get_order_buyer_info(order_id, rate_limit: 0.5) ⇒ Peddler::Response
Returns buyer information for the order that you specify.
-
#get_order_items(order_id, next_token: nil, rate_limit: 0.5) ⇒ Peddler::Response
Returns detailed order item information for the order that you specify.
-
#get_order_items_buyer_info(order_id, next_token: nil, rate_limit: 0.5) ⇒ Peddler::Response
Returns buyer information for the order items in the order that you specify.
-
#get_order_regulated_info(order_id, rate_limit: 0.5) ⇒ Peddler::Response
Returns regulated information for the order that you specify.
-
#get_orders(marketplace_ids, created_after: nil, created_before: nil, last_updated_after: nil, last_updated_before: nil, order_statuses: nil, fulfillment_channels: nil, payment_methods: nil, buyer_email: nil, seller_order_id: nil, max_results_per_page: nil, easy_ship_shipment_statuses: nil, electronic_invoice_statuses: nil, next_token: nil, amazon_order_ids: nil, actual_fulfillment_supply_source_id: nil, is_ispu: nil, store_chain_store_id: nil, earliest_delivery_date_before: nil, earliest_delivery_date_after: nil, latest_delivery_date_before: nil, latest_delivery_date_after: nil, rate_limit: 0.0167) ⇒ Peddler::Response
Returns orders that are created or updated during the specified time period.
-
#update_shipment_status(order_id, payload, rate_limit: 5.0) ⇒ Peddler::Response
Update the shipment status for an order that you specify.
-
#update_verification_status(order_id, payload, rate_limit: 0.5) ⇒ Peddler::Response
Updates (approves or rejects) the verification status of an order containing regulated products.
Methods inherited from Peddler::API
#endpoint_uri, #http, #initialize, #meter, #retriable, #sandbox, #sandbox?, #use, #via
Constructor Details
This class inherits a constructor from Peddler::API
Instance Method Details
#confirm_shipment(order_id, payload, rate_limit: 2.0) ⇒ Peddler::Response
This operation can make a static sandbox call.
Updates the shipment confirmation status for a specified order.
269 270 271 272 273 |
# File 'lib/peddler/apis/orders_v0.rb', line 269 def confirm_shipment(order_id, payload, rate_limit: 2.0) path = "/orders/v0/orders/#{percent_encode(order_id)}/shipmentConfirmation" body = payload meter(rate_limit).post(path, body:) end |
#get_order(order_id, rate_limit: 0.5) ⇒ Peddler::Response
This operation can make a static sandbox call.
Returns the order that you specify.
154 155 156 157 158 |
# File 'lib/peddler/apis/orders_v0.rb', line 154 def get_order(order_id, rate_limit: 0.5) path = "/orders/v0/orders/#{percent_encode(order_id)}" parser = -> { GetOrderResponse } meter(rate_limit).get(path, parser:) end |
#get_order_address(order_id, rate_limit: 0.5) ⇒ Peddler::Response
This operation can make a static sandbox call.
Returns the shipping address for the order that you specify.
178 179 180 181 182 |
# File 'lib/peddler/apis/orders_v0.rb', line 178 def get_order_address(order_id, rate_limit: 0.5) path = "/orders/v0/orders/#{percent_encode(order_id)}/address" parser = -> { GetOrderAddressResponse } meter(rate_limit).get(path, parser:) end |
#get_order_buyer_info(order_id, rate_limit: 0.5) ⇒ Peddler::Response
This operation can make a static sandbox call.
Returns buyer information for the order that you specify.
166 167 168 169 170 |
# File 'lib/peddler/apis/orders_v0.rb', line 166 def get_order_buyer_info(order_id, rate_limit: 0.5) path = "/orders/v0/orders/#{percent_encode(order_id)}/buyerInfo" parser = -> { GetOrderBuyerInfoResponse } meter(rate_limit).get(path, parser:) end |
#get_order_items(order_id, next_token: nil, rate_limit: 0.5) ⇒ Peddler::Response
This operation can make a static sandbox call.
Returns detailed order item information for the order that you specify. If NextToken
is provided, it's used to
retrieve the next page of order items.
Note: When an order is in the Pending state (the order has been placed but payment has not been authorized), the getOrderItems operation does not return information about pricing, taxes, shipping charges, gift status or promotions for the order items in the order. After an order leaves the Pending state (this occurs when payment has been authorized) and enters the Unshipped, Partially Shipped, or Shipped state, the getOrderItems operation returns information about pricing, taxes, shipping charges, gift status and promotions for the order items in the order.
199 200 201 202 203 204 205 206 |
# File 'lib/peddler/apis/orders_v0.rb', line 199 def get_order_items(order_id, next_token: nil, rate_limit: 0.5) path = "/orders/v0/orders/#{percent_encode(order_id)}/orderItems" params = { "NextToken" => next_token, }.compact parser = -> { GetOrderItemsResponse } meter(rate_limit).get(path, params:, parser:) end |
#get_order_items_buyer_info(order_id, next_token: nil, rate_limit: 0.5) ⇒ Peddler::Response
This operation can make a static sandbox call.
Returns buyer information for the order items in the order that you specify.
215 216 217 218 219 220 221 222 |
# File 'lib/peddler/apis/orders_v0.rb', line 215 def get_order_items_buyer_info(order_id, next_token: nil, rate_limit: 0.5) path = "/orders/v0/orders/#{percent_encode(order_id)}/orderItems/buyerInfo" params = { "NextToken" => next_token, }.compact parser = -> { GetOrderItemsBuyerInfoResponse } meter(rate_limit).get(path, params:, parser:) end |
#get_order_regulated_info(order_id, rate_limit: 0.5) ⇒ Peddler::Response
This operation can make a static sandbox call.
Returns regulated information for the order that you specify.
243 244 245 246 247 |
# File 'lib/peddler/apis/orders_v0.rb', line 243 def get_order_regulated_info(order_id, rate_limit: 0.5) path = "/orders/v0/orders/#{percent_encode(order_id)}/regulatedInfo" parser = -> { GetOrderRegulatedInfoResponse } meter(rate_limit).get(path, parser:) end |
#get_orders(marketplace_ids, created_after: nil, created_before: nil, last_updated_after: nil, last_updated_before: nil, order_statuses: nil, fulfillment_channels: nil, payment_methods: nil, buyer_email: nil, seller_order_id: nil, max_results_per_page: nil, easy_ship_shipment_statuses: nil, electronic_invoice_statuses: nil, next_token: nil, amazon_order_ids: nil, actual_fulfillment_supply_source_id: nil, is_ispu: nil, store_chain_store_id: nil, earliest_delivery_date_before: nil, earliest_delivery_date_after: nil, latest_delivery_date_before: nil, latest_delivery_date_after: nil, rate_limit: 0.0167) ⇒ Peddler::Response
This operation can make a static sandbox call.
Returns orders that are created or updated during the specified time period. If you want to return specific
types of orders, you can apply filters to your request. NextToken
doesn't affect any filters that you include
in your request; it only impacts the pagination for the filtered orders response.
placed after the specified time are returned. The date must be in ISO
8601 format. Note: Either the CreatedAfter
parameter or the LastUpdatedAfter
parameter is required. Both cannot be empty. LastUpdatedAfter
and
LastUpdatedBefore
cannot be set when CreatedAfter
is set.
orders placed before the specified time are returned. The date must be in ISO
8601 format. Note: CreatedBefore
is optional when
CreatedAfter
is set. If specified, CreatedBefore
must be equal to or after the CreatedAfter
date and at
least two minutes before current time.
specified time. An update is defined as any change in order status, including the creation of a new order.
Includes updates made by Amazon and by the seller. The date must be in ISO
8601 format. Note: Either the CreatedAfter
parameter or the LastUpdatedAfter
parameter is required. Both cannot be empty. CreatedAfter
or
CreatedBefore
cannot be set when LastUpdatedAfter
is set.
specified time. An update is defined as any change in order status, including the creation of a new order.
Includes updates made by Amazon and by the seller. The date must be in ISO
8601 format. Note: LastUpdatedBefore
is optional
when LastUpdatedAfter
is set. But if specified, LastUpdatedBefore
must be equal to or after the
LastUpdatedAfter
date and at least two minutes before current time.
values:** - PendingAvailability
(This status is available for pre-orders only. The order has been placed,
payment has not been authorized, and the release date of the item is in the future.) - Pending
(The order has
been placed but payment has not been authorized.) - Unshipped
(Payment has been authorized and the order is
ready for shipment, but no items in the order have been shipped.) - PartiallyShipped
(One or more, but not
all, items in the order have been shipped.) - Shipped
(All items in the order have been shipped.) -
InvoiceUnconfirmed
(All items in the order have been shipped. The seller has not yet given confirmation to
Amazon that the invoice has been shipped to the buyer.) - Canceled
(The order has been canceled.) -
Unfulfillable
(The order cannot be fulfilled. This state applies only to Multi-Channel Fulfillment orders.)
in the specified marketplaces. Refer to Marketplace
IDs for a complete list of marketplaceId
values.
results by fulfillment channel. Possible values: AFN
(fulfilled by Amazon), MFN
(fulfilled by seller).
were paid with the specified payment methods. Possible values: COD
(cash on delivery), CVS
(convenience
store), Other
(Any payment method other than COD or CVS).
address.
orders that match the order identifier. If SellerOrderId
is specified, then FulfillmentChannels
,
OrderStatuses
, PaymentMethod
, LastUpdatedAfter
, LastUpdatedBefore, and BuyerEmail
cannot be specified.
per page. Value must be 1 - 100. Default 100.
Easy Ship orders with statuses that match the specified values. If EasyShipShipmentStatus
is specified, only
Amazon Easy Ship orders are returned. Possible values: - PendingSchedule
(The package is awaiting the
schedule for pick-up.) - PendingPickUp
(Amazon has not yet picked up the package from the seller.) -
PendingDropOff
(The seller will deliver the package to the carrier.) - LabelCanceled
(The seller canceled
the pickup.) - PickedUp
(Amazon has picked up the package from the seller.) - DroppedOff
(The package is
delivered to the carrier by the seller.) - AtOriginFC
(The packaged is at the origin fulfillment center.) -
AtDestinationFC
(The package is at the destination fulfillment center.) - Delivered
(The package has been
delivered.) - RejectedByBuyer
(The package has been rejected by the buyer.) - Undeliverable
(The package
cannot be delivered.) - ReturningToSeller
(The package was not delivered and is being returned to the seller.)
ReturnedToSeller
(The package was not delivered and was returned to the seller.) -Lost
(The package is lost.) -OutForDelivery
(The package is out for delivery.) -Damaged
(The package was damaged by the carrier.) orders with electronic invoice statuses that match the specified values. Possible values: -NotRequired
(Electronic invoice submission is not required for this order.) -NotFound
(The electronic invoice was not submitted for this order.) -Processing
(The electronic invoice is being processed for this order.) -Errored
(The last submitted electronic invoice was rejected for this order.) -Accepted
(The last submitted electronic invoice was submitted and accepted.) Amazon-defined order identifier, in 3-7-7 format. fulfilled. chain. before (or at) a specified time. The date must be in ISO 8601 format. (or at) a specified time. The date must be in ISO 8601 format. (or at) a specified time. The date must be in ISO 8601 format. at) a specified time. The date must be in ISO 8601 format.
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 |
# File 'lib/peddler/apis/orders_v0.rb', line 112 def get_orders(marketplace_ids, created_after: nil, created_before: nil, last_updated_after: nil, last_updated_before: nil, order_statuses: nil, fulfillment_channels: nil, payment_methods: nil, buyer_email: nil, seller_order_id: nil, max_results_per_page: nil, easy_ship_shipment_statuses: nil, electronic_invoice_statuses: nil, next_token: nil, amazon_order_ids: nil, actual_fulfillment_supply_source_id: nil, is_ispu: nil, store_chain_store_id: nil, earliest_delivery_date_before: nil, earliest_delivery_date_after: nil, latest_delivery_date_before: nil, latest_delivery_date_after: nil, rate_limit: 0.0167) path = "/orders/v0/orders" params = { "CreatedAfter" => created_after, "CreatedBefore" => created_before, "LastUpdatedAfter" => last_updated_after, "LastUpdatedBefore" => last_updated_before, "OrderStatuses" => stringify_array(order_statuses), "MarketplaceIds" => stringify_array(marketplace_ids), "FulfillmentChannels" => stringify_array(fulfillment_channels), "PaymentMethods" => stringify_array(payment_methods), "BuyerEmail" => buyer_email, "SellerOrderId" => seller_order_id, "MaxResultsPerPage" => max_results_per_page, "EasyShipShipmentStatuses" => stringify_array(easy_ship_shipment_statuses), "ElectronicInvoiceStatuses" => stringify_array(electronic_invoice_statuses), "NextToken" => next_token, "AmazonOrderIds" => stringify_array(amazon_order_ids), "ActualFulfillmentSupplySourceId" => actual_fulfillment_supply_source_id, "IsISPU" => is_ispu, "StoreChainStoreId" => store_chain_store_id, "EarliestDeliveryDateBefore" => earliest_delivery_date_before, "EarliestDeliveryDateAfter" => earliest_delivery_date_after, "LatestDeliveryDateBefore" => latest_delivery_date_before, "LatestDeliveryDateAfter" => latest_delivery_date_after, }.compact parser = -> { GetOrdersResponse } meter(rate_limit).get(path, params:, parser:) end |
#update_shipment_status(order_id, payload, rate_limit: 5.0) ⇒ Peddler::Response
This operation can make a static sandbox call.
Update the shipment status for an order that you specify.
231 232 233 234 235 |
# File 'lib/peddler/apis/orders_v0.rb', line 231 def update_shipment_status(order_id, payload, rate_limit: 5.0) path = "/orders/v0/orders/#{percent_encode(order_id)}/shipment" body = payload meter(rate_limit).post(path, body:) end |
#update_verification_status(order_id, payload, rate_limit: 0.5) ⇒ Peddler::Response
This operation can make a static sandbox call.
Updates (approves or rejects) the verification status of an order containing regulated products.
256 257 258 259 260 |
# File 'lib/peddler/apis/orders_v0.rb', line 256 def update_verification_status(order_id, payload, rate_limit: 0.5) path = "/orders/v0/orders/#{percent_encode(order_id)}/regulatedInfo" body = payload meter(rate_limit).patch(path, body:) end |