@sp-api-sdk/external-fulfillment-shipments-api-2024-09-11 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +99 -0
- package/dist/cjs/api-model/api/external-fulfillment-shipments-api.js +766 -0
- package/dist/cjs/api-model/api.js +30 -0
- package/dist/cjs/api-model/base.js +52 -0
- package/dist/cjs/api-model/common.js +108 -0
- package/dist/cjs/api-model/configuration.js +87 -0
- package/dist/cjs/api-model/index.js +32 -0
- package/dist/cjs/api-model/models/address.js +15 -0
- package/dist/cjs/api-model/models/amount.js +15 -0
- package/dist/cjs/api-model/models/cancellation.js +21 -0
- package/dist/cjs/api-model/models/charge-breakup.js +15 -0
- package/dist/cjs/api-model/models/charge.js +23 -0
- package/dist/cjs/api-model/models/compliance-attributes.js +15 -0
- package/dist/cjs/api-model/models/courier-supported-attributes.js +15 -0
- package/dist/cjs/api-model/models/custom-attribute-type.js +26 -0
- package/dist/cjs/api-model/models/custom-attribute.js +15 -0
- package/dist/cjs/api-model/models/dimension.js +20 -0
- package/dist/cjs/api-model/models/document-v2.js +15 -0
- package/dist/cjs/api-model/models/document.js +22 -0
- package/dist/cjs/api-model/models/error-list.js +15 -0
- package/dist/cjs/api-model/models/gift-attributes.js +15 -0
- package/dist/cjs/api-model/models/index.js +73 -0
- package/dist/cjs/api-model/models/invoice-info.js +15 -0
- package/dist/cjs/api-model/models/invoice-requirement.js +25 -0
- package/dist/cjs/api-model/models/invoice-response.js +15 -0
- package/dist/cjs/api-model/models/line-item-with-reason.js +20 -0
- package/dist/cjs/api-model/models/line-item.js +15 -0
- package/dist/cjs/api-model/models/marketplace-attributes.js +20 -0
- package/dist/cjs/api-model/models/model-error.js +15 -0
- package/dist/cjs/api-model/models/original-line-item.js +15 -0
- package/dist/cjs/api-model/models/package-delivery-status.js +15 -0
- package/dist/cjs/api-model/models/package-dimensions.js +15 -0
- package/dist/cjs/api-model/models/package-line-item.js +15 -0
- package/dist/cjs/api-model/models/package-ship-label.js +15 -0
- package/dist/cjs/api-model/models/package-status.js +27 -0
- package/dist/cjs/api-model/models/package-sub-status.js +25 -0
- package/dist/cjs/api-model/models/package.js +29 -0
- package/dist/cjs/api-model/models/packages.js +15 -0
- package/dist/cjs/api-model/models/packing-slip-requirement.js +24 -0
- package/dist/cjs/api-model/models/pagination.js +15 -0
- package/dist/cjs/api-model/models/party-identification-info.js +22 -0
- package/dist/cjs/api-model/models/piece-type.js +23 -0
- package/dist/cjs/api-model/models/presence-status.js +23 -0
- package/dist/cjs/api-model/models/priority.js +23 -0
- package/dist/cjs/api-model/models/recommended-package-line-item.js +15 -0
- package/dist/cjs/api-model/models/recommended-package.js +15 -0
- package/dist/cjs/api-model/models/replaced-shipment-info.js +15 -0
- package/dist/cjs/api-model/models/requirement-level.js +23 -0
- package/dist/cjs/api-model/models/ship-label-metadata.js +15 -0
- package/dist/cjs/api-model/models/ship-labels-input.js +15 -0
- package/dist/cjs/api-model/models/ship-labels-response.js +15 -0
- package/dist/cjs/api-model/models/shipment-acknowledgement-request.js +15 -0
- package/dist/cjs/api-model/models/shipment-info.js +25 -0
- package/dist/cjs/api-model/models/shipment-line-item.js +15 -0
- package/dist/cjs/api-model/models/shipment-requirements.js +15 -0
- package/dist/cjs/api-model/models/shipment.js +44 -0
- package/dist/cjs/api-model/models/shipments-response.js +15 -0
- package/dist/cjs/api-model/models/shipping-info.js +20 -0
- package/dist/cjs/api-model/models/shipping-options-response.js +15 -0
- package/dist/cjs/api-model/models/shipping-options.js +22 -0
- package/dist/cjs/api-model/models/status.js +23 -0
- package/dist/cjs/api-model/models/tax-registration-info.js +20 -0
- package/dist/cjs/api-model/models/tax.js +27 -0
- package/dist/cjs/api-model/models/time-window.js +20 -0
- package/dist/cjs/api-model/models/weight.js +20 -0
- package/dist/cjs/client.js +13 -0
- package/dist/cjs/index.js +19 -0
- package/dist/es/api-model/api/external-fulfillment-shipments-api.js +756 -0
- package/dist/es/api-model/api.js +14 -0
- package/dist/es/api-model/base.js +44 -0
- package/dist/es/api-model/common.js +96 -0
- package/dist/es/api-model/configuration.js +83 -0
- package/dist/es/api-model/index.js +16 -0
- package/dist/es/api-model/models/address.js +14 -0
- package/dist/es/api-model/models/amount.js +14 -0
- package/dist/es/api-model/models/cancellation.js +18 -0
- package/dist/es/api-model/models/charge-breakup.js +14 -0
- package/dist/es/api-model/models/charge.js +20 -0
- package/dist/es/api-model/models/compliance-attributes.js +14 -0
- package/dist/es/api-model/models/courier-supported-attributes.js +14 -0
- package/dist/es/api-model/models/custom-attribute-type.js +23 -0
- package/dist/es/api-model/models/custom-attribute.js +14 -0
- package/dist/es/api-model/models/dimension.js +17 -0
- package/dist/es/api-model/models/document-v2.js +14 -0
- package/dist/es/api-model/models/document.js +19 -0
- package/dist/es/api-model/models/error-list.js +14 -0
- package/dist/es/api-model/models/gift-attributes.js +14 -0
- package/dist/es/api-model/models/index.js +57 -0
- package/dist/es/api-model/models/invoice-info.js +14 -0
- package/dist/es/api-model/models/invoice-requirement.js +22 -0
- package/dist/es/api-model/models/invoice-response.js +14 -0
- package/dist/es/api-model/models/line-item-with-reason.js +17 -0
- package/dist/es/api-model/models/line-item.js +14 -0
- package/dist/es/api-model/models/marketplace-attributes.js +17 -0
- package/dist/es/api-model/models/model-error.js +14 -0
- package/dist/es/api-model/models/original-line-item.js +14 -0
- package/dist/es/api-model/models/package-delivery-status.js +14 -0
- package/dist/es/api-model/models/package-dimensions.js +14 -0
- package/dist/es/api-model/models/package-line-item.js +14 -0
- package/dist/es/api-model/models/package-ship-label.js +14 -0
- package/dist/es/api-model/models/package-status.js +24 -0
- package/dist/es/api-model/models/package-sub-status.js +22 -0
- package/dist/es/api-model/models/package.js +26 -0
- package/dist/es/api-model/models/packages.js +14 -0
- package/dist/es/api-model/models/packing-slip-requirement.js +21 -0
- package/dist/es/api-model/models/pagination.js +14 -0
- package/dist/es/api-model/models/party-identification-info.js +19 -0
- package/dist/es/api-model/models/piece-type.js +20 -0
- package/dist/es/api-model/models/presence-status.js +20 -0
- package/dist/es/api-model/models/priority.js +20 -0
- package/dist/es/api-model/models/recommended-package-line-item.js +14 -0
- package/dist/es/api-model/models/recommended-package.js +14 -0
- package/dist/es/api-model/models/replaced-shipment-info.js +14 -0
- package/dist/es/api-model/models/requirement-level.js +20 -0
- package/dist/es/api-model/models/ship-label-metadata.js +14 -0
- package/dist/es/api-model/models/ship-labels-input.js +14 -0
- package/dist/es/api-model/models/ship-labels-response.js +14 -0
- package/dist/es/api-model/models/shipment-acknowledgement-request.js +14 -0
- package/dist/es/api-model/models/shipment-info.js +22 -0
- package/dist/es/api-model/models/shipment-line-item.js +14 -0
- package/dist/es/api-model/models/shipment-requirements.js +14 -0
- package/dist/es/api-model/models/shipment.js +41 -0
- package/dist/es/api-model/models/shipments-response.js +14 -0
- package/dist/es/api-model/models/shipping-info.js +17 -0
- package/dist/es/api-model/models/shipping-options-response.js +14 -0
- package/dist/es/api-model/models/shipping-options.js +19 -0
- package/dist/es/api-model/models/status.js +20 -0
- package/dist/es/api-model/models/tax-registration-info.js +17 -0
- package/dist/es/api-model/models/tax.js +24 -0
- package/dist/es/api-model/models/time-window.js +17 -0
- package/dist/es/api-model/models/weight.js +17 -0
- package/dist/es/client.js +9 -0
- package/dist/es/index.js +3 -0
- package/dist/types/api-model/api/external-fulfillment-shipments-api.d.ts +556 -0
- package/dist/types/api-model/api.d.ts +12 -0
- package/dist/types/api-model/base.d.ts +42 -0
- package/dist/types/api-model/common.d.ts +28 -0
- package/dist/types/api-model/configuration.d.ts +74 -0
- package/dist/types/api-model/index.d.ts +14 -0
- package/dist/types/api-model/models/address.d.ts +72 -0
- package/dist/types/api-model/models/amount.d.ts +24 -0
- package/dist/types/api-model/models/cancellation.d.ts +38 -0
- package/dist/types/api-model/models/charge-breakup.d.ts +20 -0
- package/dist/types/api-model/models/charge.d.ts +37 -0
- package/dist/types/api-model/models/compliance-attributes.d.ts +21 -0
- package/dist/types/api-model/models/courier-supported-attributes.d.ts +24 -0
- package/dist/types/api-model/models/custom-attribute-type.d.ts +22 -0
- package/dist/types/api-model/models/custom-attribute.d.ts +26 -0
- package/dist/types/api-model/models/dimension.d.ts +29 -0
- package/dist/types/api-model/models/document-v2.d.ts +20 -0
- package/dist/types/api-model/models/document.d.ts +31 -0
- package/dist/types/api-model/models/error-list.d.ts +20 -0
- package/dist/types/api-model/models/gift-attributes.d.ts +26 -0
- package/dist/types/api-model/models/index.d.ts +57 -0
- package/dist/types/api-model/models/invoice-info.d.ts +24 -0
- package/dist/types/api-model/models/invoice-requirement.d.ts +35 -0
- package/dist/types/api-model/models/invoice-response.d.ts +18 -0
- package/dist/types/api-model/models/line-item-with-reason.d.ts +27 -0
- package/dist/types/api-model/models/line-item.d.ts +24 -0
- package/dist/types/api-model/models/marketplace-attributes.d.ts +37 -0
- package/dist/types/api-model/models/model-error.d.ts +28 -0
- package/dist/types/api-model/models/original-line-item.d.ts +29 -0
- package/dist/types/api-model/models/package-delivery-status.d.ts +24 -0
- package/dist/types/api-model/models/package-dimensions.d.ts +20 -0
- package/dist/types/api-model/models/package-line-item.d.ts +38 -0
- package/dist/types/api-model/models/package-ship-label.d.ts +27 -0
- package/dist/types/api-model/models/package-status.d.ts +23 -0
- package/dist/types/api-model/models/package-sub-status.d.ts +21 -0
- package/dist/types/api-model/models/package.d.ts +56 -0
- package/dist/types/api-model/models/packages.d.ts +21 -0
- package/dist/types/api-model/models/packing-slip-requirement.d.ts +34 -0
- package/dist/types/api-model/models/pagination.d.ts +20 -0
- package/dist/types/api-model/models/party-identification-info.d.ts +35 -0
- package/dist/types/api-model/models/piece-type.d.ts +19 -0
- package/dist/types/api-model/models/presence-status.d.ts +19 -0
- package/dist/types/api-model/models/priority.d.ts +19 -0
- package/dist/types/api-model/models/recommended-package-line-item.d.ts +20 -0
- package/dist/types/api-model/models/recommended-package.d.ts +25 -0
- package/dist/types/api-model/models/replaced-shipment-info.d.ts +31 -0
- package/dist/types/api-model/models/requirement-level.d.ts +19 -0
- package/dist/types/api-model/models/ship-label-metadata.d.ts +31 -0
- package/dist/types/api-model/models/ship-labels-input.d.ts +22 -0
- package/dist/types/api-model/models/ship-labels-response.d.ts +21 -0
- package/dist/types/api-model/models/shipment-acknowledgement-request.d.ts +25 -0
- package/dist/types/api-model/models/shipment-info.d.ts +55 -0
- package/dist/types/api-model/models/shipment-line-item.d.ts +75 -0
- package/dist/types/api-model/models/shipment-requirements.d.ts +20 -0
- package/dist/types/api-model/models/shipment.d.ts +104 -0
- package/dist/types/api-model/models/shipments-response.d.ts +23 -0
- package/dist/types/api-model/models/shipping-info.d.ts +40 -0
- package/dist/types/api-model/models/shipping-options-response.d.ts +22 -0
- package/dist/types/api-model/models/shipping-options.d.ts +38 -0
- package/dist/types/api-model/models/status.d.ts +19 -0
- package/dist/types/api-model/models/tax-registration-info.d.ts +35 -0
- package/dist/types/api-model/models/tax.d.ts +38 -0
- package/dist/types/api-model/models/time-window.d.ts +33 -0
- package/dist/types/api-model/models/weight.d.ts +29 -0
- package/dist/types/client.d.ts +6 -0
- package/dist/types/index.d.ts +3 -0
- package/package.json +44 -0
|
@@ -0,0 +1,756 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* The Selling Partner API for Amazon External Fulfillment Shipments Processing
|
|
5
|
+
* You can use the External Fulfillment Shipments API to retrieve, manage, and track shipments processed through Amazon\'s external fulfillment network. Use this API to get shipment details, monitor status changes, and access fulfillment requirements.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 2024-09-11
|
|
8
|
+
* Contact: marketplaceapitest@amazon.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
import globalAxios from 'axios';
|
|
15
|
+
// Some imports not used depending on template conditions
|
|
16
|
+
// @ts-ignore
|
|
17
|
+
import { DUMMY_BASE_URL, assertParamExists, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
|
|
18
|
+
// @ts-ignore
|
|
19
|
+
import { BASE_PATH, BaseAPI, operationServerMap } from '../base';
|
|
20
|
+
/**
|
|
21
|
+
* ExternalFulfillmentShipmentsApi - axios parameter creator
|
|
22
|
+
*/
|
|
23
|
+
export const ExternalFulfillmentShipmentsApiAxiosParamCreator = function (configuration) {
|
|
24
|
+
return {
|
|
25
|
+
/**
|
|
26
|
+
* Provide details about the packages in the specified shipment.
|
|
27
|
+
* @param {string} shipmentId The ID of the shipment.
|
|
28
|
+
* @param {Packages} body A list of packages in the shipment.
|
|
29
|
+
* @param {*} [options] Override http request option.
|
|
30
|
+
* @throws {RequiredError}
|
|
31
|
+
*/
|
|
32
|
+
createPackages: async (shipmentId, body, options = {}) => {
|
|
33
|
+
// verify required parameter 'shipmentId' is not null or undefined
|
|
34
|
+
assertParamExists('createPackages', 'shipmentId', shipmentId);
|
|
35
|
+
// verify required parameter 'body' is not null or undefined
|
|
36
|
+
assertParamExists('createPackages', 'body', body);
|
|
37
|
+
const localVarPath = `/externalFulfillment/2024-09-11/shipments/{shipmentId}/packages`
|
|
38
|
+
.replace(`{${"shipmentId"}}`, encodeURIComponent(String(shipmentId)));
|
|
39
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
40
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
41
|
+
let baseOptions;
|
|
42
|
+
if (configuration) {
|
|
43
|
+
baseOptions = configuration.baseOptions;
|
|
44
|
+
}
|
|
45
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
|
|
46
|
+
const localVarHeaderParameter = {};
|
|
47
|
+
const localVarQueryParameter = {};
|
|
48
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
49
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
50
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
51
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
52
|
+
localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration);
|
|
53
|
+
return {
|
|
54
|
+
url: toPathString(localVarUrlObj),
|
|
55
|
+
options: localVarRequestOptions,
|
|
56
|
+
};
|
|
57
|
+
},
|
|
58
|
+
/**
|
|
59
|
+
* Get invoices for the shipment you specify.
|
|
60
|
+
* @param {string} shipmentId The ID of the shipment whose invoice you want.
|
|
61
|
+
* @param {*} [options] Override http request option.
|
|
62
|
+
* @throws {RequiredError}
|
|
63
|
+
*/
|
|
64
|
+
generateInvoice: async (shipmentId, options = {}) => {
|
|
65
|
+
// verify required parameter 'shipmentId' is not null or undefined
|
|
66
|
+
assertParamExists('generateInvoice', 'shipmentId', shipmentId);
|
|
67
|
+
const localVarPath = `/externalFulfillment/2024-09-11/shipments/{shipmentId}/invoice`
|
|
68
|
+
.replace(`{${"shipmentId"}}`, encodeURIComponent(String(shipmentId)));
|
|
69
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
70
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
71
|
+
let baseOptions;
|
|
72
|
+
if (configuration) {
|
|
73
|
+
baseOptions = configuration.baseOptions;
|
|
74
|
+
}
|
|
75
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
|
|
76
|
+
const localVarHeaderParameter = {};
|
|
77
|
+
const localVarQueryParameter = {};
|
|
78
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
79
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
80
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
81
|
+
return {
|
|
82
|
+
url: toPathString(localVarUrlObj),
|
|
83
|
+
options: localVarRequestOptions,
|
|
84
|
+
};
|
|
85
|
+
},
|
|
86
|
+
/**
|
|
87
|
+
* Generate and retrieve all shipping labels for one or more packages in the shipment you specify.
|
|
88
|
+
* @param {string} shipmentId The ID of the shipment whose shipping labels you want to generate and retrieve.
|
|
89
|
+
* @param {GenerateShipLabelsOperationEnum} operation Specify whether you want to generate or regenerate a label.
|
|
90
|
+
* @param {string} [shippingOptionId] The ID of the shipping option whose shipping labels you want.
|
|
91
|
+
* @param {ShipLabelsInput} [body] Shipping details for when shipping is not done by the marketplace channel.
|
|
92
|
+
* @param {*} [options] Override http request option.
|
|
93
|
+
* @throws {RequiredError}
|
|
94
|
+
*/
|
|
95
|
+
generateShipLabels: async (shipmentId, operation, shippingOptionId, body, options = {}) => {
|
|
96
|
+
// verify required parameter 'shipmentId' is not null or undefined
|
|
97
|
+
assertParamExists('generateShipLabels', 'shipmentId', shipmentId);
|
|
98
|
+
// verify required parameter 'operation' is not null or undefined
|
|
99
|
+
assertParamExists('generateShipLabels', 'operation', operation);
|
|
100
|
+
const localVarPath = `/externalFulfillment/2024-09-11/shipments/{shipmentId}/shipLabels`
|
|
101
|
+
.replace(`{${"shipmentId"}}`, encodeURIComponent(String(shipmentId)));
|
|
102
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
103
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
104
|
+
let baseOptions;
|
|
105
|
+
if (configuration) {
|
|
106
|
+
baseOptions = configuration.baseOptions;
|
|
107
|
+
}
|
|
108
|
+
const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options };
|
|
109
|
+
const localVarHeaderParameter = {};
|
|
110
|
+
const localVarQueryParameter = {};
|
|
111
|
+
if (shippingOptionId !== undefined) {
|
|
112
|
+
localVarQueryParameter['shippingOptionId'] = shippingOptionId;
|
|
113
|
+
}
|
|
114
|
+
if (operation !== undefined) {
|
|
115
|
+
localVarQueryParameter['operation'] = operation;
|
|
116
|
+
}
|
|
117
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
118
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
119
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
120
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
121
|
+
localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration);
|
|
122
|
+
return {
|
|
123
|
+
url: toPathString(localVarUrlObj),
|
|
124
|
+
options: localVarRequestOptions,
|
|
125
|
+
};
|
|
126
|
+
},
|
|
127
|
+
/**
|
|
128
|
+
* Get a single shipment with the ID you specify.
|
|
129
|
+
* @param {string} shipmentId The ID of the shipment you want to retrieve.
|
|
130
|
+
* @param {*} [options] Override http request option.
|
|
131
|
+
* @throws {RequiredError}
|
|
132
|
+
*/
|
|
133
|
+
getShipment: async (shipmentId, options = {}) => {
|
|
134
|
+
// verify required parameter 'shipmentId' is not null or undefined
|
|
135
|
+
assertParamExists('getShipment', 'shipmentId', shipmentId);
|
|
136
|
+
const localVarPath = `/externalFulfillment/2024-09-11/shipments/{shipmentId}`
|
|
137
|
+
.replace(`{${"shipmentId"}}`, encodeURIComponent(String(shipmentId)));
|
|
138
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
139
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
140
|
+
let baseOptions;
|
|
141
|
+
if (configuration) {
|
|
142
|
+
baseOptions = configuration.baseOptions;
|
|
143
|
+
}
|
|
144
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
145
|
+
const localVarHeaderParameter = {};
|
|
146
|
+
const localVarQueryParameter = {};
|
|
147
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
148
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
149
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
150
|
+
return {
|
|
151
|
+
url: toPathString(localVarUrlObj),
|
|
152
|
+
options: localVarRequestOptions,
|
|
153
|
+
};
|
|
154
|
+
},
|
|
155
|
+
/**
|
|
156
|
+
* Get a list of shipments created for the seller in the status you specify. Shipments can be further filtered based on the fulfillment node or the time of the shipments\' last update.
|
|
157
|
+
* @param {GetShipmentsStatusEnum} status The status of shipment you want to include in the response. To retrieve all new shipments, set this value to `ACCEPTED`.
|
|
158
|
+
* @param {string} [locationId] The Amazon channel location identifier for the shipments you want to retrieve.
|
|
159
|
+
* @param {string} [marketplaceId] The marketplace ID associated with the location. To find the ID for your marketplace, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids).
|
|
160
|
+
* @param {string} [channelName] The channel name associated with the location.
|
|
161
|
+
* @param {string} [lastUpdatedAfter] The response includes shipments whose latest update is after the specified time. In [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format.
|
|
162
|
+
* @param {string} [lastUpdatedBefore] The response includes shipments whose latest update is before the specified time. In [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format.
|
|
163
|
+
* @param {number} [maxResults] The maximum number of shipments to include in the response.
|
|
164
|
+
* @param {string} [paginationToken] A token that you use to retrieve the next page of results. The response includes `nextToken` when there are multiple pages of results. To get the next page of results, call the operation with this token and include the same arguments as the call that produced the token. To get a complete list, call this operation until `nextToken` is null. Note that this operation can return empty pages.
|
|
165
|
+
* @param {*} [options] Override http request option.
|
|
166
|
+
* @throws {RequiredError}
|
|
167
|
+
*/
|
|
168
|
+
getShipments: async (status, locationId, marketplaceId, channelName, lastUpdatedAfter, lastUpdatedBefore, maxResults, paginationToken, options = {}) => {
|
|
169
|
+
// verify required parameter 'status' is not null or undefined
|
|
170
|
+
assertParamExists('getShipments', 'status', status);
|
|
171
|
+
const localVarPath = `/externalFulfillment/2024-09-11/shipments`;
|
|
172
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
173
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
174
|
+
let baseOptions;
|
|
175
|
+
if (configuration) {
|
|
176
|
+
baseOptions = configuration.baseOptions;
|
|
177
|
+
}
|
|
178
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
179
|
+
const localVarHeaderParameter = {};
|
|
180
|
+
const localVarQueryParameter = {};
|
|
181
|
+
if (locationId !== undefined) {
|
|
182
|
+
localVarQueryParameter['locationId'] = locationId;
|
|
183
|
+
}
|
|
184
|
+
if (marketplaceId !== undefined) {
|
|
185
|
+
localVarQueryParameter['marketplaceId'] = marketplaceId;
|
|
186
|
+
}
|
|
187
|
+
if (channelName !== undefined) {
|
|
188
|
+
localVarQueryParameter['channelName'] = channelName;
|
|
189
|
+
}
|
|
190
|
+
if (status !== undefined) {
|
|
191
|
+
localVarQueryParameter['status'] = status;
|
|
192
|
+
}
|
|
193
|
+
if (lastUpdatedAfter !== undefined) {
|
|
194
|
+
localVarQueryParameter['lastUpdatedAfter'] = (lastUpdatedAfter instanceof Date) ?
|
|
195
|
+
lastUpdatedAfter.toISOString() :
|
|
196
|
+
lastUpdatedAfter;
|
|
197
|
+
}
|
|
198
|
+
if (lastUpdatedBefore !== undefined) {
|
|
199
|
+
localVarQueryParameter['lastUpdatedBefore'] = (lastUpdatedBefore instanceof Date) ?
|
|
200
|
+
lastUpdatedBefore.toISOString() :
|
|
201
|
+
lastUpdatedBefore;
|
|
202
|
+
}
|
|
203
|
+
if (maxResults !== undefined) {
|
|
204
|
+
localVarQueryParameter['maxResults'] = maxResults;
|
|
205
|
+
}
|
|
206
|
+
if (paginationToken !== undefined) {
|
|
207
|
+
localVarQueryParameter['paginationToken'] = paginationToken;
|
|
208
|
+
}
|
|
209
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
210
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
211
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
212
|
+
return {
|
|
213
|
+
url: toPathString(localVarUrlObj),
|
|
214
|
+
options: localVarRequestOptions,
|
|
215
|
+
};
|
|
216
|
+
},
|
|
217
|
+
/**
|
|
218
|
+
* Confirm or reject the specified shipment.
|
|
219
|
+
* @param {string} shipmentId The ID of the shipment you want to confirm or reject.
|
|
220
|
+
* @param {ProcessShipmentOperationEnum} operation The status of the shipment.
|
|
221
|
+
* @param {ShipmentAcknowledgementRequest} [body] Information about the shipment and its line items.
|
|
222
|
+
* @param {*} [options] Override http request option.
|
|
223
|
+
* @throws {RequiredError}
|
|
224
|
+
*/
|
|
225
|
+
processShipment: async (shipmentId, operation, body, options = {}) => {
|
|
226
|
+
// verify required parameter 'shipmentId' is not null or undefined
|
|
227
|
+
assertParamExists('processShipment', 'shipmentId', shipmentId);
|
|
228
|
+
// verify required parameter 'operation' is not null or undefined
|
|
229
|
+
assertParamExists('processShipment', 'operation', operation);
|
|
230
|
+
const localVarPath = `/externalFulfillment/2024-09-11/shipments/{shipmentId}`
|
|
231
|
+
.replace(`{${"shipmentId"}}`, encodeURIComponent(String(shipmentId)));
|
|
232
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
233
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
234
|
+
let baseOptions;
|
|
235
|
+
if (configuration) {
|
|
236
|
+
baseOptions = configuration.baseOptions;
|
|
237
|
+
}
|
|
238
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
|
|
239
|
+
const localVarHeaderParameter = {};
|
|
240
|
+
const localVarQueryParameter = {};
|
|
241
|
+
if (operation !== undefined) {
|
|
242
|
+
localVarQueryParameter['operation'] = operation;
|
|
243
|
+
}
|
|
244
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
245
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
246
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
247
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
248
|
+
localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration);
|
|
249
|
+
return {
|
|
250
|
+
url: toPathString(localVarUrlObj),
|
|
251
|
+
options: localVarRequestOptions,
|
|
252
|
+
};
|
|
253
|
+
},
|
|
254
|
+
/**
|
|
255
|
+
* Retrieve invoices for the shipment you specify.
|
|
256
|
+
* @param {string} shipmentId The ID of the shipment whose invoice you want to retrieve.
|
|
257
|
+
* @param {*} [options] Override http request option.
|
|
258
|
+
* @throws {RequiredError}
|
|
259
|
+
*/
|
|
260
|
+
retrieveInvoice: async (shipmentId, options = {}) => {
|
|
261
|
+
// verify required parameter 'shipmentId' is not null or undefined
|
|
262
|
+
assertParamExists('retrieveInvoice', 'shipmentId', shipmentId);
|
|
263
|
+
const localVarPath = `/externalFulfillment/2024-09-11/shipments/{shipmentId}/invoice`
|
|
264
|
+
.replace(`{${"shipmentId"}}`, encodeURIComponent(String(shipmentId)));
|
|
265
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
266
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
267
|
+
let baseOptions;
|
|
268
|
+
if (configuration) {
|
|
269
|
+
baseOptions = configuration.baseOptions;
|
|
270
|
+
}
|
|
271
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
272
|
+
const localVarHeaderParameter = {};
|
|
273
|
+
const localVarQueryParameter = {};
|
|
274
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
275
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
276
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
277
|
+
return {
|
|
278
|
+
url: toPathString(localVarUrlObj),
|
|
279
|
+
options: localVarRequestOptions,
|
|
280
|
+
};
|
|
281
|
+
},
|
|
282
|
+
/**
|
|
283
|
+
* Get a list of shipping options for a package in a shipment given the shipment\'s marketplace and channel. If the marketplace and channel have a pre-determined shipping option, then this operation returns an empty response.
|
|
284
|
+
* @param {string} shipmentId The ID of the shipment to which the package belongs.
|
|
285
|
+
* @param {string} packageId The ID of the package for which you want to retrieve shipping options.
|
|
286
|
+
* @param {*} [options] Override http request option.
|
|
287
|
+
* @throws {RequiredError}
|
|
288
|
+
*/
|
|
289
|
+
retrieveShippingOptions: async (shipmentId, packageId, options = {}) => {
|
|
290
|
+
// verify required parameter 'shipmentId' is not null or undefined
|
|
291
|
+
assertParamExists('retrieveShippingOptions', 'shipmentId', shipmentId);
|
|
292
|
+
// verify required parameter 'packageId' is not null or undefined
|
|
293
|
+
assertParamExists('retrieveShippingOptions', 'packageId', packageId);
|
|
294
|
+
const localVarPath = `/externalFulfillment/2024-09-11/shipments/{shipmentId}/shippingOptions`
|
|
295
|
+
.replace(`{${"shipmentId"}}`, encodeURIComponent(String(shipmentId)));
|
|
296
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
297
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
298
|
+
let baseOptions;
|
|
299
|
+
if (configuration) {
|
|
300
|
+
baseOptions = configuration.baseOptions;
|
|
301
|
+
}
|
|
302
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
303
|
+
const localVarHeaderParameter = {};
|
|
304
|
+
const localVarQueryParameter = {};
|
|
305
|
+
if (packageId !== undefined) {
|
|
306
|
+
localVarQueryParameter['packageId'] = packageId;
|
|
307
|
+
}
|
|
308
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
309
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
310
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
311
|
+
return {
|
|
312
|
+
url: toPathString(localVarUrlObj),
|
|
313
|
+
options: localVarRequestOptions,
|
|
314
|
+
};
|
|
315
|
+
},
|
|
316
|
+
/**
|
|
317
|
+
* Updates the details about the packages that will be used to fulfill the specified shipment.
|
|
318
|
+
* @param {string} shipmentId The ID of the shipment to which the package belongs.
|
|
319
|
+
* @param {string} packageId The ID of the package whose information you want to update.
|
|
320
|
+
* @param {Package} body The body of the request.
|
|
321
|
+
* @param {*} [options] Override http request option.
|
|
322
|
+
* @throws {RequiredError}
|
|
323
|
+
*/
|
|
324
|
+
updatePackage: async (shipmentId, packageId, body, options = {}) => {
|
|
325
|
+
// verify required parameter 'shipmentId' is not null or undefined
|
|
326
|
+
assertParamExists('updatePackage', 'shipmentId', shipmentId);
|
|
327
|
+
// verify required parameter 'packageId' is not null or undefined
|
|
328
|
+
assertParamExists('updatePackage', 'packageId', packageId);
|
|
329
|
+
// verify required parameter 'body' is not null or undefined
|
|
330
|
+
assertParamExists('updatePackage', 'body', body);
|
|
331
|
+
const localVarPath = `/externalFulfillment/2024-09-11/shipments/{shipmentId}/packages/{packageId}`
|
|
332
|
+
.replace(`{${"shipmentId"}}`, encodeURIComponent(String(shipmentId)))
|
|
333
|
+
.replace(`{${"packageId"}}`, encodeURIComponent(String(packageId)));
|
|
334
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
335
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
336
|
+
let baseOptions;
|
|
337
|
+
if (configuration) {
|
|
338
|
+
baseOptions = configuration.baseOptions;
|
|
339
|
+
}
|
|
340
|
+
const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options };
|
|
341
|
+
const localVarHeaderParameter = {};
|
|
342
|
+
const localVarQueryParameter = {};
|
|
343
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
344
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
345
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
346
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
347
|
+
localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration);
|
|
348
|
+
return {
|
|
349
|
+
url: toPathString(localVarUrlObj),
|
|
350
|
+
options: localVarRequestOptions,
|
|
351
|
+
};
|
|
352
|
+
},
|
|
353
|
+
/**
|
|
354
|
+
* Updates the status of the packages.
|
|
355
|
+
* @param {string} shipmentId The ID of the shipment to which the package belongs.
|
|
356
|
+
* @param {string} packageId The ID of the package whose status you want to update.
|
|
357
|
+
* @param {UpdatePackageStatusStatusEnum} [status] **DEPRECATED**. Do not use. Package status is defined in the body parameter.
|
|
358
|
+
* @param {PackageDeliveryStatus} [body] The body of the request.
|
|
359
|
+
* @param {*} [options] Override http request option.
|
|
360
|
+
* @throws {RequiredError}
|
|
361
|
+
*/
|
|
362
|
+
updatePackageStatus: async (shipmentId, packageId, status, body, options = {}) => {
|
|
363
|
+
// verify required parameter 'shipmentId' is not null or undefined
|
|
364
|
+
assertParamExists('updatePackageStatus', 'shipmentId', shipmentId);
|
|
365
|
+
// verify required parameter 'packageId' is not null or undefined
|
|
366
|
+
assertParamExists('updatePackageStatus', 'packageId', packageId);
|
|
367
|
+
const localVarPath = `/externalFulfillment/2024-09-11/shipments/{shipmentId}/packages/{packageId}`
|
|
368
|
+
.replace(`{${"shipmentId"}}`, encodeURIComponent(String(shipmentId)))
|
|
369
|
+
.replace(`{${"packageId"}}`, encodeURIComponent(String(packageId)));
|
|
370
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
371
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
372
|
+
let baseOptions;
|
|
373
|
+
if (configuration) {
|
|
374
|
+
baseOptions = configuration.baseOptions;
|
|
375
|
+
}
|
|
376
|
+
const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options };
|
|
377
|
+
const localVarHeaderParameter = {};
|
|
378
|
+
const localVarQueryParameter = {};
|
|
379
|
+
if (status !== undefined) {
|
|
380
|
+
localVarQueryParameter['status'] = status;
|
|
381
|
+
}
|
|
382
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
383
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
384
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
385
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
386
|
+
localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration);
|
|
387
|
+
return {
|
|
388
|
+
url: toPathString(localVarUrlObj),
|
|
389
|
+
options: localVarRequestOptions,
|
|
390
|
+
};
|
|
391
|
+
},
|
|
392
|
+
};
|
|
393
|
+
};
|
|
394
|
+
/**
|
|
395
|
+
* ExternalFulfillmentShipmentsApi - functional programming interface
|
|
396
|
+
*/
|
|
397
|
+
export const ExternalFulfillmentShipmentsApiFp = function (configuration) {
|
|
398
|
+
const localVarAxiosParamCreator = ExternalFulfillmentShipmentsApiAxiosParamCreator(configuration);
|
|
399
|
+
return {
|
|
400
|
+
/**
|
|
401
|
+
* Provide details about the packages in the specified shipment.
|
|
402
|
+
* @param {string} shipmentId The ID of the shipment.
|
|
403
|
+
* @param {Packages} body A list of packages in the shipment.
|
|
404
|
+
* @param {*} [options] Override http request option.
|
|
405
|
+
* @throws {RequiredError}
|
|
406
|
+
*/
|
|
407
|
+
async createPackages(shipmentId, body, options) {
|
|
408
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.createPackages(shipmentId, body, options);
|
|
409
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
410
|
+
const localVarOperationServerBasePath = operationServerMap['ExternalFulfillmentShipmentsApi.createPackages']?.[localVarOperationServerIndex]?.url;
|
|
411
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
412
|
+
},
|
|
413
|
+
/**
|
|
414
|
+
* Get invoices for the shipment you specify.
|
|
415
|
+
* @param {string} shipmentId The ID of the shipment whose invoice you want.
|
|
416
|
+
* @param {*} [options] Override http request option.
|
|
417
|
+
* @throws {RequiredError}
|
|
418
|
+
*/
|
|
419
|
+
async generateInvoice(shipmentId, options) {
|
|
420
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.generateInvoice(shipmentId, options);
|
|
421
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
422
|
+
const localVarOperationServerBasePath = operationServerMap['ExternalFulfillmentShipmentsApi.generateInvoice']?.[localVarOperationServerIndex]?.url;
|
|
423
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
424
|
+
},
|
|
425
|
+
/**
|
|
426
|
+
* Generate and retrieve all shipping labels for one or more packages in the shipment you specify.
|
|
427
|
+
* @param {string} shipmentId The ID of the shipment whose shipping labels you want to generate and retrieve.
|
|
428
|
+
* @param {GenerateShipLabelsOperationEnum} operation Specify whether you want to generate or regenerate a label.
|
|
429
|
+
* @param {string} [shippingOptionId] The ID of the shipping option whose shipping labels you want.
|
|
430
|
+
* @param {ShipLabelsInput} [body] Shipping details for when shipping is not done by the marketplace channel.
|
|
431
|
+
* @param {*} [options] Override http request option.
|
|
432
|
+
* @throws {RequiredError}
|
|
433
|
+
*/
|
|
434
|
+
async generateShipLabels(shipmentId, operation, shippingOptionId, body, options) {
|
|
435
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.generateShipLabels(shipmentId, operation, shippingOptionId, body, options);
|
|
436
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
437
|
+
const localVarOperationServerBasePath = operationServerMap['ExternalFulfillmentShipmentsApi.generateShipLabels']?.[localVarOperationServerIndex]?.url;
|
|
438
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
439
|
+
},
|
|
440
|
+
/**
|
|
441
|
+
* Get a single shipment with the ID you specify.
|
|
442
|
+
* @param {string} shipmentId The ID of the shipment you want to retrieve.
|
|
443
|
+
* @param {*} [options] Override http request option.
|
|
444
|
+
* @throws {RequiredError}
|
|
445
|
+
*/
|
|
446
|
+
async getShipment(shipmentId, options) {
|
|
447
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getShipment(shipmentId, options);
|
|
448
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
449
|
+
const localVarOperationServerBasePath = operationServerMap['ExternalFulfillmentShipmentsApi.getShipment']?.[localVarOperationServerIndex]?.url;
|
|
450
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
451
|
+
},
|
|
452
|
+
/**
|
|
453
|
+
* Get a list of shipments created for the seller in the status you specify. Shipments can be further filtered based on the fulfillment node or the time of the shipments\' last update.
|
|
454
|
+
* @param {GetShipmentsStatusEnum} status The status of shipment you want to include in the response. To retrieve all new shipments, set this value to `ACCEPTED`.
|
|
455
|
+
* @param {string} [locationId] The Amazon channel location identifier for the shipments you want to retrieve.
|
|
456
|
+
* @param {string} [marketplaceId] The marketplace ID associated with the location. To find the ID for your marketplace, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids).
|
|
457
|
+
* @param {string} [channelName] The channel name associated with the location.
|
|
458
|
+
* @param {string} [lastUpdatedAfter] The response includes shipments whose latest update is after the specified time. In [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format.
|
|
459
|
+
* @param {string} [lastUpdatedBefore] The response includes shipments whose latest update is before the specified time. In [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format.
|
|
460
|
+
* @param {number} [maxResults] The maximum number of shipments to include in the response.
|
|
461
|
+
* @param {string} [paginationToken] A token that you use to retrieve the next page of results. The response includes `nextToken` when there are multiple pages of results. To get the next page of results, call the operation with this token and include the same arguments as the call that produced the token. To get a complete list, call this operation until `nextToken` is null. Note that this operation can return empty pages.
|
|
462
|
+
* @param {*} [options] Override http request option.
|
|
463
|
+
* @throws {RequiredError}
|
|
464
|
+
*/
|
|
465
|
+
async getShipments(status, locationId, marketplaceId, channelName, lastUpdatedAfter, lastUpdatedBefore, maxResults, paginationToken, options) {
|
|
466
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getShipments(status, locationId, marketplaceId, channelName, lastUpdatedAfter, lastUpdatedBefore, maxResults, paginationToken, options);
|
|
467
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
468
|
+
const localVarOperationServerBasePath = operationServerMap['ExternalFulfillmentShipmentsApi.getShipments']?.[localVarOperationServerIndex]?.url;
|
|
469
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
470
|
+
},
|
|
471
|
+
/**
|
|
472
|
+
* Confirm or reject the specified shipment.
|
|
473
|
+
* @param {string} shipmentId The ID of the shipment you want to confirm or reject.
|
|
474
|
+
* @param {ProcessShipmentOperationEnum} operation The status of the shipment.
|
|
475
|
+
* @param {ShipmentAcknowledgementRequest} [body] Information about the shipment and its line items.
|
|
476
|
+
* @param {*} [options] Override http request option.
|
|
477
|
+
* @throws {RequiredError}
|
|
478
|
+
*/
|
|
479
|
+
async processShipment(shipmentId, operation, body, options) {
|
|
480
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.processShipment(shipmentId, operation, body, options);
|
|
481
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
482
|
+
const localVarOperationServerBasePath = operationServerMap['ExternalFulfillmentShipmentsApi.processShipment']?.[localVarOperationServerIndex]?.url;
|
|
483
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
484
|
+
},
|
|
485
|
+
/**
|
|
486
|
+
* Retrieve invoices for the shipment you specify.
|
|
487
|
+
* @param {string} shipmentId The ID of the shipment whose invoice you want to retrieve.
|
|
488
|
+
* @param {*} [options] Override http request option.
|
|
489
|
+
* @throws {RequiredError}
|
|
490
|
+
*/
|
|
491
|
+
async retrieveInvoice(shipmentId, options) {
|
|
492
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.retrieveInvoice(shipmentId, options);
|
|
493
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
494
|
+
const localVarOperationServerBasePath = operationServerMap['ExternalFulfillmentShipmentsApi.retrieveInvoice']?.[localVarOperationServerIndex]?.url;
|
|
495
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
496
|
+
},
|
|
497
|
+
/**
|
|
498
|
+
* Get a list of shipping options for a package in a shipment given the shipment\'s marketplace and channel. If the marketplace and channel have a pre-determined shipping option, then this operation returns an empty response.
|
|
499
|
+
* @param {string} shipmentId The ID of the shipment to which the package belongs.
|
|
500
|
+
* @param {string} packageId The ID of the package for which you want to retrieve shipping options.
|
|
501
|
+
* @param {*} [options] Override http request option.
|
|
502
|
+
* @throws {RequiredError}
|
|
503
|
+
*/
|
|
504
|
+
async retrieveShippingOptions(shipmentId, packageId, options) {
|
|
505
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.retrieveShippingOptions(shipmentId, packageId, options);
|
|
506
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
507
|
+
const localVarOperationServerBasePath = operationServerMap['ExternalFulfillmentShipmentsApi.retrieveShippingOptions']?.[localVarOperationServerIndex]?.url;
|
|
508
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
509
|
+
},
|
|
510
|
+
/**
|
|
511
|
+
* Updates the details about the packages that will be used to fulfill the specified shipment.
|
|
512
|
+
* @param {string} shipmentId The ID of the shipment to which the package belongs.
|
|
513
|
+
* @param {string} packageId The ID of the package whose information you want to update.
|
|
514
|
+
* @param {Package} body The body of the request.
|
|
515
|
+
* @param {*} [options] Override http request option.
|
|
516
|
+
* @throws {RequiredError}
|
|
517
|
+
*/
|
|
518
|
+
async updatePackage(shipmentId, packageId, body, options) {
|
|
519
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.updatePackage(shipmentId, packageId, body, options);
|
|
520
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
521
|
+
const localVarOperationServerBasePath = operationServerMap['ExternalFulfillmentShipmentsApi.updatePackage']?.[localVarOperationServerIndex]?.url;
|
|
522
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
523
|
+
},
|
|
524
|
+
/**
|
|
525
|
+
* Updates the status of the packages.
|
|
526
|
+
* @param {string} shipmentId The ID of the shipment to which the package belongs.
|
|
527
|
+
* @param {string} packageId The ID of the package whose status you want to update.
|
|
528
|
+
* @param {UpdatePackageStatusStatusEnum} [status] **DEPRECATED**. Do not use. Package status is defined in the body parameter.
|
|
529
|
+
* @param {PackageDeliveryStatus} [body] The body of the request.
|
|
530
|
+
* @param {*} [options] Override http request option.
|
|
531
|
+
* @throws {RequiredError}
|
|
532
|
+
*/
|
|
533
|
+
async updatePackageStatus(shipmentId, packageId, status, body, options) {
|
|
534
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.updatePackageStatus(shipmentId, packageId, status, body, options);
|
|
535
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
536
|
+
const localVarOperationServerBasePath = operationServerMap['ExternalFulfillmentShipmentsApi.updatePackageStatus']?.[localVarOperationServerIndex]?.url;
|
|
537
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
538
|
+
},
|
|
539
|
+
};
|
|
540
|
+
};
|
|
541
|
+
/**
|
|
542
|
+
* ExternalFulfillmentShipmentsApi - factory interface
|
|
543
|
+
*/
|
|
544
|
+
export const ExternalFulfillmentShipmentsApiFactory = function (configuration, basePath, axios) {
|
|
545
|
+
const localVarFp = ExternalFulfillmentShipmentsApiFp(configuration);
|
|
546
|
+
return {
|
|
547
|
+
/**
|
|
548
|
+
* Provide details about the packages in the specified shipment.
|
|
549
|
+
* @param {ExternalFulfillmentShipmentsApiCreatePackagesRequest} requestParameters Request parameters.
|
|
550
|
+
* @param {*} [options] Override http request option.
|
|
551
|
+
* @throws {RequiredError}
|
|
552
|
+
*/
|
|
553
|
+
createPackages(requestParameters, options) {
|
|
554
|
+
return localVarFp.createPackages(requestParameters.shipmentId, requestParameters.body, options).then((request) => request(axios, basePath));
|
|
555
|
+
},
|
|
556
|
+
/**
|
|
557
|
+
* Get invoices for the shipment you specify.
|
|
558
|
+
* @param {ExternalFulfillmentShipmentsApiGenerateInvoiceRequest} requestParameters Request parameters.
|
|
559
|
+
* @param {*} [options] Override http request option.
|
|
560
|
+
* @throws {RequiredError}
|
|
561
|
+
*/
|
|
562
|
+
generateInvoice(requestParameters, options) {
|
|
563
|
+
return localVarFp.generateInvoice(requestParameters.shipmentId, options).then((request) => request(axios, basePath));
|
|
564
|
+
},
|
|
565
|
+
/**
|
|
566
|
+
* Generate and retrieve all shipping labels for one or more packages in the shipment you specify.
|
|
567
|
+
* @param {ExternalFulfillmentShipmentsApiGenerateShipLabelsRequest} requestParameters Request parameters.
|
|
568
|
+
* @param {*} [options] Override http request option.
|
|
569
|
+
* @throws {RequiredError}
|
|
570
|
+
*/
|
|
571
|
+
generateShipLabels(requestParameters, options) {
|
|
572
|
+
return localVarFp.generateShipLabels(requestParameters.shipmentId, requestParameters.operation, requestParameters.shippingOptionId, requestParameters.body, options).then((request) => request(axios, basePath));
|
|
573
|
+
},
|
|
574
|
+
/**
|
|
575
|
+
* Get a single shipment with the ID you specify.
|
|
576
|
+
* @param {ExternalFulfillmentShipmentsApiGetShipmentRequest} requestParameters Request parameters.
|
|
577
|
+
* @param {*} [options] Override http request option.
|
|
578
|
+
* @throws {RequiredError}
|
|
579
|
+
*/
|
|
580
|
+
getShipment(requestParameters, options) {
|
|
581
|
+
return localVarFp.getShipment(requestParameters.shipmentId, options).then((request) => request(axios, basePath));
|
|
582
|
+
},
|
|
583
|
+
/**
|
|
584
|
+
* Get a list of shipments created for the seller in the status you specify. Shipments can be further filtered based on the fulfillment node or the time of the shipments\' last update.
|
|
585
|
+
* @param {ExternalFulfillmentShipmentsApiGetShipmentsRequest} requestParameters Request parameters.
|
|
586
|
+
* @param {*} [options] Override http request option.
|
|
587
|
+
* @throws {RequiredError}
|
|
588
|
+
*/
|
|
589
|
+
getShipments(requestParameters, options) {
|
|
590
|
+
return localVarFp.getShipments(requestParameters.status, requestParameters.locationId, requestParameters.marketplaceId, requestParameters.channelName, requestParameters.lastUpdatedAfter, requestParameters.lastUpdatedBefore, requestParameters.maxResults, requestParameters.paginationToken, options).then((request) => request(axios, basePath));
|
|
591
|
+
},
|
|
592
|
+
/**
|
|
593
|
+
* Confirm or reject the specified shipment.
|
|
594
|
+
* @param {ExternalFulfillmentShipmentsApiProcessShipmentRequest} requestParameters Request parameters.
|
|
595
|
+
* @param {*} [options] Override http request option.
|
|
596
|
+
* @throws {RequiredError}
|
|
597
|
+
*/
|
|
598
|
+
processShipment(requestParameters, options) {
|
|
599
|
+
return localVarFp.processShipment(requestParameters.shipmentId, requestParameters.operation, requestParameters.body, options).then((request) => request(axios, basePath));
|
|
600
|
+
},
|
|
601
|
+
/**
|
|
602
|
+
* Retrieve invoices for the shipment you specify.
|
|
603
|
+
* @param {ExternalFulfillmentShipmentsApiRetrieveInvoiceRequest} requestParameters Request parameters.
|
|
604
|
+
* @param {*} [options] Override http request option.
|
|
605
|
+
* @throws {RequiredError}
|
|
606
|
+
*/
|
|
607
|
+
retrieveInvoice(requestParameters, options) {
|
|
608
|
+
return localVarFp.retrieveInvoice(requestParameters.shipmentId, options).then((request) => request(axios, basePath));
|
|
609
|
+
},
|
|
610
|
+
/**
|
|
611
|
+
* Get a list of shipping options for a package in a shipment given the shipment\'s marketplace and channel. If the marketplace and channel have a pre-determined shipping option, then this operation returns an empty response.
|
|
612
|
+
* @param {ExternalFulfillmentShipmentsApiRetrieveShippingOptionsRequest} requestParameters Request parameters.
|
|
613
|
+
* @param {*} [options] Override http request option.
|
|
614
|
+
* @throws {RequiredError}
|
|
615
|
+
*/
|
|
616
|
+
retrieveShippingOptions(requestParameters, options) {
|
|
617
|
+
return localVarFp.retrieveShippingOptions(requestParameters.shipmentId, requestParameters.packageId, options).then((request) => request(axios, basePath));
|
|
618
|
+
},
|
|
619
|
+
/**
|
|
620
|
+
* Updates the details about the packages that will be used to fulfill the specified shipment.
|
|
621
|
+
* @param {ExternalFulfillmentShipmentsApiUpdatePackageRequest} requestParameters Request parameters.
|
|
622
|
+
* @param {*} [options] Override http request option.
|
|
623
|
+
* @throws {RequiredError}
|
|
624
|
+
*/
|
|
625
|
+
updatePackage(requestParameters, options) {
|
|
626
|
+
return localVarFp.updatePackage(requestParameters.shipmentId, requestParameters.packageId, requestParameters.body, options).then((request) => request(axios, basePath));
|
|
627
|
+
},
|
|
628
|
+
/**
|
|
629
|
+
* Updates the status of the packages.
|
|
630
|
+
* @param {ExternalFulfillmentShipmentsApiUpdatePackageStatusRequest} requestParameters Request parameters.
|
|
631
|
+
* @param {*} [options] Override http request option.
|
|
632
|
+
* @throws {RequiredError}
|
|
633
|
+
*/
|
|
634
|
+
updatePackageStatus(requestParameters, options) {
|
|
635
|
+
return localVarFp.updatePackageStatus(requestParameters.shipmentId, requestParameters.packageId, requestParameters.status, requestParameters.body, options).then((request) => request(axios, basePath));
|
|
636
|
+
},
|
|
637
|
+
};
|
|
638
|
+
};
|
|
639
|
+
/**
|
|
640
|
+
* ExternalFulfillmentShipmentsApi - object-oriented interface
|
|
641
|
+
*/
|
|
642
|
+
export class ExternalFulfillmentShipmentsApi extends BaseAPI {
|
|
643
|
+
/**
|
|
644
|
+
* Provide details about the packages in the specified shipment.
|
|
645
|
+
* @param {ExternalFulfillmentShipmentsApiCreatePackagesRequest} requestParameters Request parameters.
|
|
646
|
+
* @param {*} [options] Override http request option.
|
|
647
|
+
* @throws {RequiredError}
|
|
648
|
+
*/
|
|
649
|
+
createPackages(requestParameters, options) {
|
|
650
|
+
return ExternalFulfillmentShipmentsApiFp(this.configuration).createPackages(requestParameters.shipmentId, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
|
|
651
|
+
}
|
|
652
|
+
/**
|
|
653
|
+
* Get invoices for the shipment you specify.
|
|
654
|
+
* @param {ExternalFulfillmentShipmentsApiGenerateInvoiceRequest} requestParameters Request parameters.
|
|
655
|
+
* @param {*} [options] Override http request option.
|
|
656
|
+
* @throws {RequiredError}
|
|
657
|
+
*/
|
|
658
|
+
generateInvoice(requestParameters, options) {
|
|
659
|
+
return ExternalFulfillmentShipmentsApiFp(this.configuration).generateInvoice(requestParameters.shipmentId, options).then((request) => request(this.axios, this.basePath));
|
|
660
|
+
}
|
|
661
|
+
/**
|
|
662
|
+
* Generate and retrieve all shipping labels for one or more packages in the shipment you specify.
|
|
663
|
+
* @param {ExternalFulfillmentShipmentsApiGenerateShipLabelsRequest} requestParameters Request parameters.
|
|
664
|
+
* @param {*} [options] Override http request option.
|
|
665
|
+
* @throws {RequiredError}
|
|
666
|
+
*/
|
|
667
|
+
generateShipLabels(requestParameters, options) {
|
|
668
|
+
return ExternalFulfillmentShipmentsApiFp(this.configuration).generateShipLabels(requestParameters.shipmentId, requestParameters.operation, requestParameters.shippingOptionId, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
|
|
669
|
+
}
|
|
670
|
+
/**
|
|
671
|
+
* Get a single shipment with the ID you specify.
|
|
672
|
+
* @param {ExternalFulfillmentShipmentsApiGetShipmentRequest} requestParameters Request parameters.
|
|
673
|
+
* @param {*} [options] Override http request option.
|
|
674
|
+
* @throws {RequiredError}
|
|
675
|
+
*/
|
|
676
|
+
getShipment(requestParameters, options) {
|
|
677
|
+
return ExternalFulfillmentShipmentsApiFp(this.configuration).getShipment(requestParameters.shipmentId, options).then((request) => request(this.axios, this.basePath));
|
|
678
|
+
}
|
|
679
|
+
/**
|
|
680
|
+
* Get a list of shipments created for the seller in the status you specify. Shipments can be further filtered based on the fulfillment node or the time of the shipments\' last update.
|
|
681
|
+
* @param {ExternalFulfillmentShipmentsApiGetShipmentsRequest} requestParameters Request parameters.
|
|
682
|
+
* @param {*} [options] Override http request option.
|
|
683
|
+
* @throws {RequiredError}
|
|
684
|
+
*/
|
|
685
|
+
getShipments(requestParameters, options) {
|
|
686
|
+
return ExternalFulfillmentShipmentsApiFp(this.configuration).getShipments(requestParameters.status, requestParameters.locationId, requestParameters.marketplaceId, requestParameters.channelName, requestParameters.lastUpdatedAfter, requestParameters.lastUpdatedBefore, requestParameters.maxResults, requestParameters.paginationToken, options).then((request) => request(this.axios, this.basePath));
|
|
687
|
+
}
|
|
688
|
+
/**
|
|
689
|
+
* Confirm or reject the specified shipment.
|
|
690
|
+
* @param {ExternalFulfillmentShipmentsApiProcessShipmentRequest} requestParameters Request parameters.
|
|
691
|
+
* @param {*} [options] Override http request option.
|
|
692
|
+
* @throws {RequiredError}
|
|
693
|
+
*/
|
|
694
|
+
processShipment(requestParameters, options) {
|
|
695
|
+
return ExternalFulfillmentShipmentsApiFp(this.configuration).processShipment(requestParameters.shipmentId, requestParameters.operation, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
|
|
696
|
+
}
|
|
697
|
+
/**
|
|
698
|
+
* Retrieve invoices for the shipment you specify.
|
|
699
|
+
* @param {ExternalFulfillmentShipmentsApiRetrieveInvoiceRequest} requestParameters Request parameters.
|
|
700
|
+
* @param {*} [options] Override http request option.
|
|
701
|
+
* @throws {RequiredError}
|
|
702
|
+
*/
|
|
703
|
+
retrieveInvoice(requestParameters, options) {
|
|
704
|
+
return ExternalFulfillmentShipmentsApiFp(this.configuration).retrieveInvoice(requestParameters.shipmentId, options).then((request) => request(this.axios, this.basePath));
|
|
705
|
+
}
|
|
706
|
+
/**
|
|
707
|
+
* Get a list of shipping options for a package in a shipment given the shipment\'s marketplace and channel. If the marketplace and channel have a pre-determined shipping option, then this operation returns an empty response.
|
|
708
|
+
* @param {ExternalFulfillmentShipmentsApiRetrieveShippingOptionsRequest} requestParameters Request parameters.
|
|
709
|
+
* @param {*} [options] Override http request option.
|
|
710
|
+
* @throws {RequiredError}
|
|
711
|
+
*/
|
|
712
|
+
retrieveShippingOptions(requestParameters, options) {
|
|
713
|
+
return ExternalFulfillmentShipmentsApiFp(this.configuration).retrieveShippingOptions(requestParameters.shipmentId, requestParameters.packageId, options).then((request) => request(this.axios, this.basePath));
|
|
714
|
+
}
|
|
715
|
+
/**
|
|
716
|
+
* Updates the details about the packages that will be used to fulfill the specified shipment.
|
|
717
|
+
* @param {ExternalFulfillmentShipmentsApiUpdatePackageRequest} requestParameters Request parameters.
|
|
718
|
+
* @param {*} [options] Override http request option.
|
|
719
|
+
* @throws {RequiredError}
|
|
720
|
+
*/
|
|
721
|
+
updatePackage(requestParameters, options) {
|
|
722
|
+
return ExternalFulfillmentShipmentsApiFp(this.configuration).updatePackage(requestParameters.shipmentId, requestParameters.packageId, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
|
|
723
|
+
}
|
|
724
|
+
/**
|
|
725
|
+
* Updates the status of the packages.
|
|
726
|
+
* @param {ExternalFulfillmentShipmentsApiUpdatePackageStatusRequest} requestParameters Request parameters.
|
|
727
|
+
* @param {*} [options] Override http request option.
|
|
728
|
+
* @throws {RequiredError}
|
|
729
|
+
*/
|
|
730
|
+
updatePackageStatus(requestParameters, options) {
|
|
731
|
+
return ExternalFulfillmentShipmentsApiFp(this.configuration).updatePackageStatus(requestParameters.shipmentId, requestParameters.packageId, requestParameters.status, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
|
|
732
|
+
}
|
|
733
|
+
}
|
|
734
|
+
export const GenerateShipLabelsOperationEnum = {
|
|
735
|
+
Generate: 'GENERATE',
|
|
736
|
+
Regenerate: 'REGENERATE'
|
|
737
|
+
};
|
|
738
|
+
export const GetShipmentsStatusEnum = {
|
|
739
|
+
Created: 'CREATED',
|
|
740
|
+
Accepted: 'ACCEPTED',
|
|
741
|
+
Confirmed: 'CONFIRMED',
|
|
742
|
+
PackageCreated: 'PACKAGE_CREATED',
|
|
743
|
+
PickupSlotRetrieved: 'PICKUP_SLOT_RETRIEVED',
|
|
744
|
+
InvoiceGenerated: 'INVOICE_GENERATED',
|
|
745
|
+
ShiplabelGenerated: 'SHIPLABEL_GENERATED',
|
|
746
|
+
Cancelled: 'CANCELLED',
|
|
747
|
+
Shipped: 'SHIPPED',
|
|
748
|
+
Delivered: 'DELIVERED'
|
|
749
|
+
};
|
|
750
|
+
export const ProcessShipmentOperationEnum = {
|
|
751
|
+
Confirm: 'CONFIRM',
|
|
752
|
+
Reject: 'REJECT'
|
|
753
|
+
};
|
|
754
|
+
export const UpdatePackageStatusStatusEnum = {
|
|
755
|
+
Shipped: 'SHIPPED'
|
|
756
|
+
};
|