@sp-api-sdk/fulfillment-inbound-api-v0
Version:
The Selling Partner API for Fulfillment Inbound lets you create applications that create and update inbound shipments of inventory to Amazon's fulfillment network.
480 lines • 58.5 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.GetShipmentsShipmentStatusListEnum = exports.GetShipmentsQueryTypeEnum = exports.GetShipmentItemsQueryTypeEnum = exports.GetLabelsLabelTypeEnum = exports.GetLabelsPageTypeEnum = exports.FbaInboundApi = exports.FbaInboundApiFactory = exports.FbaInboundApiFp = exports.FbaInboundApiAxiosParamCreator = 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");
/**
* FbaInboundApi - axios parameter creator
* @export
*/
const FbaInboundApiAxiosParamCreator = function (configuration) {
return {
/**
* 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);
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 {GetLabelsPageTypeEnum} 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 {GetLabelsLabelTypeEnum} 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);
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);
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 {GetShipmentItemsQueryTypeEnum} 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);
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] Deprecated. Do not use.
* @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);
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);
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 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 {GetShipmentsQueryTypeEnum} queryType Indicates whether shipments are returned using shipment information (by providing the ShipmentStatusList or ShipmentIdList parameters), using a date range (by providing the LastUpdatedAfter and LastUpdatedBefore parameters), or by using NextToken to continue returning items specified in a previous request.
* @param {string} marketplaceId A marketplace identifier. Specifies the marketplace where the product would be stored.
* @param {Array<GetShipmentsShipmentStatusListEnum>} [shipmentStatusList] A list of ShipmentStatus values. Used to select shipments with a current status that matches the status values that you specify.
* @param {Array<string>} [shipmentIdList] A list of shipment IDs used to select the shipments that you want. If both ShipmentStatusList and ShipmentIdList are specified, only shipments that match both parameters are returned.
* @param {string} [lastUpdatedAfter] A date used for selecting inbound shipments 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 shipments 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}
*/
getShipments: async (queryType, marketplaceId, shipmentStatusList, shipmentIdList, lastUpdatedAfter, lastUpdatedBefore, nextToken, options = {}) => {
// verify required parameter 'queryType' is not null or undefined
(0, common_1.assertParamExists)('getShipments', 'queryType', queryType);
// verify required parameter 'marketplaceId' is not null or undefined
(0, common_1.assertParamExists)('getShipments', 'marketplaceId', marketplaceId);
const localVarPath = `/fba/inbound/v0/shipments`;
// 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 (shipmentStatusList) {
localVarQueryParameter['ShipmentStatusList'] = shipmentStatusList.join(base_1.COLLECTION_FORMATS.csv);
}
if (shipmentIdList) {
localVarQueryParameter['ShipmentIdList'] = shipmentIdList.join(base_1.COLLECTION_FORMATS.csv);
}
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);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
return {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
};
},
};
};
exports.FbaInboundApiAxiosParamCreator = FbaInboundApiAxiosParamCreator;
/**
* FbaInboundApi - functional programming interface
* @export
*/
const FbaInboundApiFp = function (configuration) {
const localVarAxiosParamCreator = (0, exports.FbaInboundApiAxiosParamCreator)(configuration);
return {
/**
* 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}
*/
async getBillOfLading(shipmentId, options) {
const localVarAxiosArgs = await localVarAxiosParamCreator.getBillOfLading(shipmentId, options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = base_1.operationServerMap['FbaInboundApi.getBillOfLading']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},
/**
* 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 {GetLabelsPageTypeEnum} 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 {GetLabelsLabelTypeEnum} 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}
*/
async getLabels(shipmentId, pageType, labelType, numberOfPackages, packageLabelsToPrint, numberOfPallets, pageSize, pageStartIndex, options) {
const localVarAxiosArgs = await localVarAxiosParamCreator.getLabels(shipmentId, pageType, labelType, numberOfPackages, packageLabelsToPrint, numberOfPallets, pageSize, pageStartIndex, options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = base_1.operationServerMap['FbaInboundApi.getLabels']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},
/**
* 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}
*/
async getPrepInstructions(shipToCountryCode, sellerSKUList, aSINList, options) {
const localVarAxiosArgs = await localVarAxiosParamCreator.getPrepInstructions(shipToCountryCode, sellerSKUList, aSINList, options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = base_1.operationServerMap['FbaInboundApi.getPrepInstructions']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},
/**
* 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 {GetShipmentItemsQueryTypeEnum} 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}
*/
async getShipmentItems(queryType, marketplaceId, lastUpdatedAfter, lastUpdatedBefore, nextToken, options) {
const localVarAxiosArgs = await localVarAxiosParamCreator.getShipmentItems(queryType, marketplaceId, lastUpdatedAfter, lastUpdatedBefore, nextToken, options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = base_1.operationServerMap['FbaInboundApi.getShipmentItems']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},
/**
* 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] Deprecated. Do not use.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getShipmentItemsByShipmentId(shipmentId, marketplaceId, options) {
const localVarAxiosArgs = await localVarAxiosParamCreator.getShipmentItemsByShipmentId(shipmentId, marketplaceId, options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = base_1.operationServerMap['FbaInboundApi.getShipmentItemsByShipmentId']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},
/**
* 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 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 {GetShipmentsQueryTypeEnum} queryType Indicates whether shipments are returned using shipment information (by providing the ShipmentStatusList or ShipmentIdList parameters), using a date range (by providing the LastUpdatedAfter and LastUpdatedBefore parameters), or by using NextToken to continue returning items specified in a previous request.
* @param {string} marketplaceId A marketplace identifier. Specifies the marketplace where the product would be stored.
* @param {Array<GetShipmentsShipmentStatusListEnum>} [shipmentStatusList] A list of ShipmentStatus values. Used to select shipments with a current status that matches the status values that you specify.
* @param {Array<string>} [shipmentIdList] A list of shipment IDs used to select the shipments that you want. If both ShipmentStatusList and ShipmentIdList are specified, only shipments that match both parameters are returned.
* @param {string} [lastUpdatedAfter] A date used for selecting inbound shipments 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 shipments 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}
*/
async getShipments(queryType, marketplaceId, shipmentStatusList, shipmentIdList, lastUpdatedAfter, lastUpdatedBefore, nextToken, options) {
const localVarAxiosArgs = await localVarAxiosParamCreator.getShipments(queryType, marketplaceId, shipmentStatusList, shipmentIdList, lastUpdatedAfter, lastUpdatedBefore, nextToken, options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = base_1.operationServerMap['FbaInboundApi.getShipments']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},
};
};
exports.FbaInboundApiFp = FbaInboundApiFp;
/**
* FbaInboundApi - factory interface
* @export
*/
const FbaInboundApiFactory = function (configuration, basePath, axios) {
const localVarFp = (0, exports.FbaInboundApiFp)(configuration);
return {
/**
* 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 {FbaInboundApiGetBillOfLadingRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getBillOfLading(requestParameters, options) {
return localVarFp.getBillOfLading(requestParameters.shipmentId, options).then((request) => request(axios, basePath));
},
/**
* 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 {FbaInboundApiGetLabelsRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getLabels(requestParameters, options) {
return localVarFp.getLabels(requestParameters.shipmentId, requestParameters.pageType, requestParameters.labelType, requestParameters.numberOfPackages, requestParameters.packageLabelsToPrint, requestParameters.numberOfPallets, requestParameters.pageSize, requestParameters.pageStartIndex, options).then((request) => request(axios, basePath));
},
/**
* 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 {FbaInboundApiGetPrepInstructionsRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getPrepInstructions(requestParameters, options) {
return localVarFp.getPrepInstructions(requestParameters.shipToCountryCode, requestParameters.sellerSKUList, requestParameters.aSINList, options).then((request) => request(axios, basePath));
},
/**
* 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 {FbaInboundApiGetShipmentItemsRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getShipmentItems(requestParameters, options) {
return localVarFp.getShipmentItems(requestParameters.queryType, requestParameters.marketplaceId, requestParameters.lastUpdatedAfter, requestParameters.lastUpdatedBefore, requestParameters.nextToken, options).then((request) => request(axios, basePath));
},
/**
* 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 {FbaInboundApiGetShipmentItemsByShipmentIdRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getShipmentItemsByShipmentId(requestParameters, options) {
return localVarFp.getShipmentItemsByShipmentId(requestParameters.shipmentId, requestParameters.marketplaceId, options).then((request) => request(axios, basePath));
},
/**
* 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 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 {FbaInboundApiGetShipmentsRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getShipments(requestParameters, options) {
return localVarFp.getShipments(requestParameters.queryType, requestParameters.marketplaceId, requestParameters.shipmentStatusList, requestParameters.shipmentIdList, requestParameters.lastUpdatedAfter, requestParameters.lastUpdatedBefore, requestParameters.nextToken, options).then((request) => request(axios, basePath));
},
};
};
exports.FbaInboundApiFactory = FbaInboundApiFactory;
/**
* FbaInboundApi - object-oriented interface
* @export
* @class FbaInboundApi
* @extends {BaseAPI}
*/
class FbaInboundApi extends base_1.BaseAPI {
/**
* 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 {Fb