@scaleleap/selling-partner-api-sdk
Version:
📦 A fully typed TypeScript and Node.js SDK library for Amazon Selling Partner API
715 lines • 111 kB
JavaScript
"use strict";
/* tslint:disable */
/* eslint-disable */
/**
* Selling Partner APIs for Fulfillment Outbound
* The Selling Partner API for Fulfillment Outbound lets you create applications that help a seller fulfill Multi-Channel Fulfillment orders using their inventory in Amazon\'s fulfillment network. You can get information on both potential and existing fulfillment orders.
*
* The version of the OpenAPI document: 2020-07-01
*
*
* 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.FbaOutboundApi = exports.FbaOutboundApiFactory = exports.FbaOutboundApiFp = exports.FbaOutboundApiAxiosParamCreator = exports.WeightUnitEnum = exports.ShippingSpeedCategory = exports.ReturnItemDisposition = exports.InvalidItemReasonCode = exports.FulfillmentShipmentFulfillmentShipmentStatusEnum = exports.FulfillmentReturnItemStatus = exports.FulfillmentPreviewItemShippingWeightCalculationMethodEnum = exports.FulfillmentPolicy = exports.FulfillmentOrderStatus = exports.FulfillmentAction = exports.FeeNameEnum = exports.FeatureSettingsFeatureFulfillmentPolicyEnum = exports.EventCode = exports.DropOffLocationTypeEnum = exports.CurrentStatus = exports.AmountUnitOfMeasureEnum = exports.AdditionalLocationInfo = 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");
/**
* Additional location information.
* @export
* @enum {string}
*/
var AdditionalLocationInfo;
(function (AdditionalLocationInfo) {
AdditionalLocationInfo["AsInstructed"] = "AS_INSTRUCTED";
AdditionalLocationInfo["Carport"] = "CARPORT";
AdditionalLocationInfo["CustomerPickup"] = "CUSTOMER_PICKUP";
AdditionalLocationInfo["Deck"] = "DECK";
AdditionalLocationInfo["DoorPerson"] = "DOOR_PERSON";
AdditionalLocationInfo["FrontDesk"] = "FRONT_DESK";
AdditionalLocationInfo["FrontDoor"] = "FRONT_DOOR";
AdditionalLocationInfo["Garage"] = "GARAGE";
AdditionalLocationInfo["Guard"] = "GUARD";
AdditionalLocationInfo["MailRoom"] = "MAIL_ROOM";
AdditionalLocationInfo["MailSlot"] = "MAIL_SLOT";
AdditionalLocationInfo["Mailbox"] = "MAILBOX";
AdditionalLocationInfo["McBoy"] = "MC_BOY";
AdditionalLocationInfo["McGirl"] = "MC_GIRL";
AdditionalLocationInfo["McMan"] = "MC_MAN";
AdditionalLocationInfo["McWoman"] = "MC_WOMAN";
AdditionalLocationInfo["Neighbor"] = "NEIGHBOR";
AdditionalLocationInfo["Office"] = "OFFICE";
AdditionalLocationInfo["Outbuilding"] = "OUTBUILDING";
AdditionalLocationInfo["Patio"] = "PATIO";
AdditionalLocationInfo["Porch"] = "PORCH";
AdditionalLocationInfo["RearDoor"] = "REAR_DOOR";
AdditionalLocationInfo["Receptionist"] = "RECEPTIONIST";
AdditionalLocationInfo["Receiver"] = "RECEIVER";
AdditionalLocationInfo["SecureLocation"] = "SECURE_LOCATION";
AdditionalLocationInfo["SideDoor"] = "SIDE_DOOR";
})(AdditionalLocationInfo || (exports.AdditionalLocationInfo = AdditionalLocationInfo = {}));
/**
* @export
* @enum {string}
*/
var AmountUnitOfMeasureEnum;
(function (AmountUnitOfMeasureEnum) {
AmountUnitOfMeasureEnum["Eaches"] = "Eaches";
})(AmountUnitOfMeasureEnum || (exports.AmountUnitOfMeasureEnum = AmountUnitOfMeasureEnum = {}));
/**
* The current delivery status of the package.
* @export
* @enum {string}
*/
var CurrentStatus;
(function (CurrentStatus) {
CurrentStatus["InTransit"] = "IN_TRANSIT";
CurrentStatus["Delivered"] = "DELIVERED";
CurrentStatus["Returning"] = "RETURNING";
CurrentStatus["Returned"] = "RETURNED";
CurrentStatus["Undeliverable"] = "UNDELIVERABLE";
CurrentStatus["Delayed"] = "DELAYED";
CurrentStatus["AvailableForPickup"] = "AVAILABLE_FOR_PICKUP";
CurrentStatus["CustomerAction"] = "CUSTOMER_ACTION";
CurrentStatus["Unknown"] = "UNKNOWN";
CurrentStatus["OutForDelivery"] = "OUT_FOR_DELIVERY";
CurrentStatus["DeliveryAttempted"] = "DELIVERY_ATTEMPTED";
CurrentStatus["PickupSuccessful"] = "PICKUP_SUCCESSFUL";
CurrentStatus["PickupCancelled"] = "PICKUP_CANCELLED";
CurrentStatus["PickupAttempted"] = "PICKUP_ATTEMPTED";
CurrentStatus["PickupScheduled"] = "PICKUP_SCHEDULED";
CurrentStatus["ReturnRequestAccepted"] = "RETURN_REQUEST_ACCEPTED";
CurrentStatus["RefundIssued"] = "REFUND_ISSUED";
CurrentStatus["ReturnReceivedInFc"] = "RETURN_RECEIVED_IN_FC";
})(CurrentStatus || (exports.CurrentStatus = CurrentStatus = {}));
/**
* @export
* @enum {string}
*/
var DropOffLocationTypeEnum;
(function (DropOffLocationTypeEnum) {
DropOffLocationTypeEnum["FrontDoor"] = "FRONT_DOOR";
DropOffLocationTypeEnum["DeliveryBox"] = "DELIVERY_BOX";
DropOffLocationTypeEnum["GasMeterBox"] = "GAS_METER_BOX";
DropOffLocationTypeEnum["BicycleBasket"] = "BICYCLE_BASKET";
DropOffLocationTypeEnum["Garage"] = "GARAGE";
DropOffLocationTypeEnum["Receptionist"] = "RECEPTIONIST";
DropOffLocationTypeEnum["FallbackNeighborDelivery"] = "FALLBACK_NEIGHBOR_DELIVERY";
DropOffLocationTypeEnum["DoNotLeaveUnattended"] = "DO_NOT_LEAVE_UNATTENDED";
})(DropOffLocationTypeEnum || (exports.DropOffLocationTypeEnum = DropOffLocationTypeEnum = {}));
/**
* The event code for the delivery event.
* @export
* @enum {string}
*/
var EventCode;
(function (EventCode) {
EventCode["_101"] = "EVENT_101";
EventCode["_102"] = "EVENT_102";
EventCode["_201"] = "EVENT_201";
EventCode["_202"] = "EVENT_202";
EventCode["_203"] = "EVENT_203";
EventCode["_204"] = "EVENT_204";
EventCode["_205"] = "EVENT_205";
EventCode["_206"] = "EVENT_206";
EventCode["_301"] = "EVENT_301";
EventCode["_302"] = "EVENT_302";
EventCode["_304"] = "EVENT_304";
EventCode["_306"] = "EVENT_306";
EventCode["_307"] = "EVENT_307";
EventCode["_308"] = "EVENT_308";
EventCode["_309"] = "EVENT_309";
EventCode["_401"] = "EVENT_401";
EventCode["_402"] = "EVENT_402";
EventCode["_403"] = "EVENT_403";
EventCode["_404"] = "EVENT_404";
EventCode["_405"] = "EVENT_405";
EventCode["_406"] = "EVENT_406";
EventCode["_407"] = "EVENT_407";
EventCode["_408"] = "EVENT_408";
EventCode["_409"] = "EVENT_409";
EventCode["_411"] = "EVENT_411";
EventCode["_412"] = "EVENT_412";
EventCode["_413"] = "EVENT_413";
EventCode["_414"] = "EVENT_414";
EventCode["_415"] = "EVENT_415";
EventCode["_416"] = "EVENT_416";
EventCode["_417"] = "EVENT_417";
EventCode["_418"] = "EVENT_418";
EventCode["_419"] = "EVENT_419";
})(EventCode || (exports.EventCode = EventCode = {}));
/**
* @export
* @enum {string}
*/
var FeatureSettingsFeatureFulfillmentPolicyEnum;
(function (FeatureSettingsFeatureFulfillmentPolicyEnum) {
FeatureSettingsFeatureFulfillmentPolicyEnum["Required"] = "Required";
FeatureSettingsFeatureFulfillmentPolicyEnum["NotRequired"] = "NotRequired";
})(FeatureSettingsFeatureFulfillmentPolicyEnum || (exports.FeatureSettingsFeatureFulfillmentPolicyEnum = FeatureSettingsFeatureFulfillmentPolicyEnum = {}));
/**
* @export
* @enum {string}
*/
var FeeNameEnum;
(function (FeeNameEnum) {
FeeNameEnum["FbaPerUnitFulfillmentFee"] = "FBAPerUnitFulfillmentFee";
FeeNameEnum["FbaPerOrderFulfillmentFee"] = "FBAPerOrderFulfillmentFee";
FeeNameEnum["FbaTransportationFee"] = "FBATransportationFee";
FeeNameEnum["FbaFulfillmentCodFee"] = "FBAFulfillmentCODFee";
})(FeeNameEnum || (exports.FeeNameEnum = FeeNameEnum = {}));
/**
* Specifies whether the fulfillment order should ship now or have an order hold put on it.
* @export
* @enum {string}
*/
var FulfillmentAction;
(function (FulfillmentAction) {
FulfillmentAction["Ship"] = "Ship";
FulfillmentAction["Hold"] = "Hold";
})(FulfillmentAction || (exports.FulfillmentAction = FulfillmentAction = {}));
/**
* The current status of the fulfillment order.
* @export
* @enum {string}
*/
var FulfillmentOrderStatus;
(function (FulfillmentOrderStatus) {
FulfillmentOrderStatus["New"] = "New";
FulfillmentOrderStatus["Received"] = "Received";
FulfillmentOrderStatus["Planning"] = "Planning";
FulfillmentOrderStatus["Processing"] = "Processing";
FulfillmentOrderStatus["Cancelled"] = "Cancelled";
FulfillmentOrderStatus["Complete"] = "Complete";
FulfillmentOrderStatus["CompletePartialled"] = "CompletePartialled";
FulfillmentOrderStatus["Unfulfillable"] = "Unfulfillable";
FulfillmentOrderStatus["Invalid"] = "Invalid";
})(FulfillmentOrderStatus || (exports.FulfillmentOrderStatus = FulfillmentOrderStatus = {}));
/**
* The `FulfillmentPolicy` value specified when you submitted the `createFulfillmentOrder` operation.
* @export
* @enum {string}
*/
var FulfillmentPolicy;
(function (FulfillmentPolicy) {
FulfillmentPolicy["FillOrKill"] = "FillOrKill";
FulfillmentPolicy["FillAll"] = "FillAll";
FulfillmentPolicy["FillAllAvailable"] = "FillAllAvailable";
})(FulfillmentPolicy || (exports.FulfillmentPolicy = FulfillmentPolicy = {}));
/**
* @export
* @enum {string}
*/
var FulfillmentPreviewItemShippingWeightCalculationMethodEnum;
(function (FulfillmentPreviewItemShippingWeightCalculationMethodEnum) {
FulfillmentPreviewItemShippingWeightCalculationMethodEnum["Package"] = "Package";
FulfillmentPreviewItemShippingWeightCalculationMethodEnum["Dimensional"] = "Dimensional";
})(FulfillmentPreviewItemShippingWeightCalculationMethodEnum || (exports.FulfillmentPreviewItemShippingWeightCalculationMethodEnum = FulfillmentPreviewItemShippingWeightCalculationMethodEnum = {}));
/**
* Indicates if the return item has been processed by a fulfillment center.
* @export
* @enum {string}
*/
var FulfillmentReturnItemStatus;
(function (FulfillmentReturnItemStatus) {
FulfillmentReturnItemStatus["New"] = "New";
FulfillmentReturnItemStatus["Processed"] = "Processed";
})(FulfillmentReturnItemStatus || (exports.FulfillmentReturnItemStatus = FulfillmentReturnItemStatus = {}));
/**
* @export
* @enum {string}
*/
var FulfillmentShipmentFulfillmentShipmentStatusEnum;
(function (FulfillmentShipmentFulfillmentShipmentStatusEnum) {
FulfillmentShipmentFulfillmentShipmentStatusEnum["Pending"] = "PENDING";
FulfillmentShipmentFulfillmentShipmentStatusEnum["Shipped"] = "SHIPPED";
FulfillmentShipmentFulfillmentShipmentStatusEnum["CancelledByFulfiller"] = "CANCELLED_BY_FULFILLER";
FulfillmentShipmentFulfillmentShipmentStatusEnum["CancelledBySeller"] = "CANCELLED_BY_SELLER";
})(FulfillmentShipmentFulfillmentShipmentStatusEnum || (exports.FulfillmentShipmentFulfillmentShipmentStatusEnum = FulfillmentShipmentFulfillmentShipmentStatusEnum = {}));
/**
* A code for why the item is invalid for return.
* @export
* @enum {string}
*/
var InvalidItemReasonCode;
(function (InvalidItemReasonCode) {
InvalidItemReasonCode["InvalidValues"] = "InvalidValues";
InvalidItemReasonCode["DuplicateRequest"] = "DuplicateRequest";
InvalidItemReasonCode["NoCompletedShipItems"] = "NoCompletedShipItems";
InvalidItemReasonCode["NoReturnableQuantity"] = "NoReturnableQuantity";
})(InvalidItemReasonCode || (exports.InvalidItemReasonCode = InvalidItemReasonCode = {}));
/**
* The condition of the return item when received by an Amazon fulfillment center.
* @export
* @enum {string}
*/
var ReturnItemDisposition;
(function (ReturnItemDisposition) {
ReturnItemDisposition["Sellable"] = "Sellable";
ReturnItemDisposition["Defective"] = "Defective";
ReturnItemDisposition["CustomerDamaged"] = "CustomerDamaged";
ReturnItemDisposition["CarrierDamaged"] = "CarrierDamaged";
ReturnItemDisposition["FulfillerDamaged"] = "FulfillerDamaged";
})(ReturnItemDisposition || (exports.ReturnItemDisposition = ReturnItemDisposition = {}));
/**
* The shipping method used for the fulfillment order. When this value is `ScheduledDelivery`, choose `Ship` for the `fulfillmentAction`. `Hold` is not a valid `fulfillmentAction` value when the `shippingSpeedCategory` value is `ScheduledDelivery`. Note: Shipping method service level agreements vary by marketplace. Sellers should refer to the [Seller Central](https://developer-docs.amazon.com/sp-api/docs/seller-central-urls) website in their marketplace for shipping method service level agreements and fulfillment fees.
* @export
* @enum {string}
*/
var ShippingSpeedCategory;
(function (ShippingSpeedCategory) {
ShippingSpeedCategory["Standard"] = "Standard";
ShippingSpeedCategory["Expedited"] = "Expedited";
ShippingSpeedCategory["Priority"] = "Priority";
ShippingSpeedCategory["ScheduledDelivery"] = "ScheduledDelivery";
})(ShippingSpeedCategory || (exports.ShippingSpeedCategory = ShippingSpeedCategory = {}));
/**
* @export
* @enum {string}
*/
var WeightUnitEnum;
(function (WeightUnitEnum) {
WeightUnitEnum["Kg"] = "KG";
WeightUnitEnum["Kilograms"] = "KILOGRAMS";
WeightUnitEnum["Lb"] = "LB";
WeightUnitEnum["Pounds"] = "POUNDS";
})(WeightUnitEnum || (exports.WeightUnitEnum = WeightUnitEnum = {}));
/**
* FbaOutboundApi - axios parameter creator
* @export
*/
const FbaOutboundApiAxiosParamCreator = function (configuration) {
return {
/**
* Requests that Amazon stop attempting to fulfill the fulfillment order indicated by the specified order identifier. **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 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} sellerFulfillmentOrderId The identifier assigned to the item by the seller when the fulfillment order was created.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
cancelFulfillmentOrder: async (sellerFulfillmentOrderId, options = {}) => {
// verify required parameter 'sellerFulfillmentOrderId' is not null or undefined
(0, common_1.assertParamExists)('cancelFulfillmentOrder', 'sellerFulfillmentOrderId', sellerFulfillmentOrderId);
const localVarPath = `/fba/outbound/2020-07-01/fulfillmentOrders/{sellerFulfillmentOrderId}/cancel`
.replace(`{${"sellerFulfillmentOrderId"}}`, encodeURIComponent(String(sellerFulfillmentOrderId)));
// 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, options.query);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
return {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Requests that Amazon ship items from the seller\'s inventory in Amazon\'s fulfillment network to a destination address. **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 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 {CreateFulfillmentOrderRequest} body CreateFulfillmentOrderRequest parameter
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createFulfillmentOrder: async (body, options = {}) => {
// verify required parameter 'body' is not null or undefined
(0, common_1.assertParamExists)('createFulfillmentOrder', 'body', body);
const localVarPath = `/fba/outbound/2020-07-01/fulfillmentOrders`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
localVarHeaderParameter['Content-Type'] = 'application/json';
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter, options.query);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration);
return {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Creates a fulfillment return. **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 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} sellerFulfillmentOrderId An identifier assigned by the seller to the fulfillment order at the time it was created. The seller uses their own records to find the correct `SellerFulfillmentOrderId` value based on the buyer\'s request to return items.
* @param {CreateFulfillmentReturnRequest} body CreateFulfillmentReturnRequest parameter
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createFulfillmentReturn: async (sellerFulfillmentOrderId, body, options = {}) => {
// verify required parameter 'sellerFulfillmentOrderId' is not null or undefined
(0, common_1.assertParamExists)('createFulfillmentReturn', 'sellerFulfillmentOrderId', sellerFulfillmentOrderId);
// verify required parameter 'body' is not null or undefined
(0, common_1.assertParamExists)('createFulfillmentReturn', 'body', body);
const localVarPath = `/fba/outbound/2020-07-01/fulfillmentOrders/{sellerFulfillmentOrderId}/return`
.replace(`{${"sellerFulfillmentOrderId"}}`, encodeURIComponent(String(sellerFulfillmentOrderId)));
// 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, options.query);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration);
return {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Returns delivery options that include an estimated delivery date and offer expiration, based on criteria that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 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 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 {GetDeliveryOffersRequest} body GetDeliveryOffersRequest parameter
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deliveryOffers: async (body, options = {}) => {
// verify required parameter 'body' is not null or undefined
(0, common_1.assertParamExists)('deliveryOffers', 'body', body);
const localVarPath = `/fba/outbound/2020-07-01/deliveryOffers`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
localVarHeaderParameter['Content-Type'] = 'application/json';
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter, options.query);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration);
return {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Returns a list of inventory items that are eligible for the fulfillment feature 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 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} marketplaceId The marketplace for which to return a list of the inventory that is eligible for the specified feature.
* @param {string} featureName The name of the feature for which to return a list of eligible inventory.
* @param {string} [nextToken] A string token returned in the response to your previous request that is used to return the next response page. A value of null will return the first page.
* @param {string} [queryStartDate] A date that you can use to select inventory that has been updated since a specified date. An update is defined as any change in feature-enabled inventory availability. The date must be in the format yyyy-MM-ddTHH:mm:ss.sssZ
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getFeatureInventory: async (marketplaceId, featureName, nextToken, queryStartDate, options = {}) => {
// verify required parameter 'marketplaceId' is not null or undefined
(0, common_1.assertParamExists)('getFeatureInventory', 'marketplaceId', marketplaceId);
// verify required parameter 'featureName' is not null or undefined
(0, common_1.assertParamExists)('getFeatureInventory', 'featureName', featureName);
const localVarPath = `/fba/outbound/2020-07-01/features/inventory/{featureName}`
.replace(`{${"featureName"}}`, encodeURIComponent(String(featureName)));
// 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;
}
if (nextToken !== undefined) {
localVarQueryParameter['nextToken'] = nextToken;
}
if (queryStartDate !== undefined) {
localVarQueryParameter['queryStartDate'] = (queryStartDate instanceof Date) ?
queryStartDate.toISOString() :
queryStartDate;
}
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter, options.query);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
return {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Returns the number of items with the sellerSKU you specify that can have orders fulfilled using the specified feature. Note that if the sellerSKU isn\'t eligible, the response will contain an empty skuInfo object. The parameters for this operation may contain special characters that require URL encoding. To avoid errors with SKUs when encoding URLs, refer to [URL Encoding](https://developer-docs.amazon.com/sp-api/docs/url-encoding). **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 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} marketplaceId The marketplace for which to return the count.
* @param {string} featureName The name of the feature.
* @param {string} sellerSku Used to identify an item in the given marketplace. `SellerSKU` is qualified by the seller\'s `SellerId`, which is included with every operation that you submit.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getFeatureSKU: async (marketplaceId, featureName, sellerSku, options = {}) => {
// verify required parameter 'marketplaceId' is not null or undefined
(0, common_1.assertParamExists)('getFeatureSKU', 'marketplaceId', marketplaceId);
// verify required parameter 'featureName' is not null or undefined
(0, common_1.assertParamExists)('getFeatureSKU', 'featureName', featureName);
// verify required parameter 'sellerSku' is not null or undefined
(0, common_1.assertParamExists)('getFeatureSKU', 'sellerSku', sellerSku);
const localVarPath = `/fba/outbound/2020-07-01/features/inventory/{featureName}/{sellerSku}`
.replace(`{${"featureName"}}`, encodeURIComponent(String(featureName)))
.replace(`{${"sellerSku"}}`, encodeURIComponent(String(sellerSku)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
if (marketplaceId !== undefined) {
localVarQueryParameter['marketplaceId'] = marketplaceId;
}
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter, options.query);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
return {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Returns a list of features available for Multi-Channel Fulfillment orders in the marketplace you specify, and whether the seller for which you made the call is enrolled for each feature. **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 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} marketplaceId The marketplace for which to return the list of features.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getFeatures: async (marketplaceId, options = {}) => {
// verify required parameter 'marketplaceId' is not null or undefined
(0, common_1.assertParamExists)('getFeatures', 'marketplaceId', marketplaceId);
const localVarPath = `/fba/outbound/2020-07-01/features`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
if (marketplaceId !== undefined) {
localVarQueryParameter['marketplaceId'] = marketplaceId;
}
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter, options.query);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
return {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Returns the fulfillment order indicated by the specified order identifier. **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 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} sellerFulfillmentOrderId The identifier assigned to the item by the seller when the fulfillment order was created.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getFulfillmentOrder: async (sellerFulfillmentOrderId, options = {}) => {
// verify required parameter 'sellerFulfillmentOrderId' is not null or undefined
(0, common_1.assertParamExists)('getFulfillmentOrder', 'sellerFulfillmentOrderId', sellerFulfillmentOrderId);
const localVarPath = `/fba/outbound/2020-07-01/fulfillmentOrders/{sellerFulfillmentOrderId}`
.replace(`{${"sellerFulfillmentOrderId"}}`, encodeURIComponent(String(sellerFulfillmentOrderId)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter, options.query);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
return {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Returns a list of fulfillment order previews based on shipping 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 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 {GetFulfillmentPreviewRequest} body GetFulfillmentPreviewRequest parameter
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getFulfillmentPreview: async (body, options = {}) => {
// verify required parameter 'body' is not null or undefined
(0, common_1.assertParamExists)('getFulfillmentPreview', 'body', body);
const localVarPath = `/fba/outbound/2020-07-01/fulfillmentOrders/preview`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
localVarHeaderParameter['Content-Type'] = 'application/json';
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter, options.query);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration);
return {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Returns delivery tracking information for a package in an outbound shipment for a Multi-Channel Fulfillment order. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may 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 {number} packageNumber The unencrypted package identifier returned by the `getFulfillmentOrder` operation.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getPackageTrackingDetails: async (packageNumber, options = {}) => {
// verify required parameter 'packageNumber' is not null or undefined
(0, common_1.assertParamExists)('getPackageTrackingDetails', 'packageNumber', packageNumber);
const localVarPath = `/fba/outbound/2020-07-01/tracking`;
// 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 (packageNumber !== undefined) {
localVarQueryParameter['packageNumber'] = packageNumber;
}
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter, options.query);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
return {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Returns a list of fulfillment orders fulfilled after (or at) a specified date-time, or indicated by the next token parameter. **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 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} [queryStartDate] A date used to select fulfillment orders that were last updated after (or at) a specified time. An update is defined as any change in fulfillment order status, including the creation of a new fulfillment order.
* @param {string} [nextToken] A string token returned in the response to your previous request.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listAllFulfillmentOrders: async (queryStartDate, nextToken, options = {}) => {
const localVarPath = `/fba/outbound/2020-07-01/fulfillmentOrders`;
// 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 (queryStartDate !== undefined) {
localVarQueryParameter['queryStartDate'] = (queryStartDate instanceof Date) ?
queryStartDate.toISOString() :
queryStartDate;
}
if (nextToken !== undefined) {
localVarQueryParameter['nextToken'] = nextToken;
}
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter, options.query);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
return {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Returns a list of return reason codes for a seller SKU in a given marketplace. The parameters for this operation may contain special characters that require URL encoding. To avoid errors with SKUs when encoding URLs, refer to [URL Encoding](https://developer-docs.amazon.com/sp-api/docs/url-encoding). **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 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} sellerSku The seller SKU for which return reason codes are required.
* @param {string} [marketplaceId] The marketplace for which the seller wants return reason codes.
* @param {string} [sellerFulfillmentOrderId] The identifier assigned to the item by the seller when the fulfillment order was created. The service uses this value to determine the marketplace for which the seller wants return reason codes.
* @param {string} [language] The language that the `TranslatedDescription` property of the `ReasonCodeDetails` response object should be translated into.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listReturnReasonCodes: async (sellerSku, marketplaceId, sellerFulfillmentOrderId, language, options = {}) => {
// verify required parameter 'sellerSku' is not null or undefined
(0, common_1.assertParamExists)('listReturnReasonCodes', 'sellerSku', sellerSku);
const localVarPath = `/fba/outbound/2020-07-01/returnReasonCodes`;
// 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 (sellerSku !== undefined) {
localVarQueryParameter['sellerSku'] = sellerSku;
}
if (marketplaceId !== undefined) {
localVarQueryParameter['marketplaceId'] = marketplaceId;
}
if (sellerFulfillmentOrderId !== undefined) {
localVarQueryParameter['sellerFulfillmentOrderId'] = sellerFulfillmentOrderId;
}
if (language !== undefined) {
localVarQueryParameter['language'] = language;
}
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter, options.query);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
return {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Requests that Amazon update the status of an order in the sandbox testing environment. This is a sandbox-only operation and must be directed to a sandbox endpoint. Refer to [Fulfillment Outbound Dynamic Sandbox Guide](https://developer-docs.amazon.com/sp-api/docs/fulfillment-outbound-dynamic-sandbox-guide) and [Selling Partner API sandbox](https://developer-docs.amazon.com/sp-api/docs/the-selling-partner-api-sandbox) for more information.
* @param {string} sellerFulfillmentOrderId The identifier assigned to the item by the seller when the fulfillment order was created.
* @param {SubmitFulfillmentOrderStatusUpdateRequest} body The identifier assigned to the item by the seller when the fulfillment order was created.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
submitFulfillmentOrderStatusUpdate: async (sellerFulfillmentOrderId, body, options = {}) => {
// verify required parameter 'sellerFulfillmentOrderId' is not null or undefined
(0, common_1.assertParamExists)('submitFulfillmentOrderStatusUpdate', 'sellerFulfillmentOrderId', sellerFulfillmentOrderId);
// verify required parameter 'body' is not null or undefined
(0, common_1.assertParamExists)('submitFulfillmentOrderStatusUpdate', 'body', body);
const localVarPath = `/fba/outbound/2020-07-01/fulfillmentOrders/{sellerFulfillmentOrderId}/status`
.replace(`{${"sellerFulfillmentOrderId"}}`, encodeURIComponent(String(sellerFulfillmentOrderId)));
// 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, options.query);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration);
return {
url: (0, common_1.toPathString)(local