@scaleleap/selling-partner-api-sdk
Version:
📦 A fully typed TypeScript and Node.js SDK library for Amazon Selling Partner API
714 lines • 146 kB
JavaScript
"use strict";
/* tslint:disable */
/* eslint-disable */
/**
* Selling Partner API for Fulfillment Inbound
* The Selling Partner API for Fulfillment Inbound lets you create applications that create and update inbound shipments of inventory to Amazon\'s fulfillment network.
*
* The version of the OpenAPI document: v0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.FbaInboundApi = exports.FbaInboundApiFactory = exports.FbaInboundApiFp = exports.FbaInboundApiAxiosParamCreator = exports.UnitOfWeight = exports.UnitOfMeasurement = exports.TransportStatus = exports.ShipmentType = exports.ShipmentStatus = exports.SellerFreightClass = exports.PrepOwner = exports.PrepInstruction = exports.PrepGuidance = exports.PackageStatus = exports.LabelPrepType = exports.LabelPrepPreference = exports.IntendedBoxContentsSource = exports.InboundGuidance = exports.GuidanceReason = exports.ErrorReason = exports.CurrencyCode = exports.Condition = exports.BoxContentsSource = exports.BarcodeInstruction = void 0;
const axios_1 = __importDefault(require("axios"));
// Some imports not used depending on template conditions
// @ts-ignore
const common_1 = require("./common");
// @ts-ignore
const base_1 = require("./base");
/**
* Labeling requirements for the item. For more information about FBA labeling requirements, see the Seller Central Help for your marketplace.
* @export
* @enum {string}
*/
var BarcodeInstruction;
(function (BarcodeInstruction) {
BarcodeInstruction["RequiresFnskuLabel"] = "RequiresFNSKULabel";
BarcodeInstruction["CanUseOriginalBarcode"] = "CanUseOriginalBarcode";
BarcodeInstruction["MustProvideSellerSku"] = "MustProvideSellerSKU";
})(BarcodeInstruction || (exports.BarcodeInstruction = BarcodeInstruction = {}));
/**
* Where the seller provided box contents information for a shipment.
* @export
* @enum {string}
*/
var BoxContentsSource;
(function (BoxContentsSource) {
BoxContentsSource["None"] = "NONE";
BoxContentsSource["Feed"] = "FEED";
BoxContentsSource["_2DBarcode"] = "2D_BARCODE";
BoxContentsSource["Interactive"] = "INTERACTIVE";
})(BoxContentsSource || (exports.BoxContentsSource = BoxContentsSource = {}));
/**
* The condition of the item.
* @export
* @enum {string}
*/
var Condition;
(function (Condition) {
Condition["NewItem"] = "NewItem";
Condition["NewWithWarranty"] = "NewWithWarranty";
Condition["NewOem"] = "NewOEM";
Condition["NewOpenBox"] = "NewOpenBox";
Condition["UsedLikeNew"] = "UsedLikeNew";
Condition["UsedVeryGood"] = "UsedVeryGood";
Condition["UsedGood"] = "UsedGood";
Condition["UsedAcceptable"] = "UsedAcceptable";
Condition["UsedPoor"] = "UsedPoor";
Condition["UsedRefurbished"] = "UsedRefurbished";
Condition["CollectibleLikeNew"] = "CollectibleLikeNew";
Condition["CollectibleVeryGood"] = "CollectibleVeryGood";
Condition["CollectibleGood"] = "CollectibleGood";
Condition["CollectibleAcceptable"] = "CollectibleAcceptable";
Condition["CollectiblePoor"] = "CollectiblePoor";
Condition["RefurbishedWithWarranty"] = "RefurbishedWithWarranty";
Condition["Refurbished"] = "Refurbished";
Condition["Club"] = "Club";
})(Condition || (exports.Condition = Condition = {}));
/**
* The currency code.
* @export
* @enum {string}
*/
var CurrencyCode;
(function (CurrencyCode) {
CurrencyCode["Usd"] = "USD";
CurrencyCode["Gbp"] = "GBP";
})(CurrencyCode || (exports.CurrencyCode = CurrencyCode = {}));
/**
* The reason that the ASIN is invalid.
* @export
* @enum {string}
*/
var ErrorReason;
(function (ErrorReason) {
ErrorReason["DoesNotExist"] = "DoesNotExist";
ErrorReason["InvalidAsin"] = "InvalidASIN";
})(ErrorReason || (exports.ErrorReason = ErrorReason = {}));
/**
* A reason for the current inbound guidance for an item.
* @export
* @enum {string}
*/
var GuidanceReason;
(function (GuidanceReason) {
GuidanceReason["SlowMovingAsin"] = "SlowMovingASIN";
GuidanceReason["NoApplicableGuidance"] = "NoApplicableGuidance";
})(GuidanceReason || (exports.GuidanceReason = GuidanceReason = {}));
/**
* Specific inbound guidance for an item.
* @export
* @enum {string}
*/
var InboundGuidance;
(function (InboundGuidance) {
InboundGuidance["InboundNotRecommended"] = "InboundNotRecommended";
InboundGuidance["InboundOk"] = "InboundOK";
})(InboundGuidance || (exports.InboundGuidance = InboundGuidance = {}));
/**
* How the seller intends to provide box contents information for a shipment. Leaving this field blank is equivalent to selecting `NONE`, which will incur a fee if the seller does not provide box contents information.
* @export
* @enum {string}
*/
var IntendedBoxContentsSource;
(function (IntendedBoxContentsSource) {
IntendedBoxContentsSource["None"] = "NONE";
IntendedBoxContentsSource["Feed"] = "FEED";
IntendedBoxContentsSource["_2DBarcode"] = "2D_BARCODE";
})(IntendedBoxContentsSource || (exports.IntendedBoxContentsSource = IntendedBoxContentsSource = {}));
/**
* The preference for label preparation for an inbound shipment.
* @export
* @enum {string}
*/
var LabelPrepPreference;
(function (LabelPrepPreference) {
LabelPrepPreference["SellerLabel"] = "SELLER_LABEL";
LabelPrepPreference["AmazonLabelOnly"] = "AMAZON_LABEL_ONLY";
LabelPrepPreference["AmazonLabelPreferred"] = "AMAZON_LABEL_PREFERRED";
})(LabelPrepPreference || (exports.LabelPrepPreference = LabelPrepPreference = {}));
/**
* The type of label preparation that is required for the inbound shipment.
* @export
* @enum {string}
*/
var LabelPrepType;
(function (LabelPrepType) {
LabelPrepType["NoLabel"] = "NO_LABEL";
LabelPrepType["SellerLabel"] = "SELLER_LABEL";
LabelPrepType["AmazonLabel"] = "AMAZON_LABEL";
})(LabelPrepType || (exports.LabelPrepType = LabelPrepType = {}));
/**
* The shipment status of the package.
* @export
* @enum {string}
*/
var PackageStatus;
(function (PackageStatus) {
PackageStatus["Shipped"] = "SHIPPED";
PackageStatus["InTransit"] = "IN_TRANSIT";
PackageStatus["Delivered"] = "DELIVERED";
PackageStatus["CheckedIn"] = "CHECKED_IN";
PackageStatus["Receiving"] = "RECEIVING";
PackageStatus["Closed"] = "CLOSED";
PackageStatus["Deleted"] = "DELETED";
})(PackageStatus || (exports.PackageStatus = PackageStatus = {}));
/**
* Item preparation instructions.
* @export
* @enum {string}
*/
var PrepGuidance;
(function (PrepGuidance) {
PrepGuidance["ConsultHelpDocuments"] = "ConsultHelpDocuments";
PrepGuidance["NoAdditionalPrepRequired"] = "NoAdditionalPrepRequired";
PrepGuidance["SeePrepInstructionsList"] = "SeePrepInstructionsList";
})(PrepGuidance || (exports.PrepGuidance = PrepGuidance = {}));
/**
* Preparation instructions for shipping an item to Amazon\'s fulfillment network. For more information about preparing items for shipment to Amazon\'s fulfillment network, see the Seller Central Help for your marketplace.
* @export
* @enum {string}
*/
var PrepInstruction;
(function (PrepInstruction) {
PrepInstruction["Polybagging"] = "Polybagging";
PrepInstruction["BubbleWrapping"] = "BubbleWrapping";
PrepInstruction["Taping"] = "Taping";
PrepInstruction["BlackShrinkWrapping"] = "BlackShrinkWrapping";
PrepInstruction["Labeling"] = "Labeling";
PrepInstruction["HangGarment"] = "HangGarment";
PrepInstruction["SetCreation"] = "SetCreation";
PrepInstruction["Boxing"] = "Boxing";
PrepInstruction["RemoveFromHanger"] = "RemoveFromHanger";
PrepInstruction["Debundle"] = "Debundle";
PrepInstruction["SuffocationStickering"] = "SuffocationStickering";
PrepInstruction["CapSealing"] = "CapSealing";
PrepInstruction["SetStickering"] = "SetStickering";
PrepInstruction["BlankStickering"] = "BlankStickering";
PrepInstruction["ShipsInProductPackaging"] = "ShipsInProductPackaging";
PrepInstruction["NoPrep"] = "NoPrep";
})(PrepInstruction || (exports.PrepInstruction = PrepInstruction = {}));
/**
* Indicates who will prepare the item.
* @export
* @enum {string}
*/
var PrepOwner;
(function (PrepOwner) {
PrepOwner["Amazon"] = "AMAZON";
PrepOwner["Seller"] = "SELLER";
})(PrepOwner || (exports.PrepOwner = PrepOwner = {}));
/**
* The freight class of the shipment. For information about determining the freight class, contact the carrier.
* @export
* @enum {string}
*/
var SellerFreightClass;
(function (SellerFreightClass) {
SellerFreightClass["_50"] = "50";
SellerFreightClass["_55"] = "55";
SellerFreightClass["_60"] = "60";
SellerFreightClass["_65"] = "65";
SellerFreightClass["_70"] = "70";
SellerFreightClass["_775"] = "77.5";
SellerFreightClass["_85"] = "85";
SellerFreightClass["_925"] = "92.5";
SellerFreightClass["_100"] = "100";
SellerFreightClass["_110"] = "110";
SellerFreightClass["_125"] = "125";
SellerFreightClass["_150"] = "150";
SellerFreightClass["_175"] = "175";
SellerFreightClass["_200"] = "200";
SellerFreightClass["_250"] = "250";
SellerFreightClass["_300"] = "300";
SellerFreightClass["_400"] = "400";
SellerFreightClass["_500"] = "500";
})(SellerFreightClass || (exports.SellerFreightClass = SellerFreightClass = {}));
/**
* Indicates the status of the inbound shipment. When used with the createInboundShipment operation, WORKING is the only valid value. When used with the updateInboundShipment operation, possible values are WORKING, SHIPPED or CANCELLED.
* @export
* @enum {string}
*/
var ShipmentStatus;
(function (ShipmentStatus) {
ShipmentStatus["Working"] = "WORKING";
ShipmentStatus["Shipped"] = "SHIPPED";
ShipmentStatus["Receiving"] = "RECEIVING";
ShipmentStatus["Cancelled"] = "CANCELLED";
ShipmentStatus["Deleted"] = "DELETED";
ShipmentStatus["Closed"] = "CLOSED";
ShipmentStatus["Error"] = "ERROR";
ShipmentStatus["InTransit"] = "IN_TRANSIT";
ShipmentStatus["Delivered"] = "DELIVERED";
ShipmentStatus["CheckedIn"] = "CHECKED_IN";
})(ShipmentStatus || (exports.ShipmentStatus = ShipmentStatus = {}));
/**
* Specifies the carrier shipment type in a putTransportDetails request.
* @export
* @enum {string}
*/
var ShipmentType;
(function (ShipmentType) {
ShipmentType["Sp"] = "SP";
ShipmentType["Ltl"] = "LTL";
})(ShipmentType || (exports.ShipmentType = ShipmentType = {}));
/**
* Indicates the status of the Amazon-partnered carrier shipment.
* @export
* @enum {string}
*/
var TransportStatus;
(function (TransportStatus) {
TransportStatus["Working"] = "WORKING";
TransportStatus["Estimating"] = "ESTIMATING";
TransportStatus["Estimated"] = "ESTIMATED";
TransportStatus["ErrorOnEstimating"] = "ERROR_ON_ESTIMATING";
TransportStatus["Confirming"] = "CONFIRMING";
TransportStatus["Confirmed"] = "CONFIRMED";
TransportStatus["ErrorOnConfirming"] = "ERROR_ON_CONFIRMING";
TransportStatus["Voiding"] = "VOIDING";
TransportStatus["Voided"] = "VOIDED";
TransportStatus["ErrorInVoiding"] = "ERROR_IN_VOIDING";
TransportStatus["Error"] = "ERROR";
})(TransportStatus || (exports.TransportStatus = TransportStatus = {}));
/**
* Indicates the unit of measurement.
* @export
* @enum {string}
*/
var UnitOfMeasurement;
(function (UnitOfMeasurement) {
UnitOfMeasurement["Inches"] = "inches";
UnitOfMeasurement["Centimeters"] = "centimeters";
})(UnitOfMeasurement || (exports.UnitOfMeasurement = UnitOfMeasurement = {}));
/**
* Indicates the unit of weight.
* @export
* @enum {string}
*/
var UnitOfWeight;
(function (UnitOfWeight) {
UnitOfWeight["Pounds"] = "pounds";
UnitOfWeight["Kilograms"] = "kilograms";
})(UnitOfWeight || (exports.UnitOfWeight = UnitOfWeight = {}));
/**
* FbaInboundApi - axios parameter creator
* @export
*/
const FbaInboundApiAxiosParamCreator = function (configuration) {
return {
/**
* Returns information needed to confirm a shipment for pre-order. Call this operation after calling the getPreorderInfo operation to get the NeedByDate value and other pre-order information about the shipment. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
* @param {string} shipmentId A shipment identifier originally returned by the createInboundShipmentPlan operation.
* @param {string} needByDate Date that the shipment must arrive at the Amazon fulfillment center to avoid delivery promise breaks for pre-ordered items. Must be in YYYY-MM-DD format. The response to the getPreorderInfo operation returns this value.
* @param {string} marketplaceId A marketplace identifier. Specifies the marketplace the shipment is tied to.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
confirmPreorder: async (shipmentId, needByDate, marketplaceId, options = {}) => {
// verify required parameter 'shipmentId' is not null or undefined
(0, common_1.assertParamExists)('confirmPreorder', 'shipmentId', shipmentId);
// verify required parameter 'needByDate' is not null or undefined
(0, common_1.assertParamExists)('confirmPreorder', 'needByDate', needByDate);
// verify required parameter 'marketplaceId' is not null or undefined
(0, common_1.assertParamExists)('confirmPreorder', 'marketplaceId', marketplaceId);
const localVarPath = `/fba/inbound/v0/shipments/{shipmentId}/preorder/confirm`
.replace(`{${"shipmentId"}}`, encodeURIComponent(String(shipmentId)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options };
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
if (needByDate !== undefined) {
localVarQueryParameter['NeedByDate'] = (needByDate instanceof Date) ?
needByDate.toISOString().substr(0, 10) :
needByDate;
}
if (marketplaceId !== undefined) {
localVarQueryParameter['MarketplaceId'] = marketplaceId;
}
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter, options.query);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
return {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Confirms that the seller accepts the Amazon-partnered shipping estimate, agrees to allow Amazon to charge their account for the shipping cost, and requests that the Amazon-partnered carrier ship the inbound shipment. Prior to calling the confirmTransport operation, you should call the getTransportDetails operation to get the Amazon-partnered shipping estimate. Important: After confirming the transportation request, if the seller decides that they do not want the Amazon-partnered carrier to ship the inbound shipment, you can call the voidTransport operation to cancel the transportation request. Note that for a Small Parcel shipment, the seller has 24 hours after confirming a transportation request to void the transportation request. For a Less Than Truckload/Full Truckload (LTL/FTL) shipment, the seller has one hour after confirming a transportation request to void it. After the grace period has expired the seller\'s account will be charged for the shipping cost. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
* @param {string} shipmentId A shipment identifier originally returned by the createInboundShipmentPlan operation.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
confirmTransport: async (shipmentId, options = {}) => {
// verify required parameter 'shipmentId' is not null or undefined
(0, common_1.assertParamExists)('confirmTransport', 'shipmentId', shipmentId);
const localVarPath = `/fba/inbound/v0/shipments/{shipmentId}/transport/confirm`
.replace(`{${"shipmentId"}}`, encodeURIComponent(String(shipmentId)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter, options.query);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
return {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Returns a new inbound shipment based on the specified shipmentId that was returned by the createInboundShipmentPlan operation. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
* @param {string} shipmentId A shipment identifier originally returned by the createInboundShipmentPlan operation.
* @param {InboundShipmentRequest} body The request schema for the InboundShipmentRequest operation.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createInboundShipment: async (shipmentId, body, options = {}) => {
// verify required parameter 'shipmentId' is not null or undefined
(0, common_1.assertParamExists)('createInboundShipment', 'shipmentId', shipmentId);
// verify required parameter 'body' is not null or undefined
(0, common_1.assertParamExists)('createInboundShipment', 'body', body);
const localVarPath = `/fba/inbound/v0/shipments/{shipmentId}`
.replace(`{${"shipmentId"}}`, encodeURIComponent(String(shipmentId)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
localVarHeaderParameter['Content-Type'] = 'application/json';
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter, options.query);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration);
return {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Returns one or more inbound shipment plans, which provide the information you need to create one or more inbound shipments for a set of items that you specify. Multiple inbound shipment plans might be required so that items can be optimally placed in Amazon\'s fulfillment network—for example, positioning inventory closer to the customer. Alternatively, two inbound shipment plans might be created with the same Amazon fulfillment center destination if the two shipment plans require different processing—for example, items that require labels must be shipped separately from stickerless, commingled inventory. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
* @param {CreateInboundShipmentPlanRequest} body The request schema for the CreateInboundShipmentPlanRequest operation.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createInboundShipmentPlan: async (body, options = {}) => {
// verify required parameter 'body' is not null or undefined
(0, common_1.assertParamExists)('createInboundShipmentPlan', 'body', body);
const localVarPath = `/fba/inbound/v0/plans`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
localVarHeaderParameter['Content-Type'] = 'application/json';
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter, options.query);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration);
return {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Initiates the process of estimating the shipping cost for an inbound shipment by an Amazon-partnered carrier. Prior to calling the estimateTransport operation, you must call the putTransportDetails operation to provide Amazon with the transportation information for the inbound shipment. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
* @param {string} shipmentId A shipment identifier originally returned by the createInboundShipmentPlan operation.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
estimateTransport: async (shipmentId, options = {}) => {
// verify required parameter 'shipmentId' is not null or undefined
(0, common_1.assertParamExists)('estimateTransport', 'shipmentId', shipmentId);
const localVarPath = `/fba/inbound/v0/shipments/{shipmentId}/transport/estimate`
.replace(`{${"shipmentId"}}`, encodeURIComponent(String(shipmentId)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter, options.query);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
return {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Returns a bill of lading for a Less Than Truckload/Full Truckload (LTL/FTL) shipment. The getBillOfLading operation returns PDF document data for printing a bill of lading for an Amazon-partnered Less Than Truckload/Full Truckload (LTL/FTL) inbound shipment. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
* @param {string} shipmentId A shipment identifier originally returned by the createInboundShipmentPlan operation.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getBillOfLading: async (shipmentId, options = {}) => {
// verify required parameter 'shipmentId' is not null or undefined
(0, common_1.assertParamExists)('getBillOfLading', 'shipmentId', shipmentId);
const localVarPath = `/fba/inbound/v0/shipments/{shipmentId}/billOfLading`
.replace(`{${"shipmentId"}}`, encodeURIComponent(String(shipmentId)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter, options.query);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
return {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Returns package/pallet labels for faster and more accurate shipment processing at the Amazon fulfillment center. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
* @param {string} shipmentId A shipment identifier originally returned by the createInboundShipmentPlan operation.
* @param {'PackageLabel_Letter_2' | 'PackageLabel_Letter_4' | 'PackageLabel_Letter_6' | 'PackageLabel_Letter_6_CarrierLeft' | 'PackageLabel_A4_2' | 'PackageLabel_A4_4' | 'PackageLabel_Plain_Paper' | 'PackageLabel_Plain_Paper_CarrierBottom' | 'PackageLabel_Thermal' | 'PackageLabel_Thermal_Unified' | 'PackageLabel_Thermal_NonPCP' | 'PackageLabel_Thermal_No_Carrier_Rotation'} pageType The page type to use to print the labels. Submitting a PageType value that is not supported in your marketplace returns an error.
* @param {'BARCODE_2D' | 'UNIQUE' | 'PALLET'} labelType The type of labels requested.
* @param {number} [numberOfPackages] The number of packages in the shipment.
* @param {Array<string>} [packageLabelsToPrint] A list of identifiers that specify packages for which you want package labels printed. If you provide box content information with the [FBA Inbound Shipment Carton Information Feed](https://developer-docs.amazon.com/sp-api/docs/fulfillment-by-amazon-feed-type-values#fba-inbound-shipment-carton-information-feed), then `PackageLabelsToPrint` must match the `CartonId` values you provide through that feed. If you provide box content information with the Fulfillment Inbound API v2024-03-20, then `PackageLabelsToPrint` must match the `boxID` values from the [`listShipmentBoxes`](https://developer-docs.amazon.com/sp-api/docs/fulfillment-inbound-api-v2024-03-20-reference#listshipmentboxes) response. If these values do not match as required, the operation returns the `IncorrectPackageIdentifier` error code.
* @param {number} [numberOfPallets] The number of pallets in the shipment. This returns four identical labels for each pallet.
* @param {number} [pageSize] The page size for paginating through the total packages\' labels. This is a required parameter for Non-Partnered LTL Shipments. Max value:1000.
* @param {number} [pageStartIndex] The page start index for paginating through the total packages\' labels. This is a required parameter for Non-Partnered LTL Shipments.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getLabels: async (shipmentId, pageType, labelType, numberOfPackages, packageLabelsToPrint, numberOfPallets, pageSize, pageStartIndex, options = {}) => {
// verify required parameter 'shipmentId' is not null or undefined
(0, common_1.assertParamExists)('getLabels', 'shipmentId', shipmentId);
// verify required parameter 'pageType' is not null or undefined
(0, common_1.assertParamExists)('getLabels', 'pageType', pageType);
// verify required parameter 'labelType' is not null or undefined
(0, common_1.assertParamExists)('getLabels', 'labelType', labelType);
const localVarPath = `/fba/inbound/v0/shipments/{shipmentId}/labels`
.replace(`{${"shipmentId"}}`, encodeURIComponent(String(shipmentId)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
if (pageType !== undefined) {
localVarQueryParameter['PageType'] = pageType;
}
if (labelType !== undefined) {
localVarQueryParameter['LabelType'] = labelType;
}
if (numberOfPackages !== undefined) {
localVarQueryParameter['NumberOfPackages'] = numberOfPackages;
}
if (packageLabelsToPrint) {
localVarQueryParameter['PackageLabelsToPrint'] = packageLabelsToPrint.join(base_1.COLLECTION_FORMATS.csv);
}
if (numberOfPallets !== undefined) {
localVarQueryParameter['NumberOfPallets'] = numberOfPallets;
}
if (pageSize !== undefined) {
localVarQueryParameter['PageSize'] = pageSize;
}
if (pageStartIndex !== undefined) {
localVarQueryParameter['PageStartIndex'] = pageStartIndex;
}
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter, options.query);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
return {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Returns pre-order information, including dates, that a seller needs before confirming a shipment for pre-order. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
* @param {string} shipmentId A shipment identifier originally returned by the createInboundShipmentPlan operation.
* @param {string} marketplaceId A marketplace identifier. Specifies the marketplace the shipment is tied to.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getPreorderInfo: async (shipmentId, marketplaceId, options = {}) => {
// verify required parameter 'shipmentId' is not null or undefined
(0, common_1.assertParamExists)('getPreorderInfo', 'shipmentId', shipmentId);
// verify required parameter 'marketplaceId' is not null or undefined
(0, common_1.assertParamExists)('getPreorderInfo', 'marketplaceId', marketplaceId);
const localVarPath = `/fba/inbound/v0/shipments/{shipmentId}/preorder`
.replace(`{${"shipmentId"}}`, encodeURIComponent(String(shipmentId)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
if (marketplaceId !== undefined) {
localVarQueryParameter['MarketplaceId'] = marketplaceId;
}
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter, options.query);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
return {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Returns labeling requirements and item preparation instructions to help prepare items for shipment to Amazon\'s fulfillment network. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
* @param {string} shipToCountryCode The country code of the country to which the items will be shipped. Note that labeling requirements and item preparation instructions can vary by country.
* @param {Array<string>} [sellerSKUList] A list of SellerSKU values. Used to identify items for which you want labeling requirements and item preparation instructions for shipment to Amazon\'s fulfillment network. The SellerSKU is qualified by the Seller ID, which is included with every call to the Seller Partner API. Note: Include seller SKUs that you have used to list items on Amazon\'s retail website. If you include a seller SKU that you have never used to list an item on Amazon\'s retail website, the seller SKU is returned in the InvalidSKUList property in the response.
* @param {Array<string>} [aSINList] A list of ASIN values. Used to identify items for which you want item preparation instructions to help with item sourcing decisions. Note: ASINs must be included in the product catalog for at least one of the marketplaces that the seller participates in. Any ASIN that is not included in the product catalog for at least one of the marketplaces that the seller participates in is returned in the InvalidASINList property in the response. You can find out which marketplaces a seller participates in by calling the getMarketplaceParticipations operation in the Selling Partner API for Sellers.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getPrepInstructions: async (shipToCountryCode, sellerSKUList, aSINList, options = {}) => {
// verify required parameter 'shipToCountryCode' is not null or undefined
(0, common_1.assertParamExists)('getPrepInstructions', 'shipToCountryCode', shipToCountryCode);
const localVarPath = `/fba/inbound/v0/prepInstructions`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
if (shipToCountryCode !== undefined) {
localVarQueryParameter['ShipToCountryCode'] = shipToCountryCode;
}
if (sellerSKUList) {
localVarQueryParameter['SellerSKUList'] = sellerSKUList.join(base_1.COLLECTION_FORMATS.csv);
}
if (aSINList) {
localVarQueryParameter['ASINList'] = aSINList.join(base_1.COLLECTION_FORMATS.csv);
}
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter, options.query);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
return {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Returns a list of items in a specified inbound shipment, or a list of items that were updated within a specified time frame. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
* @param {'DATE_RANGE' | 'NEXT_TOKEN'} queryType Indicates whether items are returned using a date range (by providing the LastUpdatedAfter and LastUpdatedBefore parameters), or using NextToken, which continues returning items specified in a previous request.
* @param {string} marketplaceId A marketplace identifier. Specifies the marketplace where the product would be stored.
* @param {string} [lastUpdatedAfter] A date used for selecting inbound shipment items that were last updated after (or at) a specified time. The selection includes updates made by Amazon and by the seller.
* @param {string} [lastUpdatedBefore] A date used for selecting inbound shipment items that were last updated before (or at) a specified time. The selection includes updates made by Amazon and by the seller.
* @param {string} [nextToken] A string token returned in the response to your previous request.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getShipmentItems: async (queryType, marketplaceId, lastUpdatedAfter, lastUpdatedBefore, nextToken, options = {}) => {
// verify required parameter 'queryType' is not null or undefined
(0, common_1.assertParamExists)('getShipmentItems', 'queryType', queryType);
// verify required parameter 'marketplaceId' is not null or undefined
(0, common_1.assertParamExists)('getShipmentItems', 'marketplaceId', marketplaceId);
const localVarPath = `/fba/inbound/v0/shipmentItems`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
if (lastUpdatedAfter !== undefined) {
localVarQueryParameter['LastUpdatedAfter'] = (lastUpdatedAfter instanceof Date) ?
lastUpdatedAfter.toISOString() :
lastUpdatedAfter;
}
if (lastUpdatedBefore !== undefined) {
localVarQueryParameter['LastUpdatedBefore'] = (lastUpdatedBefore instanceof Date) ?
lastUpdatedBefore.toISOString() :
lastUpdatedBefore;
}
if (queryType !== undefined) {
localVarQueryParameter['QueryType'] = queryType;
}
if (nextToken !== undefined) {
localVarQueryParameter['NextToken'] = nextToken;
}
if (marketplaceId !== undefined) {
localVarQueryParameter['MarketplaceId'] = marketplaceId;
}
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter, options.query);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
return {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Returns a list of items in a specified inbound shipment. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
* @param {string} shipmentId A shipment identifier used for selecting items in a specific inbound shipment.
* @param {string} marketplaceId A marketplace identifier. Specifies the marketplace where the product would be stored.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getShipmentItemsByShipmentId: async (shipmentId, marketplaceId, options = {}) => {
// verify required parameter 'shipmentId' is not null or undefined
(0, common_1.assertParamExists)('getShipmentItemsByShipmentId', 'shipmentId', shipmentId);
// verify required parameter 'marketplaceId' is not null or undefined
(0, common_1.assertParamExists)('getShipmentItemsByShipmentId', 'marketplaceId', marketplaceId);
const localVarPath = `/fba/inbound/v0/shipments/{shipmentId}/items`
.replace(`{${"shipmentId"}}`, encodeURIComponent(String(shipmentId)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
if (marketplaceId !== undefined) {
localVarQueryParameter['MarketplaceId'] = marketplaceId;
}
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter, options.query);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
return {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Returns a list of inbound shipments based on criteria that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst value