@sp-api-sdk/orders-api-v0
Version:
Use the Orders Selling Partner API to programmatically retrieve order information. With this API, you can develop fast, flexible, and custom applications to manage order synchronization, perform order research, and create demand-based decision support too
511 lines • 88 kB
JavaScript
/* tslint:disable */
/* eslint-disable */
/**
* Selling Partner API for Orders
* Use the Orders Selling Partner API to programmatically retrieve order information. With this API, you can develop fast, flexible, and custom applications to manage order synchronization, perform order research, and create demand-based decision support tools. _Note:_ For the JP, AU, and SG marketplaces, the Orders API supports orders from 2016 onward. For all other marketplaces, the Orders API supports orders for the last two years (orders older than this don\'t show up in the response).
*
* The version of the OpenAPI document: v0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import globalAxios from 'axios';
// Some imports not used depending on template conditions
// @ts-ignore
import { DUMMY_BASE_URL, assertParamExists, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, operationServerMap } from '../base';
/**
* OrdersApi - axios parameter creator
*/
export const OrdersApiAxiosParamCreator = function (configuration) {
return {
/**
* Updates the shipment confirmation status for a specified order. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 10 | The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
* @param {string} orderId An Amazon-defined order identifier, in 3-7-7 format.
* @param {ConfirmShipmentRequest} payload Request body of `confirmShipment`.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
confirmShipment: async (orderId, payload, options = {}) => {
// verify required parameter 'orderId' is not null or undefined
assertParamExists('confirmShipment', 'orderId', orderId);
// verify required parameter 'payload' is not null or undefined
assertParamExists('confirmShipment', 'payload', payload);
const localVarPath = `/orders/v0/orders/{orderId}/shipmentConfirmation`
.replace(`{${"orderId"}}`, encodeURIComponent(String(orderId)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
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';
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
localVarRequestOptions.data = serializeDataIfNeeded(payload, localVarRequestOptions, configuration);
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Returns the order that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
* @param {string} orderId An Amazon-defined order identifier, in 3-7-7 format.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getOrder: async (orderId, options = {}) => {
// verify required parameter 'orderId' is not null or undefined
assertParamExists('getOrder', 'orderId', orderId);
const localVarPath = `/orders/v0/orders/{orderId}`
.replace(`{${"orderId"}}`, encodeURIComponent(String(orderId)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
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 = {};
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Returns the shipping address for the order that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
* @param {string} orderId The Amazon order identifier in 3-7-7 format.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getOrderAddress: async (orderId, options = {}) => {
// verify required parameter 'orderId' is not null or undefined
assertParamExists('getOrderAddress', 'orderId', orderId);
const localVarPath = `/orders/v0/orders/{orderId}/address`
.replace(`{${"orderId"}}`, encodeURIComponent(String(orderId)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
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 = {};
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Returns buyer information for the order that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
* @param {string} orderId The Amazon order identifier in 3-7-7 format.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getOrderBuyerInfo: async (orderId, options = {}) => {
// verify required parameter 'orderId' is not null or undefined
assertParamExists('getOrderBuyerInfo', 'orderId', orderId);
const localVarPath = `/orders/v0/orders/{orderId}/buyerInfo`
.replace(`{${"orderId"}}`, encodeURIComponent(String(orderId)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
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 = {};
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Returns detailed order item information for the order that you specify. If `NextToken` is provided, it\'s used to retrieve the next page of order items. __Note__: When an order is in the Pending state (the order has been placed but payment has not been authorized), the getOrderItems operation does not return information about pricing, taxes, shipping charges, gift status or promotions for the order items in the order. After an order leaves the Pending state (this occurs when payment has been authorized) and enters the Unshipped, Partially Shipped, or Shipped state, the getOrderItems operation returns information about pricing, taxes, shipping charges, gift status and promotions for the order items in the order. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
* @param {string} orderId An Amazon-defined order identifier, in 3-7-7 format.
* @param {string} [nextToken] A string token returned in the response of your previous request.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getOrderItems: async (orderId, nextToken, options = {}) => {
// verify required parameter 'orderId' is not null or undefined
assertParamExists('getOrderItems', 'orderId', orderId);
const localVarPath = `/orders/v0/orders/{orderId}/orderItems`
.replace(`{${"orderId"}}`, encodeURIComponent(String(orderId)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
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 (nextToken !== undefined) {
localVarQueryParameter['NextToken'] = nextToken;
}
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Returns buyer information for the order items in the order that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
* @param {string} orderId An Amazon-defined order identifier, in 3-7-7 format.
* @param {string} [nextToken] A string token returned in the response of your previous request.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getOrderItemsBuyerInfo: async (orderId, nextToken, options = {}) => {
// verify required parameter 'orderId' is not null or undefined
assertParamExists('getOrderItemsBuyerInfo', 'orderId', orderId);
const localVarPath = `/orders/v0/orders/{orderId}/orderItems/buyerInfo`
.replace(`{${"orderId"}}`, encodeURIComponent(String(orderId)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
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 (nextToken !== undefined) {
localVarQueryParameter['NextToken'] = nextToken;
}
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Returns regulated information for the order that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
* @param {string} orderId The Amazon order identifier in 3-7-7 format.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getOrderRegulatedInfo: async (orderId, options = {}) => {
// verify required parameter 'orderId' is not null or undefined
assertParamExists('getOrderRegulatedInfo', 'orderId', orderId);
const localVarPath = `/orders/v0/orders/{orderId}/regulatedInfo`
.replace(`{${"orderId"}}`, encodeURIComponent(String(orderId)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
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 = {};
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Returns orders that are created or updated during the specified time period. If you want to return specific types of orders, you can apply filters to your request. `NextToken` doesn\'t affect any filters that you include in your request; it only impacts the pagination for the filtered orders response. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 20 | The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
* @param {Array<string>} marketplaceIds A list of `MarketplaceId` values. Used to select orders that were placed in the specified marketplaces. Refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids) for a complete list of `marketplaceId` values.
* @param {string} [createdAfter] Use this date to select orders created after (or at) a specified time. Only orders placed after the specified time are returned. The date must be in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format. **Note**: Either the `CreatedAfter` parameter or the `LastUpdatedAfter` parameter is required. Both cannot be empty. `LastUpdatedAfter` and `LastUpdatedBefore` cannot be set when `CreatedAfter` is set.
* @param {string} [createdBefore] Use this date to select orders created before (or at) a specified time. Only orders placed before the specified time are returned. The date must be in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format. **Note**: `CreatedBefore` is optional when `CreatedAfter` is set. If specified, `CreatedBefore` must be equal to or after the `CreatedAfter` date and at least two minutes before current time.
* @param {string} [lastUpdatedAfter] Use this date to select orders that were last updated after (or at) a specified time. An update is defined as any change in order status, including the creation of a new order. Includes updates made by Amazon and by the seller. The date must be in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format. **Note**: Either the `CreatedAfter` parameter or the `LastUpdatedAfter` parameter is required. Both cannot be empty. `CreatedAfter` or `CreatedBefore` cannot be set when `LastUpdatedAfter` is set.
* @param {string} [lastUpdatedBefore] Use this date to select orders that were last updated before (or at) a specified time. An update is defined as any change in order status, including the creation of a new order. Includes updates made by Amazon and by the seller. The date must be in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format. **Note**: `LastUpdatedBefore` is optional when `LastUpdatedAfter` is set. But if specified, `LastUpdatedBefore` must be equal to or after the `LastUpdatedAfter` date and at least two minutes before current time.
* @param {Array<string>} [orderStatuses] A list of `OrderStatus` values used to filter the results. **Possible values:** - `PendingAvailability` (This status is available for pre-orders only. The order has been placed, payment has not been authorized, and the release date of the item is in the future.) - `Pending` (The order has been placed but payment has not been authorized.) - `Unshipped` (Payment has been authorized and the order is ready for shipment, but no items in the order have been shipped.) - `PartiallyShipped` (One or more, but not all, items in the order have been shipped.) - `Shipped` (All items in the order have been shipped.) - `InvoiceUnconfirmed` (All items in the order have been shipped. The seller has not yet given confirmation to Amazon that the invoice has been shipped to the buyer.) - `Canceled` (The order has been canceled.) - `Unfulfillable` (The order cannot be fulfilled. This state applies only to Multi-Channel Fulfillment orders.)
* @param {Array<string>} [fulfillmentChannels] A list that indicates how an order was fulfilled. Filters the results by fulfillment channel. **Possible values**: `AFN` (fulfilled by Amazon), `MFN` (fulfilled by seller).
* @param {Array<string>} [paymentMethods] A list of payment method values. Use this field to select orders that were paid with the specified payment methods. **Possible values**: `COD` (cash on delivery), `CVS` (convenience store), `Other` (Any payment method other than COD or CVS).
* @param {string} [buyerEmail] The email address of a buyer. Used to select orders that contain the specified email address.
* @param {string} [sellerOrderId] An order identifier that is specified by the seller. Used to select only the orders that match the order identifier. If `SellerOrderId` is specified, then `FulfillmentChannels`, `OrderStatuses`, `PaymentMethod`, `LastUpdatedAfter`, LastUpdatedBefore, and `BuyerEmail` cannot be specified.
* @param {number} [maxResultsPerPage] A number that indicates the maximum number of orders that can be returned per page. Value must be 1 - 100. Default 100.
* @param {Array<string>} [easyShipShipmentStatuses] A list of `EasyShipShipmentStatus` values. Used to select Easy Ship orders with statuses that match the specified values. If `EasyShipShipmentStatus` is specified, only Amazon Easy Ship orders are returned. **Possible values:** - `PendingSchedule` (The package is awaiting the schedule for pick-up.) - `PendingPickUp` (Amazon has not yet picked up the package from the seller.) - `PendingDropOff` (The seller will deliver the package to the carrier.) - `LabelCanceled` (The seller canceled the pickup.) - `PickedUp` (Amazon has picked up the package from the seller.) - `DroppedOff` (The package is delivered to the carrier by the seller.) - `AtOriginFC` (The packaged is at the origin fulfillment center.) - `AtDestinationFC` (The package is at the destination fulfillment center.) - `Delivered` (The package has been delivered.) - `RejectedByBuyer` (The package has been rejected by the buyer.) - `Undeliverable` (The package cannot be delivered.) - `ReturningToSeller` (The package was not delivered and is being returned to the seller.) - `ReturnedToSeller` (The package was not delivered and was returned to the seller.) - `Lost` (The package is lost.) - `OutForDelivery` (The package is out for delivery.) - `Damaged` (The package was damaged by the carrier.)
* @param {Array<string>} [electronicInvoiceStatuses] A list of `ElectronicInvoiceStatus` values. Used to select orders with electronic invoice statuses that match the specified values. **Possible values:** - `NotRequired` (Electronic invoice submission is not required for this order.) - `NotFound` (The electronic invoice was not submitted for this order.) - `Processing` (The electronic invoice is being processed for this order.) - `Errored` (The last submitted electronic invoice was rejected for this order.) - `Accepted` (The last submitted electronic invoice was submitted and accepted.)
* @param {string} [nextToken] A string token returned in the response of your previous request.
* @param {Array<string>} [amazonOrderIds] A list of `AmazonOrderId` values. An `AmazonOrderId` is an Amazon-defined order identifier, in 3-7-7 format.
* @param {string} [actualFulfillmentSupplySourceId] The `sourceId` of the location from where you want the order fulfilled.
* @param {boolean} [isISPU] When true, this order is marked to be picked up from a store rather than delivered.
* @param {string} [storeChainStoreId] The store chain store identifier. Linked to a specific store in a store chain.
* @param {string} [earliestDeliveryDateBefore] Use this date to select orders with a earliest delivery date before (or at) a specified time. The date must be in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format.
* @param {string} [earliestDeliveryDateAfter] Use this date to select orders with a earliest delivery date after (or at) a specified time. The date must be in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format.
* @param {string} [latestDeliveryDateBefore] Use this date to select orders with a latest delivery date before (or at) a specified time. The date must be in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format.
* @param {string} [latestDeliveryDateAfter] Use this date to select orders with a latest delivery date after (or at) a specified time. The date must be in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getOrders: async (marketplaceIds, createdAfter, createdBefore, lastUpdatedAfter, lastUpdatedBefore, orderStatuses, fulfillmentChannels, paymentMethods, buyerEmail, sellerOrderId, maxResultsPerPage, easyShipShipmentStatuses, electronicInvoiceStatuses, nextToken, amazonOrderIds, actualFulfillmentSupplySourceId, isISPU, storeChainStoreId, earliestDeliveryDateBefore, earliestDeliveryDateAfter, latestDeliveryDateBefore, latestDeliveryDateAfter, options = {}) => {
// verify required parameter 'marketplaceIds' is not null or undefined
assertParamExists('getOrders', 'marketplaceIds', marketplaceIds);
const localVarPath = `/orders/v0/orders`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
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 (createdAfter !== undefined) {
localVarQueryParameter['CreatedAfter'] = createdAfter;
}
if (createdBefore !== undefined) {
localVarQueryParameter['CreatedBefore'] = createdBefore;
}
if (lastUpdatedAfter !== undefined) {
localVarQueryParameter['LastUpdatedAfter'] = lastUpdatedAfter;
}
if (lastUpdatedBefore !== undefined) {
localVarQueryParameter['LastUpdatedBefore'] = lastUpdatedBefore;
}
if (orderStatuses) {
localVarQueryParameter['OrderStatuses'] = orderStatuses.join(COLLECTION_FORMATS.csv);
}
if (marketplaceIds) {
localVarQueryParameter['MarketplaceIds'] = marketplaceIds.join(COLLECTION_FORMATS.csv);
}
if (fulfillmentChannels) {
localVarQueryParameter['FulfillmentChannels'] = fulfillmentChannels.join(COLLECTION_FORMATS.csv);
}
if (paymentMethods) {
localVarQueryParameter['PaymentMethods'] = paymentMethods.join(COLLECTION_FORMATS.csv);
}
if (buyerEmail !== undefined) {
localVarQueryParameter['BuyerEmail'] = buyerEmail;
}
if (sellerOrderId !== undefined) {
localVarQueryParameter['SellerOrderId'] = sellerOrderId;
}
if (maxResultsPerPage !== undefined) {
localVarQueryParameter['MaxResultsPerPage'] = maxResultsPerPage;
}
if (easyShipShipmentStatuses) {
localVarQueryParameter['EasyShipShipmentStatuses'] = easyShipShipmentStatuses.join(COLLECTION_FORMATS.csv);
}
if (electronicInvoiceStatuses) {
localVarQueryParameter['ElectronicInvoiceStatuses'] = electronicInvoiceStatuses.join(COLLECTION_FORMATS.csv);
}
if (nextToken !== undefined) {
localVarQueryParameter['NextToken'] = nextToken;
}
if (amazonOrderIds) {
localVarQueryParameter['AmazonOrderIds'] = amazonOrderIds.join(COLLECTION_FORMATS.csv);
}
if (actualFulfillmentSupplySourceId !== undefined) {
localVarQueryParameter['ActualFulfillmentSupplySourceId'] = actualFulfillmentSupplySourceId;
}
if (isISPU !== undefined) {
localVarQueryParameter['IsISPU'] = isISPU;
}
if (storeChainStoreId !== undefined) {
localVarQueryParameter['StoreChainStoreId'] = storeChainStoreId;
}
if (earliestDeliveryDateBefore !== undefined) {
localVarQueryParameter['EarliestDeliveryDateBefore'] = earliestDeliveryDateBefore;
}
if (earliestDeliveryDateAfter !== undefined) {
localVarQueryParameter['EarliestDeliveryDateAfter'] = earliestDeliveryDateAfter;
}
if (latestDeliveryDateBefore !== undefined) {
localVarQueryParameter['LatestDeliveryDateBefore'] = latestDeliveryDateBefore;
}
if (latestDeliveryDateAfter !== undefined) {
localVarQueryParameter['LatestDeliveryDateAfter'] = latestDeliveryDateAfter;
}
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Update the shipment status for an order that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 15 | The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
* @param {string} orderId An Amazon-defined order identifier, in 3-7-7 format.
* @param {UpdateShipmentStatusRequest} payload The request body for the `updateShipmentStatus` operation.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updateShipmentStatus: async (orderId, payload, options = {}) => {
// verify required parameter 'orderId' is not null or undefined
assertParamExists('updateShipmentStatus', 'orderId', orderId);
// verify required parameter 'payload' is not null or undefined
assertParamExists('updateShipmentStatus', 'payload', payload);
const localVarPath = `/orders/v0/orders/{orderId}/shipment`
.replace(`{${"orderId"}}`, encodeURIComponent(String(orderId)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
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';
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
localVarRequestOptions.data = serializeDataIfNeeded(payload, localVarRequestOptions, configuration);
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Updates (approves or rejects) the verification status of an order containing regulated products. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
* @param {string} orderId The Amazon order identifier in 3-7-7 format.
* @param {UpdateVerificationStatusRequest} payload The request body for the `updateVerificationStatus` operation.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updateVerificationStatus: async (orderId, payload, options = {}) => {
// verify required parameter 'orderId' is not null or undefined
assertParamExists('updateVerificationStatus', 'orderId', orderId);
// verify required parameter 'payload' is not null or undefined
assertParamExists('updateVerificationStatus', 'payload', payload);
const localVarPath = `/orders/v0/orders/{orderId}/regulatedInfo`
.replace(`{${"orderId"}}`, encodeURIComponent(String(orderId)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options };
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
localVarHeaderParameter['Content-Type'] = 'application/json';
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
localVarRequestOptions.data = serializeDataIfNeeded(payload, localVarRequestOptions, configuration);
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
};
};
/**
* OrdersApi - functional programming interface
*/
export const OrdersApiFp = function (configuration) {
const localVarAxiosParamCreator = OrdersApiAxiosParamCreator(configuration);
return {
/**
* Updates the shipment confirmation status for a specified order. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 10 | The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
* @param {string} orderId An Amazon-defined order identifier, in 3-7-7 format.
* @param {ConfirmShipmentRequest} payload Request body of `confirmShipment`.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async confirmShipment(orderId, payload, options) {
const localVarAxiosArgs = await localVarAxiosParamCreator.confirmShipment(orderId, payload, options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = operationServerMap['OrdersApi.confirmShipment']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},
/**
* Returns the order that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
* @param {string} orderId An Amazon-defined order identifier, in 3-7-7 format.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getOrder(orderId, options) {
const localVarAxiosArgs = await localVarAxiosParamCreator.getOrder(orderId, options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = operationServerMap['OrdersApi.getOrder']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},
/**
* Returns the shipping address for the order that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
* @param {string} orderId The Amazon order identifier in 3-7-7 format.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getOrderAddress(orderId, options) {
const localVarAxiosArgs = await localVarAxiosParamCreator.getOrderAddress(orderId, options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = operationServerMap['OrdersApi.getOrderAddress']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},
/**
* Returns buyer information for the order that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
* @param {string} orderId The Amazon order identifier in 3-7-7 format.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getOrderBuyerInfo(orderId, options) {
const localVarAxiosArgs = await localVarAxiosParamCreator.getOrderBuyerInfo(orderId, options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = operationServerMap['OrdersApi.getOrderBuyerInfo']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},
/**
* Returns detailed order item information for the order that you specify. If `NextToken` is provided, it\'s used to retrieve the next page of order items. __Note__: When an order is in the Pending state (the order has been placed but payment has not been authorized), the getOrderItems operation does not return information about pricing, taxes, shipping charges, gift status or promotions for the order items in the order. After an order leaves the Pending state (this occurs when payment has been authorized) and enters the Unshipped, Partially Shipped, or Shipped state, the getOrderItems operation returns information about pricing, taxes, shipping charges, gift status and promotions for the order items in the order. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
* @param {string} orderId An Amazon-defined order identifier, in 3-7-7 format.
* @param {string} [nextToken] A string token returned in the response of your previous request.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getOrderItems(orderId, nextToken, options) {
const localVarAxiosArgs = await localVarAxiosParamCreator.getOrderItems(orderId, nextToken, options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = operationServerMap['OrdersApi.getOrderItems']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},
/**
* Returns buyer information for the order items in the order that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
* @param {string} orderId An Amazon-defined order identifier, in 3-7-7 format.
* @param {string} [nextToken] A string token returned in the response of your previous request.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getOrderItemsBuyerInfo(orderId, nextToken, options) {
const localVarAxiosArgs = await localVarAxiosParamCreator.getOrderItemsBuyerInfo(orderId, nextToken, options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = operationServerMap['OrdersApi.getOrderItemsBuyerInfo']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},
/**
* Returns regulated information for the order that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
* @param {string} orderId The Amazon order identifier in 3-7-7 format.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getOrderRegulatedInfo(orderId, options) {
const localVarAxiosArgs = await localVarAxiosParamCreator.getOrderRegulatedInfo(orderId, options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = operationServerMap['OrdersApi.getOrderRegulatedInfo']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},
/**
* Returns orders that are created or updated during the specified time period. If you want to return specific types of orders, you can apply filters to your request. `NextToken` doesn\'t affect any filters that you include in your request; it only impacts the pagination for the filtered orders response. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 20 | The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
* @param {Array<string>} marketplaceIds A list of `MarketplaceId` values. Used to select orders that were placed in the specified marketplaces. Refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-a