@sp-api-sdk/fulfillment-inbound-api-2024-03-20
Version:
The Selling Partner API for Fulfillment By Amazon (FBA) Inbound. The FBA Inbound API enables building inbound workflows to create, manage, and send shipments into Amazon's fulfillment network. The API has interoperability with the Send-to-Amazon user inte
585 lines • 327 kB
JavaScript
"use strict";
/* tslint:disable */
/* eslint-disable */
/**
* The Selling Partner API for FBA inbound operations.
* The Selling Partner API for Fulfillment By Amazon (FBA) Inbound. The FBA Inbound API enables building inbound workflows to create, manage, and send shipments into Amazon\'s fulfillment network. The API has interoperability with the Send-to-Amazon user interface.
*
* The version of the OpenAPI document: 2024-03-20
*
*
* 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.ListInboundPlansSortOrderEnum = exports.ListInboundPlansSortByEnum = exports.ListInboundPlansStatusEnum = 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 {
/**
* Cancels an Inbound Plan. Charges may apply if the cancellation is performed outside of a void window. The window for Amazon Partnered Carriers is 24 hours for Small Parcel Delivery (SPD) and one hour for Less-Than-Truckload (LTL) carrier shipments. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 2 | 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, refer to [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} inboundPlanId Identifier of an inbound plan.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
cancelInboundPlan: async (inboundPlanId, options = {}) => {
// verify required parameter 'inboundPlanId' is not null or undefined
(0, common_1.assertParamExists)('cancelInboundPlan', 'inboundPlanId', inboundPlanId);
const localVarPath = `/inbound/fba/2024-03-20/inboundPlans/{inboundPlanId}/cancellation`
.replace(`{${"inboundPlanId"}}`, encodeURIComponent(String(inboundPlanId)));
// 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 = {};
(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,
};
},
/**
* Cancels a self-ship appointment slot against a 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, refer to [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} inboundPlanId Identifier of an inbound plan.
* @param {string} shipmentId Identifier of a shipment. A shipment contains the boxes and units being inbounded.
* @param {CancelSelfShipAppointmentRequest} body The body of the request to `cancelSelfShipAppointment`.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
cancelSelfShipAppointment: async (inboundPlanId, shipmentId, body, options = {}) => {
// verify required parameter 'inboundPlanId' is not null or undefined
(0, common_1.assertParamExists)('cancelSelfShipAppointment', 'inboundPlanId', inboundPlanId);
// verify required parameter 'shipmentId' is not null or undefined
(0, common_1.assertParamExists)('cancelSelfShipAppointment', 'shipmentId', shipmentId);
// verify required parameter 'body' is not null or undefined
(0, common_1.assertParamExists)('cancelSelfShipAppointment', 'body', body);
const localVarPath = `/inbound/fba/2024-03-20/inboundPlans/{inboundPlanId}/shipments/{shipmentId}/selfShipAppointmentCancellation`
.replace(`{${"inboundPlanId"}}`, encodeURIComponent(String(inboundPlanId)))
.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 = {};
localVarHeaderParameter['Content-Type'] = 'application/json';
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
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,
};
},
/**
* Confirms the delivery window option for chosen shipment within an inbound plan. A placement option must be confirmed prior to use of this API. Once confirmed, new delivery window options cannot be generated, but the chosen delivery window option can be updated before shipment closure. The window is used to provide the expected time when a shipment will arrive at the warehouse. All transportation options which have the program `CONFIRMED_DELIVERY_WINDOW` require a delivery window to be confirmed prior to transportation option confirmation. **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, refer to [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} inboundPlanId Identifier of an inbound plan.
* @param {string} shipmentId The shipment to confirm the delivery window option for.
* @param {string} deliveryWindowOptionId The id of the delivery window option to be confirmed.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
confirmDeliveryWindowOptions: async (inboundPlanId, shipmentId, deliveryWindowOptionId, options = {}) => {
// verify required parameter 'inboundPlanId' is not null or undefined
(0, common_1.assertParamExists)('confirmDeliveryWindowOptions', 'inboundPlanId', inboundPlanId);
// verify required parameter 'shipmentId' is not null or undefined
(0, common_1.assertParamExists)('confirmDeliveryWindowOptions', 'shipmentId', shipmentId);
// verify required parameter 'deliveryWindowOptionId' is not null or undefined
(0, common_1.assertParamExists)('confirmDeliveryWindowOptions', 'deliveryWindowOptionId', deliveryWindowOptionId);
const localVarPath = `/inbound/fba/2024-03-20/inboundPlans/{inboundPlanId}/shipments/{shipmentId}/deliveryWindowOptions/{deliveryWindowOptionId}/confirmation`
.replace(`{${"inboundPlanId"}}`, encodeURIComponent(String(inboundPlanId)))
.replace(`{${"shipmentId"}}`, encodeURIComponent(String(shipmentId)))
.replace(`{${"deliveryWindowOptionId"}}`, encodeURIComponent(String(deliveryWindowOptionId)));
// 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);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
return {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Confirms the packing option for an inbound plan. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 2 | 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, refer to [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} inboundPlanId Identifier of an inbound plan.
* @param {string} packingOptionId Identifier of a packing option.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
confirmPackingOption: async (inboundPlanId, packingOptionId, options = {}) => {
// verify required parameter 'inboundPlanId' is not null or undefined
(0, common_1.assertParamExists)('confirmPackingOption', 'inboundPlanId', inboundPlanId);
// verify required parameter 'packingOptionId' is not null or undefined
(0, common_1.assertParamExists)('confirmPackingOption', 'packingOptionId', packingOptionId);
const localVarPath = `/inbound/fba/2024-03-20/inboundPlans/{inboundPlanId}/packingOptions/{packingOptionId}/confirmation`
.replace(`{${"inboundPlanId"}}`, encodeURIComponent(String(inboundPlanId)))
.replace(`{${"packingOptionId"}}`, encodeURIComponent(String(packingOptionId)));
// 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);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
return {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Confirms the placement option for an inbound plan. Once confirmed, it cannot be changed for the Inbound Plan. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 2 | 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, refer to [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} inboundPlanId Identifier of an inbound plan.
* @param {string} placementOptionId The identifier of a placement option. A placement option represents the shipment splits and destinations of SKUs.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
confirmPlacementOption: async (inboundPlanId, placementOptionId, options = {}) => {
// verify required parameter 'inboundPlanId' is not null or undefined
(0, common_1.assertParamExists)('confirmPlacementOption', 'inboundPlanId', inboundPlanId);
// verify required parameter 'placementOptionId' is not null or undefined
(0, common_1.assertParamExists)('confirmPlacementOption', 'placementOptionId', placementOptionId);
const localVarPath = `/inbound/fba/2024-03-20/inboundPlans/{inboundPlanId}/placementOptions/{placementOptionId}/confirmation`
.replace(`{${"inboundPlanId"}}`, encodeURIComponent(String(inboundPlanId)))
.replace(`{${"placementOptionId"}}`, encodeURIComponent(String(placementOptionId)));
// 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);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
return {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Confirm a shipment content update preview and accept the changes in transportation 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, refer to [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} inboundPlanId Identifier of an inbound plan.
* @param {string} shipmentId Identifier of a shipment. A shipment contains the boxes and units being inbounded.
* @param {string} contentUpdatePreviewId Identifier of a content update preview.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
confirmShipmentContentUpdatePreview: async (inboundPlanId, shipmentId, contentUpdatePreviewId, options = {}) => {
// verify required parameter 'inboundPlanId' is not null or undefined
(0, common_1.assertParamExists)('confirmShipmentContentUpdatePreview', 'inboundPlanId', inboundPlanId);
// verify required parameter 'shipmentId' is not null or undefined
(0, common_1.assertParamExists)('confirmShipmentContentUpdatePreview', 'shipmentId', shipmentId);
// verify required parameter 'contentUpdatePreviewId' is not null or undefined
(0, common_1.assertParamExists)('confirmShipmentContentUpdatePreview', 'contentUpdatePreviewId', contentUpdatePreviewId);
const localVarPath = `/inbound/fba/2024-03-20/inboundPlans/{inboundPlanId}/shipments/{shipmentId}/contentUpdatePreviews/{contentUpdatePreviewId}/confirmation`
.replace(`{${"inboundPlanId"}}`, encodeURIComponent(String(inboundPlanId)))
.replace(`{${"shipmentId"}}`, encodeURIComponent(String(shipmentId)))
.replace(`{${"contentUpdatePreviewId"}}`, encodeURIComponent(String(contentUpdatePreviewId)));
// 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);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
return {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Confirms all the transportation options for an inbound plan. A placement option must be confirmed prior to use of this API. Once confirmed, new transportation options can not be generated or confirmed for the Inbound Plan. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 2 | 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, refer to [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} inboundPlanId Identifier of an inbound plan.
* @param {ConfirmTransportationOptionsRequest} body The body of the request to `confirmTransportationOptions`.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
confirmTransportationOptions: async (inboundPlanId, body, options = {}) => {
// verify required parameter 'inboundPlanId' is not null or undefined
(0, common_1.assertParamExists)('confirmTransportationOptions', 'inboundPlanId', inboundPlanId);
// verify required parameter 'body' is not null or undefined
(0, common_1.assertParamExists)('confirmTransportationOptions', 'body', body);
const localVarPath = `/inbound/fba/2024-03-20/inboundPlans/{inboundPlanId}/transportationOptions/confirmation`
.replace(`{${"inboundPlanId"}}`, encodeURIComponent(String(inboundPlanId)));
// 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);
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,
};
},
/**
* Creates an inbound plan. An inbound plan contains all the necessary information to send shipments into Amazon\'s fufillment network. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 2 | 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, refer to [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 {CreateInboundPlanRequest} body The body of the request to `createInboundPlan`.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createInboundPlan: async (body, options = {}) => {
// verify required parameter 'body' is not null or undefined
(0, common_1.assertParamExists)('createInboundPlan', 'body', body);
const localVarPath = `/inbound/fba/2024-03-20/inboundPlans`;
// 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);
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,
};
},
/**
* For a given marketplace - creates labels for a list of mskus. **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, refer to [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 {CreateMarketplaceItemLabelsRequest} body The body of the request to `createMarketplaceItemLabels`.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createMarketplaceItemLabels: async (body, options = {}) => {
// verify required parameter 'body' is not null or undefined
(0, common_1.assertParamExists)('createMarketplaceItemLabels', 'body', body);
const localVarPath = `/inbound/fba/2024-03-20/items/labels`;
// 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);
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,
};
},
/**
* Generates available delivery window options for a given 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, refer to [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} inboundPlanId Identifier of an inbound plan.
* @param {string} shipmentId The shipment to generate delivery window options for.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
generateDeliveryWindowOptions: async (inboundPlanId, shipmentId, options = {}) => {
// verify required parameter 'inboundPlanId' is not null or undefined
(0, common_1.assertParamExists)('generateDeliveryWindowOptions', 'inboundPlanId', inboundPlanId);
// verify required parameter 'shipmentId' is not null or undefined
(0, common_1.assertParamExists)('generateDeliveryWindowOptions', 'shipmentId', shipmentId);
const localVarPath = `/inbound/fba/2024-03-20/inboundPlans/{inboundPlanId}/shipments/{shipmentId}/deliveryWindowOptions`
.replace(`{${"inboundPlanId"}}`, encodeURIComponent(String(inboundPlanId)))
.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);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
return {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Generates available packing options for the inbound plan. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 2 | 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, refer to [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} inboundPlanId Identifier of an inbound plan.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
generatePackingOptions: async (inboundPlanId, options = {}) => {
// verify required parameter 'inboundPlanId' is not null or undefined
(0, common_1.assertParamExists)('generatePackingOptions', 'inboundPlanId', inboundPlanId);
const localVarPath = `/inbound/fba/2024-03-20/inboundPlans/{inboundPlanId}/packingOptions`
.replace(`{${"inboundPlanId"}}`, encodeURIComponent(String(inboundPlanId)));
// 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);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
return {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Generates placement options for the inbound plan. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 2 | 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, refer to [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} inboundPlanId Identifier of an inbound plan.
* @param {GeneratePlacementOptionsRequest} body The body of the request to `generatePlacementOptions`.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
generatePlacementOptions: async (inboundPlanId, body, options = {}) => {
// verify required parameter 'inboundPlanId' is not null or undefined
(0, common_1.assertParamExists)('generatePlacementOptions', 'inboundPlanId', inboundPlanId);
// verify required parameter 'body' is not null or undefined
(0, common_1.assertParamExists)('generatePlacementOptions', 'body', body);
const localVarPath = `/inbound/fba/2024-03-20/inboundPlans/{inboundPlanId}/placementOptions`
.replace(`{${"inboundPlanId"}}`, encodeURIComponent(String(inboundPlanId)));
// 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);
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 generating the appointment slots list. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 2 | 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, refer to [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} inboundPlanId Identifier of an inbound plan.
* @param {string} shipmentId Identifier of a shipment. A shipment contains the boxes and units being inbounded.
* @param {GenerateSelfShipAppointmentSlotsRequest} body The body of the request to `generateSelfShipAppointmentSlots`.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
generateSelfShipAppointmentSlots: async (inboundPlanId, shipmentId, body, options = {}) => {
// verify required parameter 'inboundPlanId' is not null or undefined
(0, common_1.assertParamExists)('generateSelfShipAppointmentSlots', 'inboundPlanId', inboundPlanId);
// verify required parameter 'shipmentId' is not null or undefined
(0, common_1.assertParamExists)('generateSelfShipAppointmentSlots', 'shipmentId', shipmentId);
// verify required parameter 'body' is not null or undefined
(0, common_1.assertParamExists)('generateSelfShipAppointmentSlots', 'body', body);
const localVarPath = `/inbound/fba/2024-03-20/inboundPlans/{inboundPlanId}/shipments/{shipmentId}/selfShipAppointmentSlots`
.replace(`{${"inboundPlanId"}}`, encodeURIComponent(String(inboundPlanId)))
.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);
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,
};
},
/**
* Generate a shipment content update preview given a set of intended boxes and/or items for a shipment with a confirmed carrier. The shipment content update preview will be viewable with the updated costs and contents prior to confirmation. **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, refer to [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} inboundPlanId Identifier of an inbound plan.
* @param {string} shipmentId Identifier of a shipment. A shipment contains the boxes and units being inbounded.
* @param {GenerateShipmentContentUpdatePreviewsRequest} body The body of the request to `generateShipmentContentUpdatePreviews`.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
generateShipmentContentUpdatePreviews: async (inboundPlanId, shipmentId, body, options = {}) => {
// verify required parameter 'inboundPlanId' is not null or undefined
(0, common_1.assertParamExists)('generateShipmentContentUpdatePreviews', 'inboundPlanId', inboundPlanId);
// verify required parameter 'shipmentId' is not null or undefined
(0, common_1.assertParamExists)('generateShipmentContentUpdatePreviews', 'shipmentId', shipmentId);
// verify required parameter 'body' is not null or undefined
(0, common_1.assertParamExists)('generateShipmentContentUpdatePreviews', 'body', body);
const localVarPath = `/inbound/fba/2024-03-20/inboundPlans/{inboundPlanId}/shipments/{shipmentId}/contentUpdatePreviews`
.replace(`{${"inboundPlanId"}}`, encodeURIComponent(String(inboundPlanId)))
.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);
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,
};
},
/**
* Generates available transportation options for a given placement option. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 2 | 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, refer to [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} inboundPlanId Identifier of an inbound plan.
* @param {GenerateTransportationOptionsRequest} body The body of the request to `generateTransportationOptions`.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
generateTransportationOptions: async (inboundPlanId, body, options = {}) => {
// verify required parameter 'inboundPlanId' is not null or undefined
(0, common_1.assertParamExists)('generateTransportationOptions', 'inboundPlanId', inboundPlanId);
// verify required parameter 'body' is not null or undefined
(0, common_1.assertParamExists)('generateTransportationOptions', 'body', body);
const localVarPath = `/inbound/fba/2024-03-20/inboundPlans/{inboundPlanId}/transportationOptions`
.replace(`{${"inboundPlanId"}}`, encodeURIComponent(String(inboundPlanId)));
// 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);
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,
};
},
/**
* Provide delivery challan document for PCP transportation in IN marketplace. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 6 | 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, refer to [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} inboundPlanId Identifier of an inbound plan.
* @param {string} shipmentId Identifier of a shipment. A shipment contains the boxes and units being inbounded.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getDeliveryChallanDocument: async (inboundPlanId, shipmentId, options = {}) => {
// verify required parameter 'inboundPlanId' is not null or undefined
(0, common_1.assertParamExists)('getDeliveryChallanDocument', 'inboundPlanId', inboundPlanId);
// verify required parameter 'shipmentId' is not null or undefined
(0, common_1.assertParamExists)('getDeliveryChallanDocument', 'shipmentId', shipmentId);
const localVarPath = `/inbound/fba/2024-03-20/inboundPlans/{inboundPlanId}/shipments/{shipmentId}/deliveryChallanDocument`
.replace(`{${"inboundPlanId"}}`, encodeURIComponent(String(inboundPlanId)))
.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,
};
},
/**
* Gets the status of the processing of an asynchronous API call. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 6 | 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, refer to [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} operationId Identifier of an asynchronous operation.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getInboundOperationStatus: async (operationId, options = {}) => {
// verify required parameter 'operationId' is not null or undefined
(0, common_1.assertParamExists)('getInboundOperationStatus', 'operationId', operationId);
const localVarPath = `/inbound/fba/2024-03-20/operations/{operationId}`
.replace(`{${"operationId"}}`, encodeURIComponent(String(operationId)));
// 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,
};
},
/**
* Fetches the top level information about an inbound plan. **Usage Plan:** | Rate (reques