Class: Peddler::APIs::ExternalFulfillmentShipments20240911
- Inherits:
-
Peddler::API
- Object
- Peddler::API
- Peddler::APIs::ExternalFulfillmentShipments20240911
- Defined in:
- lib/peddler/apis/external_fulfillment_shipments_2024_09_11.rb,
lib/peddler/apis/external_fulfillment_shipments_2024_09_11/tax.rb,
lib/peddler/apis/external_fulfillment_shipments_2024_09_11/error.rb,
lib/peddler/apis/external_fulfillment_shipments_2024_09_11/amount.rb,
lib/peddler/apis/external_fulfillment_shipments_2024_09_11/charge.rb,
lib/peddler/apis/external_fulfillment_shipments_2024_09_11/weight.rb,
lib/peddler/apis/external_fulfillment_shipments_2024_09_11/address.rb,
lib/peddler/apis/external_fulfillment_shipments_2024_09_11/charges.rb,
lib/peddler/apis/external_fulfillment_shipments_2024_09_11/package.rb,
lib/peddler/apis/external_fulfillment_shipments_2024_09_11/distance.rb,
lib/peddler/apis/external_fulfillment_shipments_2024_09_11/document.rb,
lib/peddler/apis/external_fulfillment_shipments_2024_09_11/geocodes.rb,
lib/peddler/apis/external_fulfillment_shipments_2024_09_11/packages.rb,
lib/peddler/apis/external_fulfillment_shipments_2024_09_11/shipment.rb,
lib/peddler/apis/external_fulfillment_shipments_2024_09_11/dimension.rb,
lib/peddler/apis/external_fulfillment_shipments_2024_09_11/line_item.rb,
lib/peddler/apis/external_fulfillment_shipments_2024_09_11/error_list.rb,
lib/peddler/apis/external_fulfillment_shipments_2024_09_11/pagination.rb,
lib/peddler/apis/external_fulfillment_shipments_2024_09_11/document_v2.rb,
lib/peddler/apis/external_fulfillment_shipments_2024_09_11/time_window.rb,
lib/peddler/apis/external_fulfillment_shipments_2024_09_11/cancellation.rb,
lib/peddler/apis/external_fulfillment_shipments_2024_09_11/invoice_info.rb,
lib/peddler/apis/external_fulfillment_shipments_2024_09_11/cancellations.rb,
lib/peddler/apis/external_fulfillment_shipments_2024_09_11/shipment_info.rb,
lib/peddler/apis/external_fulfillment_shipments_2024_09_11/shipping_info.rb,
lib/peddler/apis/external_fulfillment_shipments_2024_09_11/charge_breakup.rb,
lib/peddler/apis/external_fulfillment_shipments_2024_09_11/gift_attributes.rb,
lib/peddler/apis/external_fulfillment_shipments_2024_09_11/custom_attribute.rb,
lib/peddler/apis/external_fulfillment_shipments_2024_09_11/invoice_response.rb,
lib/peddler/apis/external_fulfillment_shipments_2024_09_11/shipping_options.rb,
lib/peddler/apis/external_fulfillment_shipments_2024_09_11/handover_location.rb,
lib/peddler/apis/external_fulfillment_shipments_2024_09_11/package_line_item.rb,
lib/peddler/apis/external_fulfillment_shipments_2024_09_11/ship_labels_input.rb,
lib/peddler/apis/external_fulfillment_shipments_2024_09_11/original_line_item.rb,
lib/peddler/apis/external_fulfillment_shipments_2024_09_11/package_dimensions.rb,
lib/peddler/apis/external_fulfillment_shipments_2024_09_11/package_line_items.rb,
lib/peddler/apis/external_fulfillment_shipments_2024_09_11/package_ship_label.rb,
lib/peddler/apis/external_fulfillment_shipments_2024_09_11/shipment_line_item.rb,
lib/peddler/apis/external_fulfillment_shipments_2024_09_11/shipments_response.rb,
lib/peddler/apis/external_fulfillment_shipments_2024_09_11/invoice_requirement.rb,
lib/peddler/apis/external_fulfillment_shipments_2024_09_11/original_line_items.rb,
lib/peddler/apis/external_fulfillment_shipments_2024_09_11/recommended_package.rb,
lib/peddler/apis/external_fulfillment_shipments_2024_09_11/ship_label_metadata.rb,
lib/peddler/apis/external_fulfillment_shipments_2024_09_11/recommended_packages.rb,
lib/peddler/apis/external_fulfillment_shipments_2024_09_11/ship_labels_response.rb,
lib/peddler/apis/external_fulfillment_shipments_2024_09_11/compliance_attributes.rb,
lib/peddler/apis/external_fulfillment_shipments_2024_09_11/line_item_with_reason.rb,
lib/peddler/apis/external_fulfillment_shipments_2024_09_11/shipment_requirements.rb,
lib/peddler/apis/external_fulfillment_shipments_2024_09_11/tax_registration_info.rb,
lib/peddler/apis/external_fulfillment_shipments_2024_09_11/marketplace_attributes.rb,
lib/peddler/apis/external_fulfillment_shipments_2024_09_11/replaced_shipment_info.rb,
lib/peddler/apis/external_fulfillment_shipments_2024_09_11/package_delivery_status.rb,
lib/peddler/apis/external_fulfillment_shipments_2024_09_11/package_ship_label_list.rb,
lib/peddler/apis/external_fulfillment_shipments_2024_09_11/custom_channel_attribute.rb,
lib/peddler/apis/external_fulfillment_shipments_2024_09_11/packing_slip_requirement.rb,
lib/peddler/apis/external_fulfillment_shipments_2024_09_11/party_identification_info.rb,
lib/peddler/apis/external_fulfillment_shipments_2024_09_11/shipping_options_response.rb,
lib/peddler/apis/external_fulfillment_shipments_2024_09_11/courier_supported_attributes.rb,
lib/peddler/apis/external_fulfillment_shipments_2024_09_11/recommended_package_line_item.rb,
lib/peddler/apis/external_fulfillment_shipments_2024_09_11/party_identification_info_list.rb,
lib/peddler/apis/external_fulfillment_shipments_2024_09_11/recommended_package_line_items.rb,
lib/peddler/apis/external_fulfillment_shipments_2024_09_11/shipment_acknowledgement_request.rb,
sig/peddler/apis/external_fulfillment_shipments_2024_09_11.rbs
Overview
The Selling Partner API for Amazon External Fulfillment Shipments Processing
You can use the External Fulfillment Shipments API to retrieve, manage, and track shipments processed through Amazon's external fulfillment network. Use this API to get shipment details, monitor status changes, and access fulfillment requirements.
Defined Under Namespace
Classes: Address, Amount, Cancellation, Cancellations, Charge, ChargeBreakup, Charges, ComplianceAttributes, CourierSupportedAttributes, CustomAttribute, CustomChannelAttribute, Dimension, Distance, Document, DocumentV2, Error, ErrorList, Geocodes, GiftAttributes, HandoverLocation, InvoiceInfo, InvoiceRequirement, InvoiceResponse, LineItem, LineItemWithReason, MarketplaceAttributes, OriginalLineItem, OriginalLineItems, Package, PackageDeliveryStatus, PackageDimensions, PackageLineItem, PackageLineItems, PackageShipLabel, PackageShipLabelList, Packages, PackingSlipRequirement, Pagination, PartyIdentificationInfo, PartyIdentificationInfoList, RecommendedPackage, RecommendedPackageLineItem, RecommendedPackageLineItems, RecommendedPackages, ReplacedShipmentInfo, ShipLabelMetadata, ShipLabelsInput, ShipLabelsResponse, Shipment, ShipmentAcknowledgementRequest, ShipmentInfo, ShipmentLineItem, ShipmentRequirements, ShipmentsResponse, ShippingInfo, ShippingOptions, ShippingOptionsResponse, Tax, TaxRegistrationInfo, TimeWindow, Weight
Instance Attribute Summary
Attributes inherited from Peddler::API
#access_token, #endpoint, #retries
Instance Method Summary collapse
-
#create_packages(shipment_id, body) ⇒ Peddler::Response
Provide details about the packages in the specified shipment.
-
#generate_invoice(shipment_id) ⇒ Peddler::Response
Get invoices for the shipment you specify.
-
#generate_ship_labels(shipment_id, operation, shipping_option_id: nil, body: nil) ⇒ Peddler::Response
Generate and retrieve all shipping labels for one or more packages in the shipment you specify.
-
#get_shipment(shipment_id) ⇒ Peddler::Response
Get a single shipment with the ID you specify.
-
#get_shipments(status, location_id: nil, marketplace_id: nil, channel_name: nil, last_updated_after: nil, last_updated_before: nil, max_results: nil, pagination_token: nil) ⇒ Peddler::Response
Get a list of shipments created for the seller in the status you specify.
-
#process_shipment(shipment_id, operation, body: nil) ⇒ Peddler::Response
Confirm or reject the specified shipment.
-
#retrieve_invoice(shipment_id) ⇒ Peddler::Response
Retrieve invoices for the shipment you specify.
-
#retrieve_shipping_options(shipment_id, package_id) ⇒ Peddler::Response
Get a list of shipping options for a package in a shipment given the shipment's marketplace and channel.
-
#update_package(shipment_id, package_id, body) ⇒ Peddler::Response
Updates the details about the packages that will be used to fulfill the specified shipment.
-
#update_package_status(shipment_id, package_id, status: nil, body: nil) ⇒ Peddler::Response
Updates the status of the packages.
Methods inherited from Peddler::API
#cannot_sandbox!, #delete, #endpoint_uri, #get, #http, #initialize, #must_sandbox!, #patch, #percent_encode, #post, #put, #request, #sandbox, #sandbox?, #stringify_array, #timestamp, #user_agent
Constructor Details
This class inherits a constructor from Peddler::API
Instance Method Details
#create_packages(shipment_id, body) ⇒ Peddler::Response
This operation can make a static sandbox call.
Provide details about the packages in the specified shipment.
84 85 86 87 |
# File 'lib/peddler/apis/external_fulfillment_shipments_2024_09_11.rb', line 84 def create_packages(shipment_id, body) path = "/externalFulfillment/2024-09-11/shipments/#{percent_encode(shipment_id)}/packages" post(path, body:) end |
#generate_invoice(shipment_id) ⇒ Peddler::Response
This operation can make a static sandbox call.
Get invoices for the shipment you specify.
138 139 140 141 142 |
# File 'lib/peddler/apis/external_fulfillment_shipments_2024_09_11.rb', line 138 def generate_invoice(shipment_id) path = "/externalFulfillment/2024-09-11/shipments/#{percent_encode(shipment_id)}/invoice" parser = -> { InvoiceResponse } post(path, parser:) end |
#generate_ship_labels(shipment_id, operation, shipping_option_id: nil, body: nil) ⇒ Peddler::Response
This operation can make a static sandbox call.
Generate and retrieve all shipping labels for one or more packages in the shipment you specify.
163 164 165 166 167 168 169 170 171 |
# File 'lib/peddler/apis/external_fulfillment_shipments_2024_09_11.rb', line 163 def generate_ship_labels(shipment_id, operation, shipping_option_id: nil, body: nil) path = "/externalFulfillment/2024-09-11/shipments/#{percent_encode(shipment_id)}/shipLabels" params = { "shippingOptionId" => shipping_option_id, "operation" => operation, }.compact parser = -> { ShipLabelsResponse } put(path, body:, params:, parser:) end |
#get_shipment(shipment_id) ⇒ Peddler::Response
This operation can make a static sandbox call.
Get a single shipment with the ID you specify.
57 58 59 60 61 |
# File 'lib/peddler/apis/external_fulfillment_shipments_2024_09_11.rb', line 57 def get_shipment(shipment_id) path = "/externalFulfillment/2024-09-11/shipments/#{percent_encode(shipment_id)}" parser = -> { Shipment } get(path, parser:) end |
#get_shipments(status, location_id: nil, marketplace_id: nil, channel_name: nil, last_updated_after: nil, last_updated_before: nil, max_results: nil, pagination_token: nil) ⇒ Peddler::Response
This operation can make a static sandbox call.
Get a list of shipments created for the seller in the status you specify. Shipments can be further filtered based on the fulfillment node or the time of the shipments' last update.
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/peddler/apis/external_fulfillment_shipments_2024_09_11.rb', line 35 def get_shipments(status, location_id: nil, marketplace_id: nil, channel_name: nil, last_updated_after: nil, last_updated_before: nil, max_results: nil, pagination_token: nil) path = "/externalFulfillment/2024-09-11/shipments" params = { "locationId" => location_id, "marketplaceId" => marketplace_id, "channelName" => channel_name, "status" => status, "lastUpdatedAfter" => last_updated_after, "lastUpdatedBefore" => last_updated_before, "maxResults" => max_results, "paginationToken" => pagination_token, }.compact parser = -> { ShipmentsResponse } get(path, params:, parser:) end |
#process_shipment(shipment_id, operation, body: nil) ⇒ Peddler::Response
This operation can make a static sandbox call.
Confirm or reject the specified shipment.
70 71 72 73 74 75 76 |
# File 'lib/peddler/apis/external_fulfillment_shipments_2024_09_11.rb', line 70 def process_shipment(shipment_id, operation, body: nil) path = "/externalFulfillment/2024-09-11/shipments/#{percent_encode(shipment_id)}" params = { "operation" => operation, }.compact post(path, body:, params:) end |
#retrieve_invoice(shipment_id) ⇒ Peddler::Response
This operation can make a static sandbox call.
Retrieve invoices for the shipment you specify.
149 150 151 152 153 |
# File 'lib/peddler/apis/external_fulfillment_shipments_2024_09_11.rb', line 149 def retrieve_invoice(shipment_id) path = "/externalFulfillment/2024-09-11/shipments/#{percent_encode(shipment_id)}/invoice" parser = -> { InvoiceResponse } get(path, parser:) end |
#retrieve_shipping_options(shipment_id, package_id) ⇒ Peddler::Response
This operation can make a static sandbox call.
Get a list of shipping options for a package in a shipment given the shipment's marketplace and channel. If the marketplace and channel have a pre-determined shipping option, then this operation returns an empty response.
124 125 126 127 128 129 130 131 |
# File 'lib/peddler/apis/external_fulfillment_shipments_2024_09_11.rb', line 124 def (shipment_id, package_id) path = "/externalFulfillment/2024-09-11/shipments/#{percent_encode(shipment_id)}/shippingOptions" params = { "packageId" => package_id, }.compact parser = -> { ShippingOptionsResponse } get(path, params:, parser:) end |
#update_package(shipment_id, package_id, body) ⇒ Peddler::Response
This operation can make a static sandbox call.
Updates the details about the packages that will be used to fulfill the specified shipment.
96 97 98 99 |
# File 'lib/peddler/apis/external_fulfillment_shipments_2024_09_11.rb', line 96 def update_package(shipment_id, package_id, body) path = "/externalFulfillment/2024-09-11/shipments/#{percent_encode(shipment_id)}/packages/#{percent_encode(package_id)}" put(path, body:) end |
#update_package_status(shipment_id, package_id, status: nil, body: nil) ⇒ Peddler::Response
This operation can make a static sandbox call.
Updates the status of the packages.
109 110 111 112 113 114 115 |
# File 'lib/peddler/apis/external_fulfillment_shipments_2024_09_11.rb', line 109 def update_package_status(shipment_id, package_id, status: nil, body: nil) path = "/externalFulfillment/2024-09-11/shipments/#{percent_encode(shipment_id)}/packages/#{percent_encode(package_id)}" params = { "status" => status, }.compact patch(path, body:, params:) end |