UNPKG

@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

768 lines 335 kB
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" }); //#region \0rolldown/runtime.js var __create = Object.create; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __getProtoOf = Object.getPrototypeOf; var __hasOwnProp = Object.prototype.hasOwnProperty; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) { key = keys[i]; if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: ((k) => from[k]).bind(null, key), enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod)); //#endregion let _sp_api_sdk_common = require("@sp-api-sdk/common"); let axios = require("axios"); axios = __toESM(axios, 1); //#region src/api-model/base.ts const BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, ""); var BaseAPI = class { basePath; axios; configuration; constructor(configuration, basePath = BASE_PATH, axios$47 = axios.default) { this.basePath = basePath; this.axios = axios$47; if (configuration) { this.configuration = configuration; this.basePath = configuration.basePath ?? basePath; } } }; var RequiredError = class extends Error { field; constructor(field, msg) { super(msg); this.field = field; this.name = "RequiredError"; } }; const operationServerMap = {}; //#endregion //#region src/api-model/common.ts const DUMMY_BASE_URL = "https://example.com"; /** * * @throws {RequiredError} */ const assertParamExists = function(functionName, paramName, paramValue) { if (paramValue === null || paramValue === void 0) throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); }; function setFlattenedQueryParams(urlSearchParams, parameter, key = "") { if (parameter == null) return; if (typeof parameter === "object") if (Array.isArray(parameter) || parameter instanceof Set) parameter.forEach((item) => setFlattenedQueryParams(urlSearchParams, item, key)); else Object.keys(parameter).forEach((currentKey) => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== "" ? "." : ""}${currentKey}`)); else if (urlSearchParams.has(key)) urlSearchParams.append(key, parameter); else urlSearchParams.set(key, parameter); } const setSearchParams = function(url, ...objects) { const searchParams = new URLSearchParams(url.search); setFlattenedQueryParams(searchParams, objects); url.search = searchParams.toString(); }; /** * JSON serialization helper function which replaces instances of unserializable types with serializable ones. * This function will run for every key-value pair encountered by JSON.stringify while traversing an object. * Converting a set to a string will return an empty object, so an intermediate conversion to an array is required. */ const replaceWithSerializableTypeIfNeeded = function(key, value) { if (value instanceof Set) return Array.from(value); else return value; }; const serializeDataIfNeeded = function(value, requestOptions, configuration) { const nonString = typeof value !== "string"; return (nonString && configuration && configuration.isJsonMime ? configuration.isJsonMime(requestOptions.headers["Content-Type"]) : nonString) ? JSON.stringify(value !== void 0 ? value : {}, replaceWithSerializableTypeIfNeeded) : value || ""; }; const toPathString = function(url) { return url.pathname + url.search + url.hash; }; const createRequestFunction = function(axiosArgs, globalAxios, BASE_PATH, configuration) { return (axios = globalAxios, basePath = BASE_PATH) => { const axiosRequestArgs = { ...axiosArgs.options, url: (axios.defaults.baseURL ? "" : configuration?.basePath ?? basePath) + axiosArgs.url }; return axios.request(axiosRequestArgs); }; }; //#endregion //#region src/api-model/api/fulfillment-inbound-api.ts /** * FulfillmentInboundApi - axios parameter creator */ const FulfillmentInboundApiAxiosParamCreator = 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 preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have 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 = {}) => { assertParamExists("cancelInboundPlan", "inboundPlanId", inboundPlanId); const localVarPath = `/inbound/fba/2024-03-20/inboundPlans/{inboundPlanId}/cancellation`.replace("{inboundPlanId}", encodeURIComponent(String(inboundPlanId))); const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) baseOptions = configuration.baseOptions; const localVarRequestOptions = { method: "PUT", ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter["Accept"] = "application/json"; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions }; }, /** * Cancels a self-ship appointment slot against a shipment. Only available in the following [marketplaces](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids): MX, BR, EG, SA, AE, IN. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | n | n | 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 &#x60;cancelSelfShipAppointment&#x60;. * @param {*} [options] Override http request option. * @throws {RequiredError} */ cancelSelfShipAppointment: async (inboundPlanId, shipmentId, body, options = {}) => { assertParamExists("cancelSelfShipAppointment", "inboundPlanId", inboundPlanId); assertParamExists("cancelSelfShipAppointment", "shipmentId", shipmentId); 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))); const localVarUrlObj = new URL(localVarPath, 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"; localVarHeaderParameter["Accept"] = "application/json"; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration); return { url: 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 preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have 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 = {}) => { assertParamExists("confirmDeliveryWindowOptions", "inboundPlanId", inboundPlanId); assertParamExists("confirmDeliveryWindowOptions", "shipmentId", shipmentId); 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))); const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) baseOptions = configuration.baseOptions; const localVarRequestOptions = { method: "POST", ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter["Accept"] = "application/json"; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; return { url: 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 preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have 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 = {}) => { assertParamExists("confirmPackingOption", "inboundPlanId", inboundPlanId); 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))); const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) baseOptions = configuration.baseOptions; const localVarRequestOptions = { method: "POST", ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter["Accept"] = "application/json"; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; return { url: 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 preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have 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 = {}) => { assertParamExists("confirmPlacementOption", "inboundPlanId", inboundPlanId); 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))); const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) baseOptions = configuration.baseOptions; const localVarRequestOptions = { method: "POST", ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter["Accept"] = "application/json"; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; return { url: 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 preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have 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 = {}) => { assertParamExists("confirmShipmentContentUpdatePreview", "inboundPlanId", inboundPlanId); assertParamExists("confirmShipmentContentUpdatePreview", "shipmentId", shipmentId); 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))); const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) baseOptions = configuration.baseOptions; const localVarRequestOptions = { method: "POST", ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter["Accept"] = "application/json"; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; return { url: 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 preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have 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 &#x60;confirmTransportationOptions&#x60;. * @param {*} [options] Override http request option. * @throws {RequiredError} */ confirmTransportationOptions: async (inboundPlanId, body, options = {}) => { assertParamExists("confirmTransportationOptions", "inboundPlanId", inboundPlanId); assertParamExists("confirmTransportationOptions", "body", body); const localVarPath = `/inbound/fba/2024-03-20/inboundPlans/{inboundPlanId}/transportationOptions/confirmation`.replace("{inboundPlanId}", encodeURIComponent(String(inboundPlanId))); const localVarUrlObj = new URL(localVarPath, 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"; localVarHeaderParameter["Accept"] = "application/json"; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration); return { url: 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 preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have 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 &#x60;createInboundPlan&#x60;. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createInboundPlan: async (body, options = {}) => { assertParamExists("createInboundPlan", "body", body); const localVarUrlObj = new URL(`/inbound/fba/2024-03-20/inboundPlans`, 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"; localVarHeaderParameter["Accept"] = "application/json"; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration); return { url: 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 preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have 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 &#x60;createMarketplaceItemLabels&#x60;. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createMarketplaceItemLabels: async (body, options = {}) => { assertParamExists("createMarketplaceItemLabels", "body", body); const localVarUrlObj = new URL(`/inbound/fba/2024-03-20/items/labels`, 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"; localVarHeaderParameter["Accept"] = "application/json"; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration); return { url: 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 preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have 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 = {}) => { assertParamExists("generateDeliveryWindowOptions", "inboundPlanId", inboundPlanId); 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))); const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) baseOptions = configuration.baseOptions; const localVarRequestOptions = { method: "POST", ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter["Accept"] = "application/json"; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; return { url: 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 preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have 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 = {}) => { assertParamExists("generatePackingOptions", "inboundPlanId", inboundPlanId); const localVarPath = `/inbound/fba/2024-03-20/inboundPlans/{inboundPlanId}/packingOptions`.replace("{inboundPlanId}", encodeURIComponent(String(inboundPlanId))); const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) baseOptions = configuration.baseOptions; const localVarRequestOptions = { method: "POST", ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter["Accept"] = "application/json"; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; return { url: 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 preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have 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 &#x60;generatePlacementOptions&#x60;. * @param {*} [options] Override http request option. * @throws {RequiredError} */ generatePlacementOptions: async (inboundPlanId, body, options = {}) => { assertParamExists("generatePlacementOptions", "inboundPlanId", inboundPlanId); assertParamExists("generatePlacementOptions", "body", body); const localVarPath = `/inbound/fba/2024-03-20/inboundPlans/{inboundPlanId}/placementOptions`.replace("{inboundPlanId}", encodeURIComponent(String(inboundPlanId))); const localVarUrlObj = new URL(localVarPath, 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"; localVarHeaderParameter["Accept"] = "application/json"; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration); return { url: toPathString(localVarUrlObj), options: localVarRequestOptions }; }, /** * Initiates the process of generating the appointment slots list. Only available in the following [marketplaces](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids): MX, BR, EG, SA, AE, IN. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | n | n | 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 &#x60;generateSelfShipAppointmentSlots&#x60;. * @param {*} [options] Override http request option. * @throws {RequiredError} */ generateSelfShipAppointmentSlots: async (inboundPlanId, shipmentId, body, options = {}) => { assertParamExists("generateSelfShipAppointmentSlots", "inboundPlanId", inboundPlanId); assertParamExists("generateSelfShipAppointmentSlots", "shipmentId", shipmentId); 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))); const localVarUrlObj = new URL(localVarPath, 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"; localVarHeaderParameter["Accept"] = "application/json"; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration); return { url: 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 preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have 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 &#x60;generateShipmentContentUpdatePreviews&#x60;. * @param {*} [options] Override http request option. * @throws {RequiredError} */ generateShipmentContentUpdatePreviews: async (inboundPlanId, shipmentId, body, options = {}) => { assertParamExists("generateShipmentContentUpdatePreviews", "inboundPlanId", inboundPlanId); assertParamExists("generateShipmentContentUpdatePreviews", "shipmentId", shipmentId); 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))); const localVarUrlObj = new URL(localVarPath, 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"; localVarHeaderParameter["Accept"] = "application/json"; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration); return { url: 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 preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have 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 &#x60;generateTransportationOptions&#x60;. * @param {*} [options] Override http request option. * @throws {RequiredError} */ generateTransportationOptions: async (inboundPlanId, body, options = {}) => { assertParamExists("generateTransportationOptions", "inboundPlanId", inboundPlanId); assertParamExists("generateTransportationOptions", "body", body); const localVarPath = `/inbound/fba/2024-03-20/inboundPlans/{inboundPlanId}/transportationOptions`.replace("{inboundPlanId}", encodeURIComponent(String(inboundPlanId))); const localVarUrlObj = new URL(localVarPath, 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"; localVarHeaderParameter["Accept"] = "application/json"; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration); return { url: 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 preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have 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 = {}) => { assertParamExists("getDeliveryChallanDocument", "inboundPlanId", inboundPlanId); 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))); const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) baseOptions = configuration.baseOptions; const localVarRequestOptions = { method: "GET", ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter["Accept"] = "application/json"; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; return { url: 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 preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have 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 = {}) => { assertParamExists("getInboundOperationStatus", "operationId", operationId); const localVarPath = `/inbound/fba/2024-03-20/operations/{operationId}`.replace("{operationId}", encodeURIComponent(String(operationId))); const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) baseOptions = configuration.baseOptions; const localVarRequestOptions = { method: "GET", ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter["Accept"] = "application/json"; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions }; }, /** * Fetches the top level information about an inbound plan. **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 preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have 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} */ getInboundPlan: async (inboundPlanId, options = {}) => { assertParamExists("getInboundPlan", "inboundPlanId", inboundPlanId); const localVarPath = `/inbound/fba/2024-03-20/inboundPlans/{inboundPlanId}`.replace("{inboundPlanId}", encodeURIComponent(String(inboundPlanId))); const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) baseOptions = configuration.baseOptions; const localVarRequestOptions = { method: "GET", ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter["Accept"] = "application/json"; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions }; }, /** * Retrieves a list of available self-ship appointment slots used to drop off a shipment at a warehouse. Only available in the following [marketplaces](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids): MX, BR, EG, SA, AE, IN. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | n | n | 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 {number} [pageSize] The number of self ship appointment slots to return in the response matching the given query. * @param {string} [paginationToken] A token to fetch a certain page when there are multiple pages worth of results. The value of this token is fetched from the &#x60;pagination&#x60; returned in the API response. In the absence of the token value from the query parameter the API returns the first page of the result. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getSelfShipAppointmentSlots: async (inboundPlanId, shipmentId, pageSize, paginationToken, options = {}) => { assertParamExists("getSelfShipAppointmentSlots", "inboundPlanId", inboundPlanId); assertParamExists("getSelfShipAppointmentSlots", "shipmentId", shipmentId); const localVarPath = `/inbound/fba/2024-03-20/inboundPlans/{inboundPlanId}/shipments/{shipmentId}/selfShipAppointmentSlots`.replace("{inboundPlanId}", encodeURIComponent(String(inboundPlanId))).replace("{shipmentId}", encodeURIComponent(String(shipmentId))); const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) baseOptions = configuration.baseOptions; const localVarRequestOptions = { method: "GET", ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; if (pageSize !== void 0) localVarQueryParameter["pageSize"] = pageSize; if (paginationToken !== void 0) localVarQueryParameter["paginationToken"] = paginationToken; localVarHeaderParameter["Accept"] = "application/json"; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions }; }, /** * Provides the full details for a specific shipment within an inbound plan. The `transportationOptionId` inside `acceptedTransportationSelection` can be used to retrieve the transportation details for the shipment. **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 preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have 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