@teralabs/shipstack 1.2.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 +15 -0
- package/README.md +418 -0
- package/dist/index.d.mts +2741 -0
- package/dist/index.d.ts +2741 -0
- package/dist/index.js +9431 -0
- package/dist/index.mjs +9380 -0
- package/docs/API.md +176 -0
- package/docs/address-validation.md +114 -0
- package/docs/architecture.md +220 -0
- package/docs/carriers.md +180 -0
- package/docs/config.example.ts +32 -0
- package/docs/errors.md +150 -0
- package/docs/examples/actual-shipment.ts +59 -0
- package/docs/examples/basic.ts +131 -0
- package/docs/examples/nextjs-route.ts +22 -0
- package/docs/examples/staged-shipment.md +46 -0
- package/docs/index.md +286 -0
- package/docs/rates.md +145 -0
- package/docs/shipments.md +157 -0
- package/docs/tracking.md +115 -0
- package/package.json +98 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,2741 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Individual Carrier Configurations
|
|
3
|
+
*/
|
|
4
|
+
interface UspsConfig {
|
|
5
|
+
/** If false, the aggregator will skip USPS during multi-carrier lookups */
|
|
6
|
+
enabled: boolean;
|
|
7
|
+
/** Consumer Key from USPS Developer Portal (v3) */
|
|
8
|
+
clientId: string;
|
|
9
|
+
/** Consumer Secret from USPS Developer Portal (v3) */
|
|
10
|
+
clientSecret: string;
|
|
11
|
+
/** Optional API Key for legacy headers or specific v3 requirements */
|
|
12
|
+
apiKey?: string;
|
|
13
|
+
baseUrl?: string;
|
|
14
|
+
/** The OAuth2 endpoint (e.g., https://apis.usps.com/oauth2/v3) */
|
|
15
|
+
authUrl?: string;
|
|
16
|
+
/** Specific override for the Labels v3 endpoint */
|
|
17
|
+
labelsBaseUrl?: string;
|
|
18
|
+
}
|
|
19
|
+
interface FedexConfig {
|
|
20
|
+
enabled: boolean;
|
|
21
|
+
clientId: string;
|
|
22
|
+
clientSecret: string;
|
|
23
|
+
accountNumber: string;
|
|
24
|
+
baseUrl?: string;
|
|
25
|
+
}
|
|
26
|
+
interface UpsConfig {
|
|
27
|
+
enabled: boolean;
|
|
28
|
+
clientId: string;
|
|
29
|
+
clientSecret: string;
|
|
30
|
+
/**
|
|
31
|
+
* The 6-character UPS Account Number.
|
|
32
|
+
* Maps to 'ShipperNumber' in the UPS Shipping API.
|
|
33
|
+
*/
|
|
34
|
+
accountNumber: string;
|
|
35
|
+
baseUrl?: string;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Root configuration for the Shipstack library.
|
|
39
|
+
*/
|
|
40
|
+
interface ShippingConfig {
|
|
41
|
+
usps?: UspsConfig;
|
|
42
|
+
fedex?: FedexConfig;
|
|
43
|
+
ups?: UpsConfig;
|
|
44
|
+
/** Toggle between sandbox (TEM) and production environments. Defaults to 'sandbox'. */
|
|
45
|
+
environment?: "sandbox" | "production";
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Initializes the Shipstack library with user-provided credentials.
|
|
49
|
+
* This should be called once at the start of the application lifecycle.
|
|
50
|
+
*/
|
|
51
|
+
declare function setShipstackConfig(config: ShippingConfig): void;
|
|
52
|
+
/**
|
|
53
|
+
* Aggregator: Retrieves a list of carrier keys that are explicitly enabled.
|
|
54
|
+
* @returns Array of strings: ["usps", "fedex", "ups"]
|
|
55
|
+
*/
|
|
56
|
+
declare function getEnabledCarriers(): string[];
|
|
57
|
+
/**
|
|
58
|
+
* Internal helper to retrieve USPS specific configs.
|
|
59
|
+
* @throws Error if USPS is not configured.
|
|
60
|
+
*/
|
|
61
|
+
declare function getUspsConfig(): UspsConfig;
|
|
62
|
+
/**
|
|
63
|
+
* Internal helper to retrieve FedEx specific configs.
|
|
64
|
+
*/
|
|
65
|
+
declare function getFedexConfig(): FedexConfig;
|
|
66
|
+
/**
|
|
67
|
+
* Internal helper to retrieve UPS specific configs.
|
|
68
|
+
*/
|
|
69
|
+
declare function getUpsConfig(): UpsConfig;
|
|
70
|
+
/**
|
|
71
|
+
* Helper to check the current environment for URL resolution.
|
|
72
|
+
*/
|
|
73
|
+
declare function getEnvironment(): "sandbox" | "production";
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Generic request structure for retrieving shipping rates from specific carriers.
|
|
77
|
+
* * This type acts as a bridge between the ShipStack core and carrier-specific
|
|
78
|
+
* logic, housing both universal logistics data (weight/dims) and specific
|
|
79
|
+
* flags like USPS 'nonStandard' or FedEx 'pickupType'.
|
|
80
|
+
*/
|
|
81
|
+
type RateRequest$1 = {
|
|
82
|
+
/** The carrier to query (e.g., 'usps' triggers the Domestic Prices v3 API). */
|
|
83
|
+
carrier: "fedex" | "usps" | "ups";
|
|
84
|
+
/** 5-digit origin postal code. */
|
|
85
|
+
originZip: string;
|
|
86
|
+
/** 5-digit destination postal code. */
|
|
87
|
+
destZip: string;
|
|
88
|
+
/** Package weight in Ounces (converted to Pounds internally for USPS). */
|
|
89
|
+
weightOz: number;
|
|
90
|
+
/** Physical length in inches. */
|
|
91
|
+
lengthInches: number;
|
|
92
|
+
/** Physical width in inches. */
|
|
93
|
+
widthInches: number;
|
|
94
|
+
/** Physical height in inches. */
|
|
95
|
+
heightInches: number;
|
|
96
|
+
/** * Destination Country Code (ISO-3166-1 alpha-2).
|
|
97
|
+
* Essential for International Rates to determine zone and service availability.
|
|
98
|
+
* Defaults to 'US' in most builder implementations.
|
|
99
|
+
*/
|
|
100
|
+
destCountryCode?: string;
|
|
101
|
+
/** Indicates irregular/non-machinable characteristics. */
|
|
102
|
+
nonStandard?: boolean;
|
|
103
|
+
/** The date the package is intended to be mailed. */
|
|
104
|
+
mailingDate?: string;
|
|
105
|
+
/** Specific mail class filter (e.g., 'PRIORITY_MAIL'). */
|
|
106
|
+
mailClass?: string;
|
|
107
|
+
/** USPS payment account category. */
|
|
108
|
+
accountType?: "EPS" | "PERMIT" | "METER";
|
|
109
|
+
/** The unique USPS account string. */
|
|
110
|
+
accountNumber?: string;
|
|
111
|
+
/** FedEx-specific packaging (e.g., 'FEDEX_ENVELOPE'). */
|
|
112
|
+
packagingType?: string;
|
|
113
|
+
/** Instructions for package collection. */
|
|
114
|
+
pickupType?: string;
|
|
115
|
+
/** Instructions for package drop-off. */
|
|
116
|
+
dropoffType?: string;
|
|
117
|
+
/** Requested rate calculation types (e.g., ['LIST', 'ACCOUNT']). */
|
|
118
|
+
rateRequestType?: string[];
|
|
119
|
+
/** Optional correlation ID for FedEx logs. */
|
|
120
|
+
transactionId?: string;
|
|
121
|
+
/** BCP-47 language tag (e.g., 'en-US'). */
|
|
122
|
+
locale?: string;
|
|
123
|
+
};
|
|
124
|
+
/**
|
|
125
|
+
* Normalized shipping rate returned to the consuming application.
|
|
126
|
+
* * This object removes carrier-specific nesting, providing a flat structure
|
|
127
|
+
* optimized for UI components like checkout tables or shipping calculators.
|
|
128
|
+
*/
|
|
129
|
+
type NormalizedRate = {
|
|
130
|
+
/** The carrier that provided this specific rate. */
|
|
131
|
+
carrier: "usps" | "fedex" | "ups";
|
|
132
|
+
/** The machine-readable service identifier (e.g., 'USPS_GROUND_ADVANTAGE'). */
|
|
133
|
+
serviceCode: string;
|
|
134
|
+
/** The customer-facing service name (e.g., 'Ground Advantage'). */
|
|
135
|
+
serviceName: string;
|
|
136
|
+
/** Estimated business days for transit. */
|
|
137
|
+
deliveryDays?: number;
|
|
138
|
+
/** ISO-8601 formatted date for predicted arrival. */
|
|
139
|
+
estimatedArrival?: string;
|
|
140
|
+
/** Flag for the fastest available option in a multi-rate response. */
|
|
141
|
+
isFastest?: boolean;
|
|
142
|
+
/** Flag for the lowest-cost option in a multi-rate response. */
|
|
143
|
+
isCheapest?: boolean;
|
|
144
|
+
/** Indicates if the delivery time is carrier-guaranteed. */
|
|
145
|
+
guaranteed?: boolean;
|
|
146
|
+
/** * Financial breakdown of the rate.
|
|
147
|
+
*/
|
|
148
|
+
cost: {
|
|
149
|
+
/** Total price including base postage and requested extra services. */
|
|
150
|
+
amount: number;
|
|
151
|
+
/** Three-letter currency code (e.g., 'USD'). */
|
|
152
|
+
currency: string;
|
|
153
|
+
};
|
|
154
|
+
/** * The original, unformatted response from the carrier.
|
|
155
|
+
* Useful for auditing or accessing vendor-specific metadata.
|
|
156
|
+
*/
|
|
157
|
+
raw?: unknown;
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Request structure for validating and normalizing physical addresses.
|
|
162
|
+
*
|
|
163
|
+
* This type is used across all carrier adapters to ensure the address
|
|
164
|
+
* conforms to postal standards before attempting to generate rates or labels.
|
|
165
|
+
*
|
|
166
|
+
* @category Address
|
|
167
|
+
*/
|
|
168
|
+
type AddressValidationRequest = {
|
|
169
|
+
/** The specific carrier API to use for validation. */
|
|
170
|
+
carrier: "usps" | "fedex" | "ups";
|
|
171
|
+
/** The address details to be verified. */
|
|
172
|
+
address: {
|
|
173
|
+
/** Array of street lines; most carriers support up to 2 lines for domestic. */
|
|
174
|
+
streetLines: string[];
|
|
175
|
+
/** Full city name. */
|
|
176
|
+
city: string;
|
|
177
|
+
/** 2-character state or province code (e.g., 'NY', 'CA'). */
|
|
178
|
+
stateOrProvinceCode: string;
|
|
179
|
+
/** 5 or 9-digit postal code. */
|
|
180
|
+
postalCode: string;
|
|
181
|
+
/** ISO-3166-1 alpha-2 country code (e.g., 'US', 'CA'). */
|
|
182
|
+
countryCode: string;
|
|
183
|
+
};
|
|
184
|
+
};
|
|
185
|
+
/**
|
|
186
|
+
* Classification of an address location type.
|
|
187
|
+
*
|
|
188
|
+
* Used primarily for rate calculation, as residential deliveries
|
|
189
|
+
* often incur surcharges from carriers like FedEx and UPS.
|
|
190
|
+
*/
|
|
191
|
+
type AddressClassification = "RESIDENTIAL" | "COMMERCIAL" | "UNKNOWN";
|
|
192
|
+
/**
|
|
193
|
+
* Standardized Address format for the Shipstack library.
|
|
194
|
+
*
|
|
195
|
+
* This interface is shared across all carrier converters (USPS, FedEx, UPS)
|
|
196
|
+
* to ensure the end-user receives a consistent object structure regardless
|
|
197
|
+
* of the underlying carrier API used.
|
|
198
|
+
*
|
|
199
|
+
* @category Address
|
|
200
|
+
*/
|
|
201
|
+
interface NormalizedAddress {
|
|
202
|
+
/** Primary delivery address line (e.g., '123 Main St'). */
|
|
203
|
+
street1: string;
|
|
204
|
+
/** Secondary address line (e.g., 'Apt 4B'). */
|
|
205
|
+
street2?: string;
|
|
206
|
+
/** Full city name. */
|
|
207
|
+
city: string;
|
|
208
|
+
/** 2-character state or province code. */
|
|
209
|
+
state: string;
|
|
210
|
+
/** Postal code in format: 12345 or 12345-6789. */
|
|
211
|
+
postalCode: string;
|
|
212
|
+
/** ISO-3166-1 alpha-2 country code. */
|
|
213
|
+
country: string;
|
|
214
|
+
/**
|
|
215
|
+
* Delivery Point Validation (DPV):
|
|
216
|
+
* Confirms if the address is a deliverable location recognized by the carrier.
|
|
217
|
+
*/
|
|
218
|
+
isValid: boolean;
|
|
219
|
+
/** Indicates if the location type is residential or commercial. */
|
|
220
|
+
classification?: AddressClassification;
|
|
221
|
+
/** Indicates if the address is a PO Box, which may restrict certain services. */
|
|
222
|
+
isPoBox: boolean;
|
|
223
|
+
/**
|
|
224
|
+
* The original raw response from the carrier SDK.
|
|
225
|
+
* Useful for debugging or accessing carrier-specific metadata.
|
|
226
|
+
*/
|
|
227
|
+
raw?: any;
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* The final output of the Address Aggregator.
|
|
231
|
+
*
|
|
232
|
+
* This structure explicitly separates the validation status from the
|
|
233
|
+
* suggested (corrected) address data.
|
|
234
|
+
*
|
|
235
|
+
* @category Address
|
|
236
|
+
*/
|
|
237
|
+
interface AddressValidationResult {
|
|
238
|
+
/** Global indicator of whether the input address was resolved successfully. */
|
|
239
|
+
isValid: boolean;
|
|
240
|
+
/** The standardized version of the address returned by the carrier. */
|
|
241
|
+
normalizedAddress?: NormalizedAddress;
|
|
242
|
+
/** Any warnings or footnotes returned (e.g., 'Missing Apartment Number'). */
|
|
243
|
+
messages?: string[];
|
|
244
|
+
/** The raw payload from the carrier for auditing. */
|
|
245
|
+
raw?: any;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* Generic request structure for generating a shipping label.
|
|
250
|
+
* * This type serves as the input for all carrier-specific label builders.
|
|
251
|
+
* It consolidates sender, recipient, and package dimensions into a
|
|
252
|
+
* single, carrier-agnostic payload.
|
|
253
|
+
*/
|
|
254
|
+
type ShipmentRequest = {
|
|
255
|
+
/** The carrier to be used for the shipment (e.g., 'usps', 'fedex'). */
|
|
256
|
+
carrier: "usps" | "fedex" | "ups";
|
|
257
|
+
/** * The carrier-specific service identifier.
|
|
258
|
+
* Matches the 'serviceCode' returned by the Rates API.
|
|
259
|
+
*/
|
|
260
|
+
serviceCode: string;
|
|
261
|
+
/** * Origin address details.
|
|
262
|
+
*/
|
|
263
|
+
fromAddress: {
|
|
264
|
+
/** Full name of the sender. */
|
|
265
|
+
name: string;
|
|
266
|
+
/** Optional business name. */
|
|
267
|
+
company?: string;
|
|
268
|
+
/** Array of street address lines (e.g., ['123 Main St', 'Suite 400']). */
|
|
269
|
+
streetLines: string[];
|
|
270
|
+
/** City name. */
|
|
271
|
+
city: string;
|
|
272
|
+
/** 2-character state or province code. */
|
|
273
|
+
stateOrProvinceCode: string;
|
|
274
|
+
/** 5 or 9-digit postal code. */
|
|
275
|
+
postalCode: string;
|
|
276
|
+
/** ISO-3166-1 alpha-2 country code. */
|
|
277
|
+
countryCode: string;
|
|
278
|
+
};
|
|
279
|
+
/** * Destination address details.
|
|
280
|
+
*/
|
|
281
|
+
toAddress: {
|
|
282
|
+
/** Full name of the recipient. */
|
|
283
|
+
name: string;
|
|
284
|
+
/** Optional business name. */
|
|
285
|
+
company?: string;
|
|
286
|
+
/** Array of street address lines. */
|
|
287
|
+
streetLines: string[];
|
|
288
|
+
/** City name. */
|
|
289
|
+
city: string;
|
|
290
|
+
/** 2-character state or province code. */
|
|
291
|
+
stateOrProvinceCode: string;
|
|
292
|
+
/** 5 or 9-digit postal code. */
|
|
293
|
+
postalCode: string;
|
|
294
|
+
/** ISO-3166-1 alpha-2 country code. */
|
|
295
|
+
countryCode: string;
|
|
296
|
+
};
|
|
297
|
+
/** * Physical characteristics and contents of the package.
|
|
298
|
+
*/
|
|
299
|
+
package: {
|
|
300
|
+
/** Weight in Ounces. */
|
|
301
|
+
weightOz: number;
|
|
302
|
+
/** Length in inches. */
|
|
303
|
+
lengthInches: number;
|
|
304
|
+
/** Width in inches. */
|
|
305
|
+
widthInches: number;
|
|
306
|
+
/** Height in inches. */
|
|
307
|
+
heightInches: number;
|
|
308
|
+
/** Optional description of package contents for internal reference or labels. */
|
|
309
|
+
description?: string;
|
|
310
|
+
};
|
|
311
|
+
};
|
|
312
|
+
/**
|
|
313
|
+
* Normalized response representing a successfully created shipment and label.
|
|
314
|
+
* * This structure extracts the most critical data from complex carrier
|
|
315
|
+
* responses (like the USPS Labels v3 JSON) to provide a simple object for
|
|
316
|
+
* frontend rendering or database storage.
|
|
317
|
+
*/
|
|
318
|
+
type NormalizedShipment = {
|
|
319
|
+
/** The carrier that generated the shipment. */
|
|
320
|
+
carrier: "usps" | "fedex" | "ups";
|
|
321
|
+
/** The primary tracking number assigned to the package. */
|
|
322
|
+
trackingNumber: string;
|
|
323
|
+
/** The carrier-specific service identifier used. */
|
|
324
|
+
serviceCode: string;
|
|
325
|
+
/** Human-readable service name (e.g., 'USPS Ground Advantage'). */
|
|
326
|
+
serviceName: string;
|
|
327
|
+
/** * Label image metadata and data.
|
|
328
|
+
*/
|
|
329
|
+
label: {
|
|
330
|
+
/** The file format of the generated label image. */
|
|
331
|
+
format: "PDF" | "PNG" | "ZPL" | "GIF";
|
|
332
|
+
/** The actual label data encoded as a Base64 string. */
|
|
333
|
+
base64: string;
|
|
334
|
+
};
|
|
335
|
+
/** * Financial details associated with the created label.
|
|
336
|
+
*/
|
|
337
|
+
charges?: {
|
|
338
|
+
/** The final amount charged/quoted for the label. */
|
|
339
|
+
amount: number;
|
|
340
|
+
/** Three-letter currency code (e.g., 'USD'). */
|
|
341
|
+
currency: string;
|
|
342
|
+
};
|
|
343
|
+
/** * The original raw response from the carrier API.
|
|
344
|
+
* Useful for auditing or retrieving advanced metadata (e.g., routing codes).
|
|
345
|
+
*/
|
|
346
|
+
raw?: unknown;
|
|
347
|
+
};
|
|
348
|
+
/**
|
|
349
|
+
* A staged shipment represents the intermediate payload structure used
|
|
350
|
+
* internally by the aggregator before it is transformed into a carrier-specific request. This allows for a clean separation between the public API's agnostic request format and the internal logic that builds the specific payloads required by each carrier's API.
|
|
351
|
+
*/
|
|
352
|
+
type StagedShipment = {
|
|
353
|
+
/** The carrier this payload is intended for. */
|
|
354
|
+
carrier: "usps" | "fedex" | "ups";
|
|
355
|
+
/** The service code selected (e.g., from a rate). */
|
|
356
|
+
serviceCode: string;
|
|
357
|
+
/** Carrier-specific request payload (USPS/FedEx/UPS label/ship request). */
|
|
358
|
+
payload: unknown;
|
|
359
|
+
};
|
|
360
|
+
|
|
361
|
+
/**
|
|
362
|
+
* Represents a single point-in-time update in the journey of a package.
|
|
363
|
+
* * This type normalizes diverse carrier event structures (e.g., USPS 'statusDetails'
|
|
364
|
+
* vs FedEx 'scanEvents') into a standard chronological log.
|
|
365
|
+
*/
|
|
366
|
+
type NormalizedTrackingEvent = {
|
|
367
|
+
/** A human-readable description of the event (e.g., 'Arrived at Post Office'). */
|
|
368
|
+
description: string;
|
|
369
|
+
/** ISO-8601 formatted date and time of the event occurrence. */
|
|
370
|
+
dateTime: string;
|
|
371
|
+
/** The city where the scan occurred. */
|
|
372
|
+
city?: string;
|
|
373
|
+
/** 2-character state or province code (e.g., 'TX'). */
|
|
374
|
+
stateOrProvinceCode?: string;
|
|
375
|
+
/** The postal code of the scanning facility. */
|
|
376
|
+
postalCode?: string;
|
|
377
|
+
/** ISO-3166-1 alpha-2 country code. */
|
|
378
|
+
countryCode?: string;
|
|
379
|
+
};
|
|
380
|
+
/**
|
|
381
|
+
* Normalized tracking state for a specific package.
|
|
382
|
+
* * This structure provides a unified view of a shipment's progress across
|
|
383
|
+
* different carriers, making it ideal for tracking dashboards or automated
|
|
384
|
+
* status notifications.
|
|
385
|
+
*/
|
|
386
|
+
type NormalizedTracking = {
|
|
387
|
+
/** The carrier currently handling the shipment. */
|
|
388
|
+
carrier: "usps" | "fedex" | "ups";
|
|
389
|
+
/** The unique identifier for the package. */
|
|
390
|
+
trackingNumber: string;
|
|
391
|
+
/** The current high-level status (e.g., 'DELIVERED', 'IN_TRANSIT'). */
|
|
392
|
+
status: string;
|
|
393
|
+
/** * Predicted date and time of arrival.
|
|
394
|
+
* Formatted as an ISO-8601 string.
|
|
395
|
+
*/
|
|
396
|
+
estimatedDelivery?: string;
|
|
397
|
+
/** * A chronological list of all scan events associated with this tracking number.
|
|
398
|
+
* Typically ordered from newest to oldest.
|
|
399
|
+
*/
|
|
400
|
+
events: NormalizedTrackingEvent[];
|
|
401
|
+
/** * The original raw response from the carrier (e.g., USPS Tracking v3 JSON).
|
|
402
|
+
* Useful for accessing carrier-specific internal codes or raw XML/JSON.
|
|
403
|
+
*/
|
|
404
|
+
raw?: unknown;
|
|
405
|
+
};
|
|
406
|
+
|
|
407
|
+
/**
|
|
408
|
+
* Shipstack Error System
|
|
409
|
+
* Standardized error classes for multi-carrier shipping operations.
|
|
410
|
+
*/
|
|
411
|
+
/**
|
|
412
|
+
* Base error class for all Shipstack-related exceptions.
|
|
413
|
+
* * This class extends the native Error to include carrier context and the
|
|
414
|
+
* original 'cause' (e.g., a raw Axios or Fetch error), which is essential
|
|
415
|
+
* for debugging upstream carrier API failures.
|
|
416
|
+
* * @category Errors
|
|
417
|
+
*/
|
|
418
|
+
declare class ShipstackError extends Error {
|
|
419
|
+
carrier: "usps" | "fedex" | "ups";
|
|
420
|
+
cause?: unknown | undefined;
|
|
421
|
+
/**
|
|
422
|
+
* @param message - Human-readable error description.
|
|
423
|
+
* @param carrier - The carrier associated with the failure ('usps' | 'fedex' | 'ups').
|
|
424
|
+
* @param cause - The underlying error or raw API response responsible for the failure.
|
|
425
|
+
*/
|
|
426
|
+
constructor(message: string, carrier: "usps" | "fedex" | "ups", cause?: unknown | undefined);
|
|
427
|
+
}
|
|
428
|
+
/**
|
|
429
|
+
* Specialized error for API Rate Limiting (HTTP 429).
|
|
430
|
+
* * Carriers like FedEx and USPS enforce strict concurrent request limits.
|
|
431
|
+
* This error includes a 'retryAfter' hint per 2026 RFC standards to help
|
|
432
|
+
* implementers manage automated backoff logic.
|
|
433
|
+
* * @category Errors
|
|
434
|
+
*/
|
|
435
|
+
declare class ThrottlingError extends ShipstackError {
|
|
436
|
+
retryAfter?: number | undefined;
|
|
437
|
+
/**
|
|
438
|
+
* @param message - Description of the rate limit hit.
|
|
439
|
+
* @param carrier - The carrier that throttled the request.
|
|
440
|
+
* @param retryAfter - The number of seconds to wait before retrying (if provided by carrier).
|
|
441
|
+
* @param cause - The original 429 response.
|
|
442
|
+
*/
|
|
443
|
+
constructor(message: string, carrier: "usps" | "fedex" | "ups", retryAfter?: number | undefined, cause?: unknown);
|
|
444
|
+
}
|
|
445
|
+
/**
|
|
446
|
+
* Type Guard to check if an unknown error is a ShipstackError.
|
|
447
|
+
* @param error - The error to check.
|
|
448
|
+
*/
|
|
449
|
+
declare function isShipstackError(error: unknown): error is ShipstackError;
|
|
450
|
+
/**
|
|
451
|
+
* Type Guard to check if an error is specifically a ThrottlingError.
|
|
452
|
+
* @param error - The error to check.
|
|
453
|
+
*/
|
|
454
|
+
declare function isThrottlingError(error: unknown): error is ThrottlingError;
|
|
455
|
+
|
|
456
|
+
/**
|
|
457
|
+
* International Customs Declaration details.
|
|
458
|
+
* These are used during the Label generation (Shipment) phase.
|
|
459
|
+
*/
|
|
460
|
+
type CustomsDeclaration = {
|
|
461
|
+
/** Type of contents (e.g., 'GIFT', 'MERCHANDISE') */
|
|
462
|
+
contentsType: string;
|
|
463
|
+
/** Detailed description of the items */
|
|
464
|
+
description: string;
|
|
465
|
+
/** Total declared value */
|
|
466
|
+
value: number;
|
|
467
|
+
/** HS Tariff Code for classification */
|
|
468
|
+
hsTariffCode?: string;
|
|
469
|
+
/** Country of origin (ISO-3166-1 alpha-2) */
|
|
470
|
+
countryOfOrigin: string;
|
|
471
|
+
};
|
|
472
|
+
|
|
473
|
+
/**
|
|
474
|
+
* Shipstack Global Rates Aggregator
|
|
475
|
+
* * Orchestrates multi-carrier rate lookups using carrier-specific builders,
|
|
476
|
+
* authenticated clients, and standardized response converters.
|
|
477
|
+
*/
|
|
478
|
+
|
|
479
|
+
/**
|
|
480
|
+
* The core getRates function.
|
|
481
|
+
* * This service acts as the central router for the Shipstack library.
|
|
482
|
+
* It ensures that carrier-specific credentials are provided, payloads
|
|
483
|
+
* are correctly transformed, and responses are normalized.
|
|
484
|
+
* * @param {RateRequest} req - The agnostic rating request from the user.
|
|
485
|
+
* @param {ShippingConfig} config - The library configuration object containing credentials.
|
|
486
|
+
* @returns {Promise<NormalizedRate[]>} An array of standardized rates across available services.
|
|
487
|
+
* @throws {ShipstackError} If carrier-specific configuration is missing or the carrier is unsupported.
|
|
488
|
+
* @public
|
|
489
|
+
*/
|
|
490
|
+
declare function getRates$1(req: RateRequest$1, config: ShippingConfig): Promise<NormalizedRate[]>;
|
|
491
|
+
|
|
492
|
+
/**
|
|
493
|
+
* Shipstack Address API
|
|
494
|
+
* * Provides a unified interface for physical address validation and normalization
|
|
495
|
+
* across USPS, FedEx, and UPS. This module handles carrier-specific client
|
|
496
|
+
* initialization and parameter mapping.
|
|
497
|
+
*/
|
|
498
|
+
|
|
499
|
+
/**
|
|
500
|
+
* Validates and standardizes a physical address using the specified carrier.
|
|
501
|
+
* * This method orchestrates the full validation lifecycle:
|
|
502
|
+
* 1. Verifies carrier-specific credentials in the provided configuration.
|
|
503
|
+
* 2. Maps the agnostic Shipstack address format to the carrier's required schema.
|
|
504
|
+
* 3. Executes the remote validation call.
|
|
505
|
+
* 4. Returns a standardized result including the normalization status.
|
|
506
|
+
* * @param {AddressValidationRequest} req - The universal address request payload.
|
|
507
|
+
* @param {ShippingConfig} config - The library configuration containing carrier credentials.
|
|
508
|
+
* @returns {Promise<AddressValidationResult>} The validation status and normalized address data.
|
|
509
|
+
* @throws {ShipstackError} If configuration is missing or the carrier API rejects the request.
|
|
510
|
+
* @public
|
|
511
|
+
*/
|
|
512
|
+
declare function validateAddress$1(req: AddressValidationRequest, config: ShippingConfig): Promise<AddressValidationResult>;
|
|
513
|
+
|
|
514
|
+
/**
|
|
515
|
+
* Shipstack Tracking API
|
|
516
|
+
* * The public-facing interface for tracking operations.
|
|
517
|
+
* * This module serves as the primary entry point for tracking shipments.
|
|
518
|
+
* It orchestrates the underlying TrackingAggregator to handle carrier-specific
|
|
519
|
+
* batch limits, concurrency, and response normalization.
|
|
520
|
+
* * @module API/Tracking
|
|
521
|
+
*/
|
|
522
|
+
|
|
523
|
+
/**
|
|
524
|
+
* Retrieves standardized tracking information for one or more packages.
|
|
525
|
+
* * This is a high-level method designed for ease of use in UIs and backend
|
|
526
|
+
* workflows. It automatically handles the transition from single strings
|
|
527
|
+
* to arrays and initializes the necessary aggregator logic.
|
|
528
|
+
* * @param {string | string[]} trackingNumbers - A single string or array of tracking IDs.
|
|
529
|
+
* @param {"usps" | "fedex" | "ups"} carrier - The carrier service to query.
|
|
530
|
+
* @param {ShippingConfig} config - The library configuration containing credentials.
|
|
531
|
+
* @returns {Promise<NormalizedTracking[]>} An array of normalized tracking objects.
|
|
532
|
+
* @throws {ShipstackError} If the carrier is unsupported or the request fails.
|
|
533
|
+
* @public
|
|
534
|
+
*/
|
|
535
|
+
declare function trackShipment$1(trackingNumbers: string | string[], carrier: "usps" | "fedex" | "ups", config: ShippingConfig): Promise<NormalizedTracking[]>;
|
|
536
|
+
|
|
537
|
+
/**
|
|
538
|
+
* Shipstack High-Level Shipping API
|
|
539
|
+
* Standardized convenience methods for common logistics workflows.
|
|
540
|
+
*/
|
|
541
|
+
|
|
542
|
+
/**
|
|
543
|
+
* Builds a staged shipment payload for the specified carrier.
|
|
544
|
+
* * This function validates the carrier configuration and delegates
|
|
545
|
+
* the payload construction to the aggregator layer.
|
|
546
|
+
* @param req The agnostic shipment request payload.
|
|
547
|
+
* @param config The global library configuration.
|
|
548
|
+
* @returns A staged shipment object containing the carrier-specific payload.
|
|
549
|
+
*/
|
|
550
|
+
declare function buildShipment$1(req: ShipmentRequest, config: ShippingConfig): Promise<StagedShipment>;
|
|
551
|
+
/**
|
|
552
|
+
* WARNING:
|
|
553
|
+
* This method actually purchases a shipping label from the carrier.
|
|
554
|
+
* It should only be used in secure backend environments.
|
|
555
|
+
* For platform-agnostic workflows, use `buildShipment()` instead.
|
|
556
|
+
*/
|
|
557
|
+
/**
|
|
558
|
+
* Creates a shipping label and returns a normalized shipment object.
|
|
559
|
+
* * This is the primary entry point for generating labels across all carriers.
|
|
560
|
+
* * @param {ShipmentRequest} req - The agnostic shipment request payload.
|
|
561
|
+
* @param {ShippingConfig} config - The global library configuration.
|
|
562
|
+
* @returns {Promise<NormalizedShipment>} The generated label and tracking info.
|
|
563
|
+
* @throws {ShipstackError} If configuration is missing or carrier API fails.
|
|
564
|
+
* @category Core API
|
|
565
|
+
* @public
|
|
566
|
+
*/
|
|
567
|
+
declare function createShipment$1(req: ShipmentRequest, config: ShippingConfig): Promise<NormalizedShipment>;
|
|
568
|
+
/**
|
|
569
|
+
* Retrieves the single lowest-cost shipping option across all configured carriers.
|
|
570
|
+
*/
|
|
571
|
+
declare function getBestValueRate$1(req: RateRequest$1, config: ShippingConfig): Promise<NormalizedRate | null>;
|
|
572
|
+
/**
|
|
573
|
+
* Identifies the shipping option with the shortest estimated transit time.
|
|
574
|
+
*/
|
|
575
|
+
declare function getFastestService$1(req: RateRequest$1, config: ShippingConfig): Promise<NormalizedRate | null>;
|
|
576
|
+
/**
|
|
577
|
+
* Heuristic utility to predict a carrier based on standard tracking number patterns.
|
|
578
|
+
*/
|
|
579
|
+
declare function predictCarrier$1(trackingNumber: string): "usps" | "fedex" | "ups" | "unknown";
|
|
580
|
+
|
|
581
|
+
/**
|
|
582
|
+
* Transforms an agnostic Shipstack RateRequest into a FedEx-specific rating payload.
|
|
583
|
+
*
|
|
584
|
+
* FedEx requires the account number within the request body to unlock negotiated rates.
|
|
585
|
+
* Dimensions are rounded up (Math.ceil) to comply with carrier billing rules.
|
|
586
|
+
*
|
|
587
|
+
* @param req - The internal Shipstack RateRequest.
|
|
588
|
+
* @param accountNumber - The FedEx account number for the rating context.
|
|
589
|
+
* @returns {any} A formatted payload matching the FedEx 'body' model.
|
|
590
|
+
*/
|
|
591
|
+
declare function buildFedexRateRequest(req: RateRequest$1, accountNumber: string): any;
|
|
592
|
+
|
|
593
|
+
/**
|
|
594
|
+
* The destination ZIP code for the package.
|
|
595
|
+
*/
|
|
596
|
+
type destinationZIPCode = string;
|
|
597
|
+
|
|
598
|
+
/**
|
|
599
|
+
* This is the package height in inches.
|
|
600
|
+
*/
|
|
601
|
+
type height = number;
|
|
602
|
+
|
|
603
|
+
/**
|
|
604
|
+
* This is the package length in inches. The maximum dimension is always length.
|
|
605
|
+
*/
|
|
606
|
+
type length = number;
|
|
607
|
+
|
|
608
|
+
/**
|
|
609
|
+
* The mail service requested.
|
|
610
|
+
*
|
|
611
|
+
* Note:
|
|
612
|
+
* - A single mail class option is deprecated and will be removed in the next major revision. This attribute will be replaced with the array of mail classes.
|
|
613
|
+
* - `PARCEL_SELECT_LIGHTWEIGHT` is deprecated and will convert to `PARCEL_SELECT`
|
|
614
|
+
* - `FIRST-CLASS_PACKAGE_SERVICE` is deprecated and will convert to `USPS_GROUND_ADVANTAGE`
|
|
615
|
+
* - `USPS_RETAIL_GROUND` is no longer supported and will return a 400 if used
|
|
616
|
+
* @deprecated
|
|
617
|
+
*/
|
|
618
|
+
declare enum mailClassOutboundOnly {
|
|
619
|
+
PARCEL_SELECT = "PARCEL_SELECT",
|
|
620
|
+
PARCEL_SELECT_LIGHTWEIGHT = "PARCEL_SELECT_LIGHTWEIGHT",
|
|
621
|
+
PRIORITY_MAIL_EXPRESS = "PRIORITY_MAIL_EXPRESS",
|
|
622
|
+
PRIORITY_MAIL = "PRIORITY_MAIL",
|
|
623
|
+
FIRST_CLASS_PACKAGE_SERVICE = "FIRST-CLASS_PACKAGE_SERVICE",
|
|
624
|
+
LIBRARY_MAIL = "LIBRARY_MAIL",
|
|
625
|
+
MEDIA_MAIL = "MEDIA_MAIL",
|
|
626
|
+
BOUND_PRINTED_MATTER = "BOUND_PRINTED_MATTER",
|
|
627
|
+
USPS_CONNECT_LOCAL = "USPS_CONNECT_LOCAL",
|
|
628
|
+
USPS_CONNECT_MAIL = "USPS_CONNECT_MAIL",
|
|
629
|
+
USPS_CONNECT_REGIONAL = "USPS_CONNECT_REGIONAL",
|
|
630
|
+
USPS_GROUND_ADVANTAGE = "USPS_GROUND_ADVANTAGE",
|
|
631
|
+
USPS_RETAIL_GROUND = "USPS_RETAIL_GROUND",
|
|
632
|
+
ALL = "ALL"
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
/**
|
|
636
|
+
* An Array of mail classes
|
|
637
|
+
*
|
|
638
|
+
* Note:
|
|
639
|
+
* - `PARCEL_SELECT_LIGHTWEIGHT` is deprecated and will convert to `PARCEL_SELECT`
|
|
640
|
+
* - `FIRST-CLASS_PACKAGE_SERVICE` is deprecated and will convert to `USPS_GROUND_ADVANTAGE`
|
|
641
|
+
* - `USPS_RETAIL_GROUND` is no longer supported and will return a 400 if used
|
|
642
|
+
*
|
|
643
|
+
*/
|
|
644
|
+
type mailClassesOutboundOnly = Array<mailClassOutboundOnly>;
|
|
645
|
+
|
|
646
|
+
/**
|
|
647
|
+
* The date the package or letter/flat/card will be mailed. The mailing date may be today plus 0 to 7 days in advance.
|
|
648
|
+
*/
|
|
649
|
+
type mailingDate = string;
|
|
650
|
+
|
|
651
|
+
/**
|
|
652
|
+
* The originating ZIP code for the package.
|
|
653
|
+
*/
|
|
654
|
+
type originZIPCode = string;
|
|
655
|
+
|
|
656
|
+
/**
|
|
657
|
+
* Price type can be * 'RETAIL' * 'COMMERCIAL' * 'CONTRACT' * 'NSA' (deprecated)
|
|
658
|
+
*/
|
|
659
|
+
declare enum priceType {
|
|
660
|
+
RETAIL = "RETAIL",
|
|
661
|
+
COMMERCIAL = "COMMERCIAL",
|
|
662
|
+
CONTRACT = "CONTRACT",
|
|
663
|
+
NSA = "NSA"
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
/**
|
|
667
|
+
* This is the calculated weight for the package based on user input. The greater of dimWeight and weight will be used to calculated the rate. Weight unit of measurement is in pounds.
|
|
668
|
+
*/
|
|
669
|
+
type weightPounds = number;
|
|
670
|
+
|
|
671
|
+
/**
|
|
672
|
+
* This is the package width in inches. The second longest dimension is always width.
|
|
673
|
+
*/
|
|
674
|
+
type width = number;
|
|
675
|
+
|
|
676
|
+
/**
|
|
677
|
+
* Informative details about all possible prices based on the ingredients.
|
|
678
|
+
*/
|
|
679
|
+
type RateListQuery = {
|
|
680
|
+
originZIPCode: originZIPCode;
|
|
681
|
+
destinationZIPCode: destinationZIPCode;
|
|
682
|
+
weight: weightPounds;
|
|
683
|
+
length: length;
|
|
684
|
+
width: width;
|
|
685
|
+
height: height;
|
|
686
|
+
mailClass?: mailClassOutboundOnly;
|
|
687
|
+
mailClasses?: mailClassesOutboundOnly;
|
|
688
|
+
priceType?: priceType;
|
|
689
|
+
mailingDate?: mailingDate;
|
|
690
|
+
/**
|
|
691
|
+
* The type of payment account linked to a contract rate.
|
|
692
|
+
*/
|
|
693
|
+
accountType?: RateListQuery.accountType;
|
|
694
|
+
/**
|
|
695
|
+
* The Enterprise Payment Account, Permit number or PC Postage meter number associated with a contract.
|
|
696
|
+
*/
|
|
697
|
+
accountNumber?: string;
|
|
698
|
+
/**
|
|
699
|
+
* Package is nonstandard. Nonstandard packages include cylindrical tubes and rolls, certain high-density items, cartons containing more than 24 ounces of liquids in one or more glass containers, cartons containing 1 gallon or more of liquid in metal or plastic containers, and items in [201.7.6.2](https://pe.usps.com/text/dmm300/201.htm#7.6.2).
|
|
700
|
+
*/
|
|
701
|
+
hasNonstandardCharacteristics?: boolean;
|
|
702
|
+
};
|
|
703
|
+
declare namespace RateListQuery {
|
|
704
|
+
/**
|
|
705
|
+
* The type of payment account linked to a contract rate.
|
|
706
|
+
*/
|
|
707
|
+
enum accountType {
|
|
708
|
+
EPS = "EPS",
|
|
709
|
+
PERMIT = "PERMIT",
|
|
710
|
+
METER = "METER"
|
|
711
|
+
}
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
/**
|
|
715
|
+
* Extra Service Code requested.
|
|
716
|
+
* * 415 - USPS Label Delivery Service
|
|
717
|
+
* * 480 - Tracking Plus 6 Months
|
|
718
|
+
* * 481 - Tracking Plus 1 Year
|
|
719
|
+
* * 482 - Tracking Plus 3 Years
|
|
720
|
+
* * 483 - Tracking Plus 5 Years
|
|
721
|
+
* * 484 - Tracking Plus 7 Years
|
|
722
|
+
* * 485 - Tracking Plus 10 Years
|
|
723
|
+
* * 486 - Tracking Plus Signature 3 Years
|
|
724
|
+
* * 487 - Tracking Plus Signature 5 Years
|
|
725
|
+
* * 488 - Tracking Plus Signature 7 Years
|
|
726
|
+
* * 489 - Tracking Plus Signature 10 Years
|
|
727
|
+
* * 498 - PO Box Locker – Stocking Fee (NSA Only)
|
|
728
|
+
* * 500 - PO Box Locker – Self-Service Pickup Fee (NSA Only)
|
|
729
|
+
* * 501 - PO Box Locker – Clerk-Assisted Pickup Fee (NSA Only)
|
|
730
|
+
* * 502 - PO Box Locker – Local Delivery Fee (NSA Only)
|
|
731
|
+
* * 810 - Hazardous Materials - Air Eligible Ethanol
|
|
732
|
+
* * 811 - Hazardous Materials - Class 1 – Toy Propellant/Safety Fuse Package
|
|
733
|
+
* * 812 - Hazardous Materials - Class 3 - Flammable and Combustible Liquids
|
|
734
|
+
* * 813 - Hazardous Materials - Class 7 – Radioactive Materials
|
|
735
|
+
* * 814 - Hazardous Materials - Class 8 – Air Eligible Corrosive Materials
|
|
736
|
+
* * 815 - Hazardous Materials - Class 8 – Nonspillable Wet Batteries
|
|
737
|
+
* * 816 - Hazardous Materials - Class 9 - Lithium Battery Marked Ground Only
|
|
738
|
+
* * 817 - Hazardous Materials - Class 9 - Lithium Battery Returns
|
|
739
|
+
* * 818 - Hazardous Materials - Class 9 - Marked Lithium Batteries
|
|
740
|
+
* * 819 - Hazardous Materials - Class 9 – Dry Ice
|
|
741
|
+
* * 820 - Hazardous Materials - Class 9 – Unmarked Lithium Batteries
|
|
742
|
+
* * 821 - Hazardous Materials - Class 9 – Magnetized Materials
|
|
743
|
+
* * 822 - Hazardous Materials - Division 4.1 – Mailable Flammable Solids and Safety Matches
|
|
744
|
+
* * 823 - Hazardous Materials - Division 5.1 – Oxidizers
|
|
745
|
+
* * 824 - Hazardous Materials - Division 5.2 – Organic Peroxides
|
|
746
|
+
* * 825 - Hazardous Materials - Division 6.1 – Toxic Materials
|
|
747
|
+
* * 826 - Hazardous Materials - Division 6.2 Biological Materials
|
|
748
|
+
* * 827 - Hazardous Materials - Excepted Quantity Provision
|
|
749
|
+
* * 828 - Hazardous Materials - Ground Only Hazardous Materials
|
|
750
|
+
* * 829 - Hazardous Materials - Air Eligible ID8000 Consumer Commodity
|
|
751
|
+
* * 830 - Hazardous Materials - Lighters
|
|
752
|
+
* * 831 - Hazardous Materials - Limited Quantity Ground
|
|
753
|
+
* * 832 - Hazardous Materials - Small Quantity Provision (Markings Required)
|
|
754
|
+
* * 853 - Special Handling - Perishable Material
|
|
755
|
+
* * 856 - Live Animal Transportation Fee
|
|
756
|
+
* * 857 - Hazardous Materials
|
|
757
|
+
* * 858 - Cremated Remains
|
|
758
|
+
* * 910 - Certified Mail
|
|
759
|
+
* * 911 - Certified Mail Restricted Delivery
|
|
760
|
+
* * 912 - Certified Mail Adult Signature Required
|
|
761
|
+
* * 913 - Certified Mail Adult Signature Restricted Delivery
|
|
762
|
+
* * 915 - Collect on Delivery
|
|
763
|
+
* * 917 - Collect on Delivery Restricted Delivery
|
|
764
|
+
* * 920 - USPS Tracking Electronic
|
|
765
|
+
* * 921 - Signature Confirmation
|
|
766
|
+
* * 922 - Adult Signature Required
|
|
767
|
+
* * 923 - Adult Signature Restricted Delivery
|
|
768
|
+
* * 924 - Signature Confirmation Restricted Delivery
|
|
769
|
+
* * 925 - Priority Mail Express Merchandise Insurance
|
|
770
|
+
* * 930 - Insurance <= $500
|
|
771
|
+
* * 931 - Insurance > $500
|
|
772
|
+
* * 934 - Insurance Restricted Delivery
|
|
773
|
+
* * 940 - Registered Mail
|
|
774
|
+
* * 941 - Registered Mail Restricted Delivery
|
|
775
|
+
* * 955 - Return Receipt
|
|
776
|
+
* * 957 - Return Receipt Electronic
|
|
777
|
+
* * 972 - Live Animal and Perishable Handling Fee
|
|
778
|
+
* * 981 - Signature Requested (PRIORITY_MAIL_EXPRESS only)
|
|
779
|
+
* * 984 - Parcel Locker Delivery
|
|
780
|
+
* * 986 - PO to Addressee (PRIORITY_MAIL_EXPRESS only)
|
|
781
|
+
* * 991 - Sunday Delivery
|
|
782
|
+
*
|
|
783
|
+
* <b>Note:</b> Entering a single extra service will be removed in the next major revision.
|
|
784
|
+
*
|
|
785
|
+
*/
|
|
786
|
+
declare enum ExtraService {
|
|
787
|
+
'_415' = 415,
|
|
788
|
+
'_480' = 480,
|
|
789
|
+
'_481' = 481,
|
|
790
|
+
'_482' = 482,
|
|
791
|
+
'_483' = 483,
|
|
792
|
+
'_484' = 484,
|
|
793
|
+
'_485' = 485,
|
|
794
|
+
'_486' = 486,
|
|
795
|
+
'_487' = 487,
|
|
796
|
+
'_488' = 488,
|
|
797
|
+
'_489' = 489,
|
|
798
|
+
'_498' = 498,
|
|
799
|
+
'_500' = 500,
|
|
800
|
+
'_501' = 501,
|
|
801
|
+
'_502' = 502,
|
|
802
|
+
'_810' = 810,
|
|
803
|
+
'_811' = 811,
|
|
804
|
+
'_812' = 812,
|
|
805
|
+
'_813' = 813,
|
|
806
|
+
'_814' = 814,
|
|
807
|
+
'_815' = 815,
|
|
808
|
+
'_816' = 816,
|
|
809
|
+
'_817' = 817,
|
|
810
|
+
'_818' = 818,
|
|
811
|
+
'_819' = 819,
|
|
812
|
+
'_820' = 820,
|
|
813
|
+
'_821' = 821,
|
|
814
|
+
'_822' = 822,
|
|
815
|
+
'_823' = 823,
|
|
816
|
+
'_824' = 824,
|
|
817
|
+
'_825' = 825,
|
|
818
|
+
'_826' = 826,
|
|
819
|
+
'_827' = 827,
|
|
820
|
+
'_828' = 828,
|
|
821
|
+
'_829' = 829,
|
|
822
|
+
'_830' = 830,
|
|
823
|
+
'_831' = 831,
|
|
824
|
+
'_832' = 832,
|
|
825
|
+
'_853' = 853,
|
|
826
|
+
'_856' = 856,
|
|
827
|
+
'_857' = 857,
|
|
828
|
+
'_858' = 858,
|
|
829
|
+
'_910' = 910,
|
|
830
|
+
'_911' = 911,
|
|
831
|
+
'_912' = 912,
|
|
832
|
+
'_913' = 913,
|
|
833
|
+
'_915' = 915,
|
|
834
|
+
'_917' = 917,
|
|
835
|
+
'_920' = 920,
|
|
836
|
+
'_921' = 921,
|
|
837
|
+
'_922' = 922,
|
|
838
|
+
'_923' = 923,
|
|
839
|
+
'_924' = 924,
|
|
840
|
+
'_925' = 925,
|
|
841
|
+
'_930' = 930,
|
|
842
|
+
'_931' = 931,
|
|
843
|
+
'_934' = 934,
|
|
844
|
+
'_940' = 940,
|
|
845
|
+
'_941' = 941,
|
|
846
|
+
'_955' = 955,
|
|
847
|
+
'_957' = 957,
|
|
848
|
+
'_972' = 972,
|
|
849
|
+
'_981' = 981,
|
|
850
|
+
'_984' = 984,
|
|
851
|
+
'_986' = 986,
|
|
852
|
+
'_991' = 991
|
|
853
|
+
}
|
|
854
|
+
|
|
855
|
+
/**
|
|
856
|
+
* Extra Service Codes requested. If omitted, all available extra services will be returned. To narrow the results, provide a specific set of extra service codes. For convenience, use `986` for `PRIORITY_MAIL_EXPRESS` or `920` for all other `mailClasses`.
|
|
857
|
+
* * 415 - USPS Label Delivery Service
|
|
858
|
+
* * 480 - Tracking Plus 6 Months
|
|
859
|
+
* * 481 - Tracking Plus 1 Year
|
|
860
|
+
* * 482 - Tracking Plus 3 Years
|
|
861
|
+
* * 483 - Tracking Plus 5 Years
|
|
862
|
+
* * 484 - Tracking Plus 7 Years
|
|
863
|
+
* * 485 - Tracking Plus 10 Years
|
|
864
|
+
* * 486 - Tracking Plus Signature 3 Years
|
|
865
|
+
* * 487 - Tracking Plus Signature 5 Years
|
|
866
|
+
* * 488 - Tracking Plus Signature 7 Years
|
|
867
|
+
* * 489 - Tracking Plus Signature 10 Years
|
|
868
|
+
* * 498 - PO Box Locker – Stocking Fee (NSA Only)
|
|
869
|
+
* * 500 - PO Box Locker – Self-Service Pickup Fee (NSA Only)
|
|
870
|
+
* * 501 - PO Box Locker – Clerk-Assisted Pickup Fee (NSA Only)
|
|
871
|
+
* * 502 - PO Box Locker – Local Delivery Fee (NSA Only)
|
|
872
|
+
* * 810 - Hazardous Materials - Air Eligible Ethanol
|
|
873
|
+
* * 811 - Hazardous Materials - Class 1 – Toy Propellant/Safety Fuse Package
|
|
874
|
+
* * 812 - Hazardous Materials - Class 3 - Flammable and Combustible Liquids
|
|
875
|
+
* * 813 - Hazardous Materials - Class 7 – Radioactive Materials
|
|
876
|
+
* * 814 - Hazardous Materials - Class 8 – Air Eligible Corrosive Materials
|
|
877
|
+
* * 815 - Hazardous Materials - Class 8 – Nonspillable Wet Batteries
|
|
878
|
+
* * 816 - Hazardous Materials - Class 9 - Lithium Battery Marked Ground Only
|
|
879
|
+
* * 817 - Hazardous Materials - Class 9 - Lithium Battery Returns
|
|
880
|
+
* * 818 - Hazardous Materials - Class 9 - Marked Lithium Batteries
|
|
881
|
+
* * 819 - Hazardous Materials - Class 9 – Dry Ice
|
|
882
|
+
* * 820 - Hazardous Materials - Class 9 – Unmarked Lithium Batteries
|
|
883
|
+
* * 821 - Hazardous Materials - Class 9 – Magnetized Materials
|
|
884
|
+
* * 822 - Hazardous Materials - Division 4.1 – Mailable Flammable Solids and Safety Matches
|
|
885
|
+
* * 823 - Hazardous Materials - Division 5.1 – Oxidizers
|
|
886
|
+
* * 824 - Hazardous Materials - Division 5.2 – Organic Peroxides
|
|
887
|
+
* * 825 - Hazardous Materials - Division 6.1 – Toxic Materials
|
|
888
|
+
* * 826 - Hazardous Materials - Division 6.2 Biological Materials
|
|
889
|
+
* * 827 - Hazardous Materials - Excepted Quantity Provision
|
|
890
|
+
* * 828 - Hazardous Materials - Ground Only Hazardous Materials
|
|
891
|
+
* * 829 - Hazardous Materials - Air Eligible ID8000 Consumer Commodity
|
|
892
|
+
* * 830 - Hazardous Materials - Lighters
|
|
893
|
+
* * 831 - Hazardous Materials - Limited Quantity Ground
|
|
894
|
+
* * 832 - Hazardous Materials - Small Quantity Provision (Markings Required)
|
|
895
|
+
* * 853 - Special Handling - Perishable Material
|
|
896
|
+
* * 856 - Live Animal Transportation Fee
|
|
897
|
+
* * 857 - Hazardous Materials
|
|
898
|
+
* * 858 - Cremated Remains
|
|
899
|
+
* * 910 - Certified Mail
|
|
900
|
+
* * 911 - Certified Mail Restricted Delivery
|
|
901
|
+
* * 912 - Certified Mail Adult Signature Required
|
|
902
|
+
* * 913 - Certified Mail Adult Signature Restricted Delivery
|
|
903
|
+
* * 915 - Collect on Delivery
|
|
904
|
+
* * 917 - Collect on Delivery Restricted Delivery
|
|
905
|
+
* * 920 - USPS Tracking Electronic
|
|
906
|
+
* * 921 - Signature Confirmation
|
|
907
|
+
* * 922 - Adult Signature Required
|
|
908
|
+
* * 923 - Adult Signature Restricted Delivery
|
|
909
|
+
* * 924 - Signature Confirmation Restricted Delivery
|
|
910
|
+
* * 925 - Priority Mail Express Merchandise Insurance
|
|
911
|
+
* * 930 - Insurance <= $500
|
|
912
|
+
* * 931 - Insurance > $500
|
|
913
|
+
* * 934 - Insurance Restricted Delivery
|
|
914
|
+
* * 940 - Registered Mail
|
|
915
|
+
* * 941 - Registered Mail Restricted Delivery
|
|
916
|
+
* * 955 - Return Receipt
|
|
917
|
+
* * 957 - Return Receipt Electronic
|
|
918
|
+
* * 972 - Live Animal and Perishable Handling Fee
|
|
919
|
+
* * 981 - Signature Requested (PRIORITY_MAIL_EXPRESS only)
|
|
920
|
+
* * 984 - Parcel Locker Delivery
|
|
921
|
+
* * 986 - PO to Addressee (PRIORITY_MAIL_EXPRESS only)
|
|
922
|
+
* * 991 - Sunday Delivery
|
|
923
|
+
*
|
|
924
|
+
*/
|
|
925
|
+
type TotalRatesExtraServices = Array<ExtraService>;
|
|
926
|
+
|
|
927
|
+
/**
|
|
928
|
+
* Search parameters for base rate and extra service rate.
|
|
929
|
+
*/
|
|
930
|
+
type TotalRatesQuery = (RateListQuery & {
|
|
931
|
+
/**
|
|
932
|
+
* The value of the item. Required for Insurance, Registered Mail, and Collect on Delivery.
|
|
933
|
+
*/
|
|
934
|
+
itemValue?: number;
|
|
935
|
+
extraServices?: TotalRatesExtraServices;
|
|
936
|
+
});
|
|
937
|
+
|
|
938
|
+
/**
|
|
939
|
+
* Transforms a generic internal RateRequest into a USPS-specific TotalRatesQuery.
|
|
940
|
+
* This builder handles unit conversions (ounces to pounds) and maps generic
|
|
941
|
+
* shipping properties to USPS Domestic Prices v10 schema requirements.
|
|
942
|
+
* * @param req - The normalized internal rate request object.
|
|
943
|
+
* @returns A TotalRatesQuery object compatible with the USPS v3 generated SDK.
|
|
944
|
+
*/
|
|
945
|
+
declare function buildUspsRateRequest(req: RateRequest$1): TotalRatesQuery;
|
|
946
|
+
|
|
947
|
+
/**
|
|
948
|
+
* Customer classification container. Valid if ShipFrom country or territory is "US"
|
|
949
|
+
*/
|
|
950
|
+
type RateRequest_CustomerClassification = {
|
|
951
|
+
/**
|
|
952
|
+
* Customer classification code. Valid values:00 - Rates Associated with Shipper Number01 - Daily Rates04 - Retail Rates05 - Regional Rates06 - General List Rates53 - Standard List RatesLength is not validated.If customer classification code is not a valid value please refer to Rate Types Table on page 11.
|
|
953
|
+
*/
|
|
954
|
+
Code: string;
|
|
955
|
+
/**
|
|
956
|
+
* Customer classification description of the code above. Ignored if provided in the Request. Length is not validated.
|
|
957
|
+
*/
|
|
958
|
+
Description?: string;
|
|
959
|
+
};
|
|
960
|
+
|
|
961
|
+
/**
|
|
962
|
+
* Pickup Type container tag.
|
|
963
|
+
*/
|
|
964
|
+
type RateRequest_PickupType = {
|
|
965
|
+
/**
|
|
966
|
+
* Pickup Type Code. Valid values: 01 - Daily Pickup (Default - used when an invalid pickup type code is provided)03 - Customer Counter06 - One Time Pickup19 - Letter Center20 - Air Service CenterLength is not validated. When negotiated rates are requested, 07 (onCallAir) will be ignored.Refer to the Rate Types Table in the Appendix for rate type based on Pickup Type and Customer Classification Code.
|
|
967
|
+
*/
|
|
968
|
+
Code: string;
|
|
969
|
+
/**
|
|
970
|
+
* Pickup Type Description. Ignored if provided in the Request.
|
|
971
|
+
*/
|
|
972
|
+
Description?: string;
|
|
973
|
+
};
|
|
974
|
+
|
|
975
|
+
/**
|
|
976
|
+
* TransactionReference identifies transactions between client and server.
|
|
977
|
+
*/
|
|
978
|
+
type Request_TransactionReference = {
|
|
979
|
+
/**
|
|
980
|
+
* May be used to synchronize request/response pairs. Information in the request element is echoed back in the response.
|
|
981
|
+
*/
|
|
982
|
+
CustomerContext?: string;
|
|
983
|
+
};
|
|
984
|
+
|
|
985
|
+
/**
|
|
986
|
+
* Request container. N/A
|
|
987
|
+
*/
|
|
988
|
+
type RateRequest_Request = {
|
|
989
|
+
/**
|
|
990
|
+
* Indicates Rate API to display the new release features in Rate API response based on Rate release. See the What's New section for the latest Rate release. Supported values: 1601, 1607, 1701, 1707, 2108, 2205,2407,2409
|
|
991
|
+
*/
|
|
992
|
+
SubVersion?: string;
|
|
993
|
+
TransactionReference?: Request_TransactionReference;
|
|
994
|
+
};
|
|
995
|
+
|
|
996
|
+
/**
|
|
997
|
+
* Address container for Alternate Delivery Address.
|
|
998
|
+
*/
|
|
999
|
+
type AlternateDeliveryAddress_Address = {
|
|
1000
|
+
/**
|
|
1001
|
+
* The UPS Access Point's street address, including name and number (when applicable). Length is not validated.
|
|
1002
|
+
*/
|
|
1003
|
+
AddressLine?: Array<string>;
|
|
1004
|
+
/**
|
|
1005
|
+
* UPS Access Point city.
|
|
1006
|
+
*/
|
|
1007
|
+
City?: string;
|
|
1008
|
+
/**
|
|
1009
|
+
* UPS Access Point State or Province code.
|
|
1010
|
+
*/
|
|
1011
|
+
StateProvinceCode?: string;
|
|
1012
|
+
/**
|
|
1013
|
+
* UPS Access Point Postal code.
|
|
1014
|
+
*/
|
|
1015
|
+
PostalCode?: string;
|
|
1016
|
+
/**
|
|
1017
|
+
* UPS Access Point country or territory code.
|
|
1018
|
+
*/
|
|
1019
|
+
CountryCode: string;
|
|
1020
|
+
/**
|
|
1021
|
+
* Presence/Absence Indicator. Any value inside is ignored.This field is a flag to indicate if the Alternate Delivery location is a residential location. True if ResidentialAddressIndicator tag exists. For future use.
|
|
1022
|
+
*/
|
|
1023
|
+
ResidentialAddressIndicator?: string;
|
|
1024
|
+
/**
|
|
1025
|
+
* Presence/Absence Indicator. Any value inside is ignored.
|
|
1026
|
+
*
|
|
1027
|
+
* This field is a flag to indicate if the Alternate Delivery location is a PO box location.
|
|
1028
|
+
*
|
|
1029
|
+
* True if POBoxIndicator tag exists; false otherwise. Not valid with Shipment Indication Types:
|
|
1030
|
+
* - 01 - Hold for Pickup at UPS Access Point
|
|
1031
|
+
* - 02 - UPS Access Point™ Delivery
|
|
1032
|
+
*
|
|
1033
|
+
*/
|
|
1034
|
+
POBoxIndicator?: string;
|
|
1035
|
+
};
|
|
1036
|
+
|
|
1037
|
+
/**
|
|
1038
|
+
* Alternate Delivery Address container. Applies for deliveries to UPS Access Point™ locations.
|
|
1039
|
+
*
|
|
1040
|
+
* Required for the following ShipmentIndicationType values:
|
|
1041
|
+
* - 01 - Hold for Pickup at UPS Access Point™
|
|
1042
|
+
* - 02 - UPS Access Point™ Delivery
|
|
1043
|
+
*
|
|
1044
|
+
*/
|
|
1045
|
+
type Shipment_AlternateDeliveryAddress = {
|
|
1046
|
+
/**
|
|
1047
|
+
* UPS Access Point location name.
|
|
1048
|
+
*/
|
|
1049
|
+
Name?: string;
|
|
1050
|
+
Address: AlternateDeliveryAddress_Address;
|
|
1051
|
+
};
|
|
1052
|
+
|
|
1053
|
+
/**
|
|
1054
|
+
* Pickup container.
|
|
1055
|
+
*/
|
|
1056
|
+
type DeliveryTimeInformation_Pickup = {
|
|
1057
|
+
/**
|
|
1058
|
+
* Shipment Date; The Pickup date is a Shipment Date and it is a required input field. The user is allowed to query up to 35 days into the past and 60 days into the future. Format: YYYYMMDD If a date is not provided, it will be defaulted to the current system date.
|
|
1059
|
+
*/
|
|
1060
|
+
Date: string;
|
|
1061
|
+
/**
|
|
1062
|
+
* Reflects the time the package is tendered to UPS for shipping (can be dropped off at UPS or picked up by UPS). Military Time Format HHMMSS or HHMM. Invalid pickup time will not be validated.
|
|
1063
|
+
*/
|
|
1064
|
+
Time?: string;
|
|
1065
|
+
};
|
|
1066
|
+
|
|
1067
|
+
/**
|
|
1068
|
+
* Return contract services container
|
|
1069
|
+
*/
|
|
1070
|
+
type DeliveryTimeInformation_ReturnContractServices = {
|
|
1071
|
+
/**
|
|
1072
|
+
* Return contract Service code. Valid Code "01" - Heavy Goods. If 01 will return Heavy Goods service transit times for a given origin and destination (if applicable) Invalid Code will be ignore.
|
|
1073
|
+
*/
|
|
1074
|
+
Code: string;
|
|
1075
|
+
/**
|
|
1076
|
+
* Return contract service Description
|
|
1077
|
+
*/
|
|
1078
|
+
Description?: string;
|
|
1079
|
+
};
|
|
1080
|
+
|
|
1081
|
+
/**
|
|
1082
|
+
* Container for requesting Time In Transit Information. Required to view time in transit information. Required to view any time in transit information.
|
|
1083
|
+
*/
|
|
1084
|
+
type Shipment_DeliveryTimeInformation = {
|
|
1085
|
+
/**
|
|
1086
|
+
* Valid values are:
|
|
1087
|
+
* - 02 - Document only
|
|
1088
|
+
* - 03 - Non-Document
|
|
1089
|
+
* - 04 - WWEF Pallet
|
|
1090
|
+
* - 07 - Domestic Pallet
|
|
1091
|
+
*
|
|
1092
|
+
* If 04 is included, Worldwide Express Freight and UPS Worldwide Express Freight Midday services (if applicable) will be included in the response.
|
|
1093
|
+
*
|
|
1094
|
+
*/
|
|
1095
|
+
PackageBillType: string;
|
|
1096
|
+
Pickup?: DeliveryTimeInformation_Pickup;
|
|
1097
|
+
ReturnContractServices?: Array<DeliveryTimeInformation_ReturnContractServices>;
|
|
1098
|
+
};
|
|
1099
|
+
|
|
1100
|
+
/**
|
|
1101
|
+
* Unit of Measurement container for the Adjusted height.
|
|
1102
|
+
*/
|
|
1103
|
+
type AdjustedHeight_UnitOfMeasurement = {
|
|
1104
|
+
/**
|
|
1105
|
+
* Code associated with Unit of Measurement for the Adjusted height. Valid value is IN Unit of measurement code for Adjusted height is validated only when Handling unit type is SKD = Skid or PLT = Pallet.
|
|
1106
|
+
*/
|
|
1107
|
+
Code: string;
|
|
1108
|
+
/**
|
|
1109
|
+
* Description for Code associated with Unit of Measurement for the Adjusted height.
|
|
1110
|
+
*/
|
|
1111
|
+
Description: string;
|
|
1112
|
+
};
|
|
1113
|
+
|
|
1114
|
+
/**
|
|
1115
|
+
* Container to hold Adjusted Height information. Required if AdjustedHeightIndicator is present.
|
|
1116
|
+
*/
|
|
1117
|
+
type FreightDensityInfo_AdjustedHeight = {
|
|
1118
|
+
/**
|
|
1119
|
+
* Adjusted Height value for the handling unit.
|
|
1120
|
+
*/
|
|
1121
|
+
Value: string;
|
|
1122
|
+
UnitOfMeasurement: AdjustedHeight_UnitOfMeasurement;
|
|
1123
|
+
};
|
|
1124
|
+
|
|
1125
|
+
/**
|
|
1126
|
+
* UnitOfMeasurement container.
|
|
1127
|
+
*/
|
|
1128
|
+
type HandlingUnits_UnitOfMeasurement = {
|
|
1129
|
+
/**
|
|
1130
|
+
* Code for UnitOfMeasurement for the line item dimension. Valid value - IN = Inches
|
|
1131
|
+
*/
|
|
1132
|
+
Code: string;
|
|
1133
|
+
/**
|
|
1134
|
+
* Description for UnitOfMeasurement for the line item dimension.
|
|
1135
|
+
*/
|
|
1136
|
+
Description: string;
|
|
1137
|
+
};
|
|
1138
|
+
|
|
1139
|
+
/**
|
|
1140
|
+
* Dimension of the HandlingUnit container for density based pricing.
|
|
1141
|
+
*/
|
|
1142
|
+
type HandlingUnits_Dimensions = {
|
|
1143
|
+
UnitOfMeasurement: HandlingUnits_UnitOfMeasurement;
|
|
1144
|
+
/**
|
|
1145
|
+
* The length of the line item used to determine dimensional weight.
|
|
1146
|
+
*/
|
|
1147
|
+
Length: string;
|
|
1148
|
+
/**
|
|
1149
|
+
* The width of the line item used to determine dimensional weight.
|
|
1150
|
+
*/
|
|
1151
|
+
Width: string;
|
|
1152
|
+
/**
|
|
1153
|
+
* The height of the line item used to determine dimensional weight.
|
|
1154
|
+
*/
|
|
1155
|
+
Height: string;
|
|
1156
|
+
};
|
|
1157
|
+
|
|
1158
|
+
/**
|
|
1159
|
+
* Handling Unit Type for Density based rating.
|
|
1160
|
+
*/
|
|
1161
|
+
type HandlingUnits_Type = {
|
|
1162
|
+
/**
|
|
1163
|
+
* The code associated with Handling Unit Type. Valid values: SKD = Skid CBY = CarboyPLT = PalletTOT = TotesLOO = LooseOTH = Other
|
|
1164
|
+
*/
|
|
1165
|
+
Code: string;
|
|
1166
|
+
/**
|
|
1167
|
+
* A description of the code for the Handling Unit type.
|
|
1168
|
+
*/
|
|
1169
|
+
Description?: string;
|
|
1170
|
+
};
|
|
1171
|
+
|
|
1172
|
+
/**
|
|
1173
|
+
* Handling Unit for Density based rating container.
|
|
1174
|
+
*/
|
|
1175
|
+
type FreightDensityInfo_HandlingUnits = {
|
|
1176
|
+
/**
|
|
1177
|
+
* Handling Unit Quantity for Density based rating.
|
|
1178
|
+
*/
|
|
1179
|
+
Quantity: string;
|
|
1180
|
+
Type: HandlingUnits_Type;
|
|
1181
|
+
Dimensions: HandlingUnits_Dimensions;
|
|
1182
|
+
};
|
|
1183
|
+
|
|
1184
|
+
/**
|
|
1185
|
+
* Freight Density Info container. Required if DensityEligibleIndicator is present.
|
|
1186
|
+
*/
|
|
1187
|
+
type FreightShipmentInformation_FreightDensityInfo = {
|
|
1188
|
+
/**
|
|
1189
|
+
* The presence of the AdjustedHeightIndicator allows UPS to do height reduction adjustment for density based rate request.
|
|
1190
|
+
*/
|
|
1191
|
+
AdjustedHeightIndicator?: string;
|
|
1192
|
+
AdjustedHeight?: FreightDensityInfo_AdjustedHeight;
|
|
1193
|
+
HandlingUnits: Array<FreightDensityInfo_HandlingUnits>;
|
|
1194
|
+
};
|
|
1195
|
+
|
|
1196
|
+
/**
|
|
1197
|
+
* Container to hold Freight Shipment information.
|
|
1198
|
+
*/
|
|
1199
|
+
type Shipment_FreightShipmentInformation = {
|
|
1200
|
+
FreightDensityInfo?: FreightShipmentInformation_FreightDensityInfo;
|
|
1201
|
+
/**
|
|
1202
|
+
* The presence of the tag indicates that the rate request is density based.For Density Based Rating (DBR), the customer must have DBR Contract Service.
|
|
1203
|
+
*/
|
|
1204
|
+
DensityEligibleIndicator?: string;
|
|
1205
|
+
};
|
|
1206
|
+
|
|
1207
|
+
/**
|
|
1208
|
+
* Payer Address Container. Address container may be present for FRS Payment Information type = 02 and required when the FRS Payment Information type = 03.
|
|
1209
|
+
*/
|
|
1210
|
+
type FRSPaymentInformation_Address = {
|
|
1211
|
+
/**
|
|
1212
|
+
* Postal Code for UPS accounts billing address. Postal Code may be present when the FRS Payment Information type = 02 and type = 03.
|
|
1213
|
+
*/
|
|
1214
|
+
PostalCode?: string;
|
|
1215
|
+
/**
|
|
1216
|
+
* Country or Territory code for the UPS accounts & billing address. Country or Territory Code is required when the FRS Payment Information type = 02 and type= 03.
|
|
1217
|
+
*/
|
|
1218
|
+
CountryCode: string;
|
|
1219
|
+
};
|
|
1220
|
+
|
|
1221
|
+
/**
|
|
1222
|
+
* GFP Payment Information Type container. GFP only.
|
|
1223
|
+
*/
|
|
1224
|
+
type FRSPaymentInformation_Type = {
|
|
1225
|
+
/**
|
|
1226
|
+
* Payer Type code for FRS Rate request. Valid Values are: 01 = Prepaid 02 = FreightCollect 03 = BillThirdParty
|
|
1227
|
+
*/
|
|
1228
|
+
Code: string;
|
|
1229
|
+
/**
|
|
1230
|
+
* Text description of the code representing the GFP payment type.
|
|
1231
|
+
*/
|
|
1232
|
+
Description?: string;
|
|
1233
|
+
};
|
|
1234
|
+
|
|
1235
|
+
/**
|
|
1236
|
+
* UPS Ground Freight Pricing (GFP) Payment Information container. Required only for GFP and when the FRSIndicator is present.
|
|
1237
|
+
*/
|
|
1238
|
+
type Shipment_FRSPaymentInformation = {
|
|
1239
|
+
Type: FRSPaymentInformation_Type;
|
|
1240
|
+
/**
|
|
1241
|
+
* UPS Account Number.
|
|
1242
|
+
*/
|
|
1243
|
+
AccountNumber?: string;
|
|
1244
|
+
Address?: FRSPaymentInformation_Address;
|
|
1245
|
+
};
|
|
1246
|
+
|
|
1247
|
+
/**
|
|
1248
|
+
* Container to hold InvoiceLineTotal Information. Required if the shipment is from US/PR Outbound to non US/PR destination with the PackagingType of UPS PAK(04).Required for international shipments when using request option "ratetimeintransit" or "shoptimeintransit".
|
|
1249
|
+
*/
|
|
1250
|
+
type Shipment_InvoiceLineTotal = {
|
|
1251
|
+
/**
|
|
1252
|
+
* Invoice Line Total Currency type. The Currency code should match the origin country's or territory's currency code, otherwise the currency code entered will be ignored. Note: UPS doesn't support all international currency codes. Please check the developer guides for Supported Currency codes.
|
|
1253
|
+
*/
|
|
1254
|
+
CurrencyCode: string;
|
|
1255
|
+
/**
|
|
1256
|
+
* Total amount of the invoice accompanying the shipment. Required when the InvoiceLineTotal container exists in the rate request. Valid values are from 1 to 99999999.
|
|
1257
|
+
*/
|
|
1258
|
+
MonetaryValue: string;
|
|
1259
|
+
};
|
|
1260
|
+
|
|
1261
|
+
/**
|
|
1262
|
+
* NMFC Commodity container. For GFP Only.
|
|
1263
|
+
*/
|
|
1264
|
+
type Commodity_NMFC = {
|
|
1265
|
+
/**
|
|
1266
|
+
* Value of NMFC Prime. Contact your service representative if you need information concerning NMFC Codes. Required if NMFC Container is present. For GFP Only.
|
|
1267
|
+
*/
|
|
1268
|
+
PrimeCode: string;
|
|
1269
|
+
/**
|
|
1270
|
+
* Value of NMFC Sub. Contact your service representative if you need information concerning NMFC Codes. Needs to be provided when the SubCode associated with the PrimeCode is other than 00. API defaults the sub value to 00 if not provided. If provided the Sub Code should be associated with the PrimeCode of the NMFC.
|
|
1271
|
+
*/
|
|
1272
|
+
SubCode?: string;
|
|
1273
|
+
};
|
|
1274
|
+
|
|
1275
|
+
/**
|
|
1276
|
+
* Commodity Container. Required only for GFP rating when FRSShipmentIndicator is requested.
|
|
1277
|
+
*/
|
|
1278
|
+
type Package_Commodity = {
|
|
1279
|
+
/**
|
|
1280
|
+
* Freight Classification. Freight class partially determines the freight rate for the article. See Appendix of the Rating Ground Freight Web Services Developers Guide for list of Freight classes. For GFP Only.
|
|
1281
|
+
*/
|
|
1282
|
+
FreightClass: string;
|
|
1283
|
+
NMFC?: Commodity_NMFC;
|
|
1284
|
+
};
|
|
1285
|
+
|
|
1286
|
+
/**
|
|
1287
|
+
* UnitOfMeasurement container.
|
|
1288
|
+
*/
|
|
1289
|
+
type Dimensions_UnitOfMeasurement = {
|
|
1290
|
+
/**
|
|
1291
|
+
* Package dimensions unit of measurement code.
|
|
1292
|
+
*
|
|
1293
|
+
* Valid values:
|
|
1294
|
+
* - IN
|
|
1295
|
+
* - CM
|
|
1296
|
+
*
|
|
1297
|
+
*/
|
|
1298
|
+
Code: string;
|
|
1299
|
+
/**
|
|
1300
|
+
* Text description of the code representing the UnitOfMeasurement associated with the package. This element is not validated.
|
|
1301
|
+
*/
|
|
1302
|
+
Description: string;
|
|
1303
|
+
};
|
|
1304
|
+
|
|
1305
|
+
/**
|
|
1306
|
+
* Dimensions Container. This container is not applicable for GFP Rating request. Required for Heavy Goods service. Package Dimension will be ignored for Simple Rate
|
|
1307
|
+
*/
|
|
1308
|
+
type Package_Dimensions = {
|
|
1309
|
+
UnitOfMeasurement: Dimensions_UnitOfMeasurement;
|
|
1310
|
+
/**
|
|
1311
|
+
* Length of the package used to determine dimensional weight. Required for GB to GB and Poland to Poland shipments.
|
|
1312
|
+
*
|
|
1313
|
+
* 6 digits in length with 2 digits of significance after the decimal point.
|
|
1314
|
+
*
|
|
1315
|
+
*/
|
|
1316
|
+
Length: string;
|
|
1317
|
+
/**
|
|
1318
|
+
* Width of the package used to determine dimensional weight. Required for GB to GB and Poland to Poland shipments.
|
|
1319
|
+
*
|
|
1320
|
+
* 6 digits in length with 2 digits of significance after the decimal point.
|
|
1321
|
+
*
|
|
1322
|
+
*/
|
|
1323
|
+
Width: string;
|
|
1324
|
+
/**
|
|
1325
|
+
* Height of the package used to determine dimensional weight. Required for GB to GB and Poland to Poland shipments.
|
|
1326
|
+
*
|
|
1327
|
+
* 6 digits in length with 2 digits of significance after the decimal point.
|
|
1328
|
+
*
|
|
1329
|
+
*/
|
|
1330
|
+
Height: string;
|
|
1331
|
+
};
|
|
1332
|
+
|
|
1333
|
+
/**
|
|
1334
|
+
* UnitOfMeasurement Container.
|
|
1335
|
+
*/
|
|
1336
|
+
type DimWeight_UnitOfMeasurement = {
|
|
1337
|
+
/**
|
|
1338
|
+
* Code representing the unit of measure associated with the package weight.
|
|
1339
|
+
*
|
|
1340
|
+
* Valid values:
|
|
1341
|
+
* - LBS - Pounds
|
|
1342
|
+
* - KGS - Kilograms.
|
|
1343
|
+
*
|
|
1344
|
+
*/
|
|
1345
|
+
Code: string;
|
|
1346
|
+
/**
|
|
1347
|
+
* Text description of the code representing the unit of measure associated with the package weight. Length and value are not validated.
|
|
1348
|
+
*/
|
|
1349
|
+
Description: string;
|
|
1350
|
+
};
|
|
1351
|
+
|
|
1352
|
+
/**
|
|
1353
|
+
* Package Dimensional Weight container. Values in this container are ignored when package dimensions are provided. Please visit ups.com for instructions on calculating this value. Only used for non-US/CA/PR shipments.
|
|
1354
|
+
*/
|
|
1355
|
+
type Package_DimWeight = {
|
|
1356
|
+
UnitOfMeasurement?: DimWeight_UnitOfMeasurement;
|
|
1357
|
+
/**
|
|
1358
|
+
* Dimensional weight of the package. Decimal values are not accepted, however there is one implied decimal place for values in this field (i.e. 115 = 11.5).
|
|
1359
|
+
*/
|
|
1360
|
+
Weight?: string;
|
|
1361
|
+
};
|
|
1362
|
+
|
|
1363
|
+
/**
|
|
1364
|
+
* Access Point COD indicates Package COD is requested for a shipment. Valid only for : 01 - Hold For Pickup At UPS Access Point, Shipment Indication type. Package Access Point COD is valid only for shipment without return service from US/PR to US/PR and CA to CA. Not valid with (Package) COD.
|
|
1365
|
+
*/
|
|
1366
|
+
type PackageServiceOptions_AccessPointCOD = {
|
|
1367
|
+
/**
|
|
1368
|
+
* Access Point COD Currency Code. Required if Access Point COD container is present. UPS does not support all international currency codes. Refer to the appendix for a list of valid codes.
|
|
1369
|
+
*/
|
|
1370
|
+
CurrencyCode: string;
|
|
1371
|
+
/**
|
|
1372
|
+
* Access Point COD Monetary Value. Required if Access Point COD container is present.
|
|
1373
|
+
*
|
|
1374
|
+
* 8 digits prior to the decimal place and 2 after.
|
|
1375
|
+
*
|
|
1376
|
+
*/
|
|
1377
|
+
MonetaryValue: string;
|
|
1378
|
+
};
|
|
1379
|
+
|
|
1380
|
+
/**
|
|
1381
|
+
* CODAmount Container.
|
|
1382
|
+
*/
|
|
1383
|
+
type COD_CODAmount = {
|
|
1384
|
+
/**
|
|
1385
|
+
* Currency Code. Required if a value for the COD amount exists in the MonetaryValue tag. Must match one of the IATA currency codes. UPS does not support all international currency codes. Refer to Currency Codes in the Appendix for a list of valid codes.
|
|
1386
|
+
*/
|
|
1387
|
+
CurrencyCode: string;
|
|
1388
|
+
/**
|
|
1389
|
+
* The COD value for the package. Required if COD option is present. The maximum amount allowed is 50,000 USD.
|
|
1390
|
+
*/
|
|
1391
|
+
MonetaryValue: string;
|
|
1392
|
+
};
|
|
1393
|
+
|
|
1394
|
+
/**
|
|
1395
|
+
* COD Container. Indicates COD is requested. Valid for the following country or territory combinations: US/PR to US/PRCA to CACA to USNot allowed for CA to US for packages that are designated as Letters or Envelopes.
|
|
1396
|
+
*/
|
|
1397
|
+
type PackageServiceOptions_COD = {
|
|
1398
|
+
/**
|
|
1399
|
+
* Indicates the type of funds that will be used for the C.O.D. payment. For valid values, refer to Rating and Shipping COD Supported Countries or Territories in the Appendix.
|
|
1400
|
+
*/
|
|
1401
|
+
CODFundsCode: string;
|
|
1402
|
+
CODAmount: COD_CODAmount;
|
|
1403
|
+
};
|
|
1404
|
+
|
|
1405
|
+
/**
|
|
1406
|
+
* Declared Value Container.
|
|
1407
|
+
*/
|
|
1408
|
+
type PackageServiceOptions_DeclaredValue = {
|
|
1409
|
+
/**
|
|
1410
|
+
* The IATA currency code associated with the declared value amount for the package. Required if a value for the package declared value amount exists in the MonetaryValue tag. Must match one of the IATA currency codes. Length is not validated. UPS does not support all international currency codes. Refer to Currency Codes in the Appendix for a list of valid codes.
|
|
1411
|
+
*/
|
|
1412
|
+
CurrencyCode: string;
|
|
1413
|
+
/**
|
|
1414
|
+
* The monetary value for the declared value amount associated with the package. Max value of 5,000 USD for Local and 50,000 USD for Remote. Absolute maximum value is 21474836.47
|
|
1415
|
+
*/
|
|
1416
|
+
MonetaryValue: string;
|
|
1417
|
+
};
|
|
1418
|
+
|
|
1419
|
+
/**
|
|
1420
|
+
* Delivery Confirmation Container. For a list of valid origin/destination countries or territories please refer to appendix. DeliveryConfirmation and COD are mutually exclusive.
|
|
1421
|
+
*/
|
|
1422
|
+
type PackageServiceOptions_DeliveryConfirmation = {
|
|
1423
|
+
/**
|
|
1424
|
+
* Type of delivery confirmation. Valid values: 1 - Unsupported 2 - Delivery Confirmation Signature Required 3 - Delivery Confirmation Adult Signature Required
|
|
1425
|
+
*/
|
|
1426
|
+
DCISType: string;
|
|
1427
|
+
};
|
|
1428
|
+
|
|
1429
|
+
/**
|
|
1430
|
+
* Container for Unit Of Measurement for Dry Ice.
|
|
1431
|
+
*/
|
|
1432
|
+
type DryIceWeight_UnitOfMeasurement = {
|
|
1433
|
+
/**
|
|
1434
|
+
* DryIce weight unit of measurement code. Valid values:
|
|
1435
|
+
* - 00 - KG (Metric Unit of Measurements) or KGS
|
|
1436
|
+
* - 01 - LB (English Unit of Measurements) or LBS
|
|
1437
|
+
*
|
|
1438
|
+
*/
|
|
1439
|
+
Code: string;
|
|
1440
|
+
/**
|
|
1441
|
+
* Text description of the code representing the unit of measure associated with the package.
|
|
1442
|
+
*/
|
|
1443
|
+
Description: string;
|
|
1444
|
+
};
|
|
1445
|
+
|
|
1446
|
+
/**
|
|
1447
|
+
* Container for Weight information for Dry Ice.
|
|
1448
|
+
*/
|
|
1449
|
+
type DryIce_DryIceWeight = {
|
|
1450
|
+
UnitOfMeasurement: DryIceWeight_UnitOfMeasurement;
|
|
1451
|
+
/**
|
|
1452
|
+
* Weight for Dry Ice. Cannot be more than package weight. Should be more than 0.0. Valid characters are 0-9 and "." (Decimal point). Limit to 1 digit after the decimal. The maximum length of the field is 5 including "." and can hold up to 1 decimal place.
|
|
1453
|
+
*/
|
|
1454
|
+
Weight: string;
|
|
1455
|
+
};
|
|
1456
|
+
|
|
1457
|
+
/**
|
|
1458
|
+
* Container to hold Dry Ice information. Lane check will happen based on postal code/ city.
|
|
1459
|
+
*/
|
|
1460
|
+
type PackageServiceOptions_DryIce = {
|
|
1461
|
+
/**
|
|
1462
|
+
* Regulation set for DryIce Shipment. Valid values: CFR = For HazMat regulated by US Dept of Transportation within the U.S. or ground shipments to Canada,IATA = For Worldwide Air movement. The following values are valid: CFR and IATA.
|
|
1463
|
+
*/
|
|
1464
|
+
RegulationSet: string;
|
|
1465
|
+
DryIceWeight: DryIce_DryIceWeight;
|
|
1466
|
+
/**
|
|
1467
|
+
* Presence/Absence Indicator. Any value inside is ignored. Relevant only in CFR regulation set. If present it is used to designate the Dry Ice is for any medical use and rates are adjusted for DryIce weight more than 2.5 KGS or 5.5 LBS.
|
|
1468
|
+
*/
|
|
1469
|
+
MedicalUseIndicator?: string;
|
|
1470
|
+
/**
|
|
1471
|
+
* Presence/Absence Indicator. Any value inside is ignored. Indicates a Dry Ice audit will be performed per the Regulation Set requirements. Empty tag means indicator is present.
|
|
1472
|
+
*/
|
|
1473
|
+
AuditRequired?: string;
|
|
1474
|
+
};
|
|
1475
|
+
|
|
1476
|
+
/**
|
|
1477
|
+
* Container to hold HazMat Chemical Records.
|
|
1478
|
+
*/
|
|
1479
|
+
type HazMat_HazMatChemicalRecord = {
|
|
1480
|
+
/**
|
|
1481
|
+
* Identifies the Chemcial Record. Required if SubVersion is greater than or equal to 1701.
|
|
1482
|
+
*/
|
|
1483
|
+
ChemicalRecordIdentifier?: string;
|
|
1484
|
+
/**
|
|
1485
|
+
* This is the hazard class associated to the specified commodity. Required if CommodityRegulatedLevelCode is 'LQ' or 'FR' Applies only if SubVersion is greater than or equal to 1701.
|
|
1486
|
+
*/
|
|
1487
|
+
ClassDivisionNumber?: string;
|
|
1488
|
+
/**
|
|
1489
|
+
* This is the ID number (UN/NA/ID) for the specified commodity. Required if CommodityRegulatedLevelCode = LR, LQ or FR and if the field applies to the material by regulation. UN/NA/ID Identification Number assigned to the specified regulated good. (Include the UN/NA/ID as part of the entry). Applies only if SubVersion is greater than or equal to 1701.
|
|
1490
|
+
*/
|
|
1491
|
+
IDNumber?: string;
|
|
1492
|
+
/**
|
|
1493
|
+
* The method of transport by which a shipment is approved to move and the regulations associated with that method. Only required when the CommodityRegulatedLevelCode is FR or LQ.Valid values: 01 - Highway02 - Ground03 - Passenger Aircraft04 - Cargo Aircraft Only Applies only if SubVersion is greater than or equal to 1701. For multiple ChemicalRecords per package having different TransportationMode, TransportationMode of first ChemicalRecord would be considered for validating and rating the package. All TransportationMode except for '04' are general service offering. If any chemical record contains '04' as TransportationMode, ShipperNumber needs to be authorized to use '04' as TransportationMode.
|
|
1494
|
+
*/
|
|
1495
|
+
TransportationMode: string;
|
|
1496
|
+
/**
|
|
1497
|
+
* The Regulatory set associated with every regulated shipment. It must be the same across the shipment. Valid values: ADR - For Europe to Europe Ground Movement CFR - For HazMat regulated by US Dept. of Transportation within the U.S. or ground shipments to Canada, IATA - For Worldwide Air movement TDG - For Canada to Canada ground movement or Canada to U.S. standard movement Applies only if SubVersion is greater than or equal to 1701. For multiple ChemicalRecords per package or multiple packages containing different RegulationSet, RegulationSet of first ChemicalRecord would be considered for validating and rating the entire shipment.
|
|
1498
|
+
*/
|
|
1499
|
+
RegulationSet: string;
|
|
1500
|
+
/**
|
|
1501
|
+
* 24 Hour Emergency Phone Number of the shipper. Valid values for this field are (0) through (9) with trailing blanks. For numbers within the U.S., the layout is '1', area code, 7-digit number. For all other countries or territories the layout is country or territory code, area code, number. Applies only if SubVersion is greater than or equal to 1701.
|
|
1502
|
+
*/
|
|
1503
|
+
EmergencyPhone?: string;
|
|
1504
|
+
/**
|
|
1505
|
+
* The emergency information, contact name and/or contact number, required to be communicated when a call is placed to the EmergencyPhoneNumber. The information is required if there is a value in the EmergencyPhoneNumber field above and the shipment is with a US50 or PR origin and/or destination and the RegulationSet is IATA. Applies only if SubVersion is greater than or equal to 1701.
|
|
1506
|
+
*/
|
|
1507
|
+
EmergencyContact?: string;
|
|
1508
|
+
/**
|
|
1509
|
+
* Required if CommodityRegulatedLevelCode = LQ or FR and if the field applies to the material by regulation. If reportable quantity is met, 'RQ' should be entered. Applies only if SubVersion is greater than or equal to 1701.
|
|
1510
|
+
*/
|
|
1511
|
+
ReportableQuantity?: string;
|
|
1512
|
+
/**
|
|
1513
|
+
* Required if CommodityRegulatedLevelCode = LQ or FR and if the field applies to the material by regulation. Secondary hazardous characteristics of a package. (There can be more than one – separate each with a comma). Applies only if SubVersion is greater than or equal to 1701.
|
|
1514
|
+
*/
|
|
1515
|
+
SubRiskClass?: string;
|
|
1516
|
+
/**
|
|
1517
|
+
* This is the packing group category associated to the specified commodity. Required if CommodityRegulatedLevelCode = LQ or FR and if the field applies to the material by regulation. Must be shown in Roman Numerals.Valid values are:I, II,III,blank. Applies only if SubVersion is greater than or equal to 1701.
|
|
1518
|
+
*/
|
|
1519
|
+
PackagingGroupType?: string;
|
|
1520
|
+
/**
|
|
1521
|
+
* Required if CommodityRegulatedLevelCode = LQ or FR. The numerical value of the mass capacity of the regulated good. Applies only if SubVersion is greater than or equal to 1701.
|
|
1522
|
+
*/
|
|
1523
|
+
Quantity?: string;
|
|
1524
|
+
/**
|
|
1525
|
+
* Required if CommodityRegulatedLevelCode = LQ or FR. The unit of measure used for the mass capacity of the regulated good. For Example: ml, L, g, mg, kg, cylinder, pound, pint, quart, gallon, ounce etc. Applies only if SubVersion is greater than or equal to 1701.
|
|
1526
|
+
*/
|
|
1527
|
+
UOM?: string;
|
|
1528
|
+
/**
|
|
1529
|
+
* The packing instructions related to the chemical record. Required if CommodityRegulatedLevelCode = LQ or FR and if the field applies to the material by regulation. Applies only if SubVersion is greater than or equal to 1701.
|
|
1530
|
+
*/
|
|
1531
|
+
PackagingInstructionCode?: string;
|
|
1532
|
+
/**
|
|
1533
|
+
* The Proper Shipping Name assigned by ADR, CFR or IATA. Required if CommodityRegulatedLevelCode = LR, LQ or FR. Applies only if SubVersion is greater than or equal to 1701.
|
|
1534
|
+
*/
|
|
1535
|
+
ProperShippingName?: string;
|
|
1536
|
+
/**
|
|
1537
|
+
* The technical name (when required) for the specified commodity. Required if CommodityRegulatedLevelCode = LQ or FR and if the field applies to the material by regulation. Applies only if SubVersion is greater than or equal to 1701.
|
|
1538
|
+
*/
|
|
1539
|
+
TechnicalName?: string;
|
|
1540
|
+
/**
|
|
1541
|
+
* Additional remarks or special provision information. Required if CommodityRegulatedLevelCode = LQ or FR and if the field applies to the material by regulation.
|
|
1542
|
+
*
|
|
1543
|
+
* Additional information that may be required by regulation about a hazardous material, such as, "Limited Quantity", DOT-SP numbers, EX numbers. Applies only if SubVersion is greater than or equal to 1701.
|
|
1544
|
+
*
|
|
1545
|
+
*/
|
|
1546
|
+
AdditionalDescription?: string;
|
|
1547
|
+
/**
|
|
1548
|
+
* The package type code identifying the type of packaging used for the commodity. (Ex: Fiberboard Box). Required if CommodityRegulatedLevelCode = LQ or FR. Applies only if SubVersion is greater than or equal to 1701.
|
|
1549
|
+
*/
|
|
1550
|
+
PackagingType?: string;
|
|
1551
|
+
/**
|
|
1552
|
+
* Defines the type of label that is required on the package for the commodity. Not applicable if CommodityRegulatedLevelCode = LR or EQ. Applies only if SubVersion is greater than or equal to 1701.
|
|
1553
|
+
*/
|
|
1554
|
+
HazardLabelRequired?: string;
|
|
1555
|
+
/**
|
|
1556
|
+
* The number of pieces of the specific commodity. Required if CommodityRegulatedLevelCode = LQ or FR.Valid values are 1 to 999. Applies only if SubVersion is greater than or equal to 1701.
|
|
1557
|
+
*/
|
|
1558
|
+
PackagingTypeQuantity?: string;
|
|
1559
|
+
/**
|
|
1560
|
+
* Indicates the type of commodity - Fully Regulated (FR), Limited Quantity (LQ), Excepted Quantity (EQ), Lightly Regulated (LR). Default value is FR.Valid values are LR, FR, LQ, EQ. Applies only if SubVersion is greater than or equal to 1701.
|
|
1561
|
+
*/
|
|
1562
|
+
CommodityRegulatedLevelCode?: string;
|
|
1563
|
+
/**
|
|
1564
|
+
* Transport Category.Valid values are 0 to 4. Applies only if SubVersion is greater than or equal to 1701.
|
|
1565
|
+
*/
|
|
1566
|
+
TransportCategory?: string;
|
|
1567
|
+
/**
|
|
1568
|
+
* Defines what is restricted to pass through a tunnel. Applies only if SubVersion is greater than or equal to 1701.
|
|
1569
|
+
*/
|
|
1570
|
+
TunnelRestrictionCode?: string;
|
|
1571
|
+
};
|
|
1572
|
+
|
|
1573
|
+
/**
|
|
1574
|
+
* Container to hold HazMat information. Applies only if SubVersion is greater than or equal to 1701.
|
|
1575
|
+
*/
|
|
1576
|
+
type PackageServiceOptions_HazMat = {
|
|
1577
|
+
/**
|
|
1578
|
+
* Identifies the package containing Dangerous Goods. Required if SubVersion is greater than or equal to 1701.
|
|
1579
|
+
*/
|
|
1580
|
+
PackageIdentifier?: string;
|
|
1581
|
+
/**
|
|
1582
|
+
* QValue is required when a HazMat shipment specifies AllPackedInOneIndicator and the regulation set for that shipment is IATA. Applies only if SubVersion is greater than or equal to 1701. Valid values are : 0.1; 0.2; 0.3; 0.4; 0.5; 0.6; 0.7; 0.8; 0.9; 1.0
|
|
1583
|
+
*/
|
|
1584
|
+
QValue?: string;
|
|
1585
|
+
/**
|
|
1586
|
+
* Presence/Absence Indicator. Any value is ignored. Presence indicates that shipment is overpack. Applies only if SubVersion is greater than or equal to 1701.
|
|
1587
|
+
*/
|
|
1588
|
+
OverPackedIndicator?: string;
|
|
1589
|
+
/**
|
|
1590
|
+
* Presence/Absence Indicator. Any value is ignored. Indicates the hazmat shipment/package is all packed in one. Applies only if SubVersion is greater than or equal to 1701.
|
|
1591
|
+
*/
|
|
1592
|
+
AllPackedInOneIndicator?: string;
|
|
1593
|
+
HazMatChemicalRecord: Array<HazMat_HazMatChemicalRecord>;
|
|
1594
|
+
};
|
|
1595
|
+
|
|
1596
|
+
/**
|
|
1597
|
+
* Container to hold Basic Flexible Parcel Indicator information. Valid for UPS World Wide Express Freight shipments.
|
|
1598
|
+
*/
|
|
1599
|
+
type Insurance_BasicFlexibleParcelIndicator = {
|
|
1600
|
+
/**
|
|
1601
|
+
* The IATA currency code associated with the amount for the package. UPS does not support all international currency codes. Refer to the appendix for a list of valid codes. Valid for UPS World Wide Express Freight shipments.
|
|
1602
|
+
*/
|
|
1603
|
+
CurrencyCode: string;
|
|
1604
|
+
/**
|
|
1605
|
+
* The monetary value associated with the package. Valid for UPS World Wide Express Freight shipments.
|
|
1606
|
+
*/
|
|
1607
|
+
MonetaryValue: string;
|
|
1608
|
+
};
|
|
1609
|
+
|
|
1610
|
+
/**
|
|
1611
|
+
* Container for Extended Flexible Parcel Indicator Valid for UPS World Wide Express Freight shipments.
|
|
1612
|
+
*/
|
|
1613
|
+
type Insurance_ExtendedFlexibleParcelIndicator = {
|
|
1614
|
+
/**
|
|
1615
|
+
* The IATA currency code associated with the amount for the package. UPS does not support all international currency codes. Refer to the appendix for a list of valid codes. Valid for UPS World Wide Express Freight shipments.
|
|
1616
|
+
*/
|
|
1617
|
+
CurrencyCode: string;
|
|
1618
|
+
/**
|
|
1619
|
+
* The monetary value associated with the package. Valid for UPS World Wide Express Freight shipments.
|
|
1620
|
+
*/
|
|
1621
|
+
MonetaryValue: string;
|
|
1622
|
+
};
|
|
1623
|
+
|
|
1624
|
+
/**
|
|
1625
|
+
* Container to hold Time In Transit Flexible Parcel Indicator information. Valid for UPS World Wide Express Freight shipments.
|
|
1626
|
+
*/
|
|
1627
|
+
type Insurance_TimeInTransitFlexibleParcelIndicator = {
|
|
1628
|
+
/**
|
|
1629
|
+
* The IATA currency code associated with the amount for the package. UPS does not support all international currency codes. Refer to the appendix for a list of valid codes. Valid for UPS World Wide Express Freight shipments.
|
|
1630
|
+
*/
|
|
1631
|
+
CurrencyCode: string;
|
|
1632
|
+
/**
|
|
1633
|
+
* The monetary value associated with the package. Valid for UPS World Wide Express Freight shipments.
|
|
1634
|
+
*/
|
|
1635
|
+
MonetaryValue: string;
|
|
1636
|
+
};
|
|
1637
|
+
|
|
1638
|
+
/**
|
|
1639
|
+
* Insurance Accesorial. Only one type of insurance can exist at a time on the shipment. Valid for UPS World Wide Express Freight shipments.
|
|
1640
|
+
*/
|
|
1641
|
+
type PackageServiceOptions_Insurance = {
|
|
1642
|
+
BasicFlexibleParcelIndicator?: Insurance_BasicFlexibleParcelIndicator;
|
|
1643
|
+
ExtendedFlexibleParcelIndicator?: Insurance_ExtendedFlexibleParcelIndicator;
|
|
1644
|
+
TimeInTransitFlexibleParcelIndicator?: Insurance_TimeInTransitFlexibleParcelIndicator;
|
|
1645
|
+
};
|
|
1646
|
+
|
|
1647
|
+
/**
|
|
1648
|
+
* Shipper Paid Declared Value Charge at Package level. Valid for UPS World Wide Express Freight shipments.
|
|
1649
|
+
*/
|
|
1650
|
+
type PackageServiceOptions_ShipperDeclaredValue = {
|
|
1651
|
+
/**
|
|
1652
|
+
* The IATA currency code associated with the amount for the package. UPS does not support all international currency codes. Refer to the appendix for a list of valid codes.
|
|
1653
|
+
*/
|
|
1654
|
+
CurrencyCode: string;
|
|
1655
|
+
/**
|
|
1656
|
+
* The monetary value for the amount associated with the package.
|
|
1657
|
+
*/
|
|
1658
|
+
MonetaryValue: string;
|
|
1659
|
+
};
|
|
1660
|
+
|
|
1661
|
+
/**
|
|
1662
|
+
* PackageServiceOptions container.
|
|
1663
|
+
*/
|
|
1664
|
+
type Package_PackageServiceOptions = {
|
|
1665
|
+
DeliveryConfirmation?: PackageServiceOptions_DeliveryConfirmation;
|
|
1666
|
+
AccessPointCOD?: PackageServiceOptions_AccessPointCOD;
|
|
1667
|
+
COD?: PackageServiceOptions_COD;
|
|
1668
|
+
DeclaredValue?: PackageServiceOptions_DeclaredValue;
|
|
1669
|
+
ShipperDeclaredValue?: PackageServiceOptions_ShipperDeclaredValue;
|
|
1670
|
+
/**
|
|
1671
|
+
* The presence indicates that the package may be released by driver without a signature from the consignee. Empty Tag. Only available for US50/PR to US50/PR packages without return service.
|
|
1672
|
+
*/
|
|
1673
|
+
ShipperReleaseIndicator?: string;
|
|
1674
|
+
/**
|
|
1675
|
+
* Any value associated with this element will be ignored. If present, the package is rated for UPS Proactive Response and proactive package tracking.Contractual accessorial for health care companies to allow package monitoring throughout the UPS system. Shippers account needs to have valid contract for UPS Proactive Response.
|
|
1676
|
+
*/
|
|
1677
|
+
ProactiveIndicator?: string;
|
|
1678
|
+
/**
|
|
1679
|
+
* Presence/Absence Indicator. Any value is ignored. If present, indicates that the package contains an item that needs refrigeration. Shippers account needs to have a valid contract for Refrigeration.
|
|
1680
|
+
*/
|
|
1681
|
+
RefrigerationIndicator?: string;
|
|
1682
|
+
Insurance?: PackageServiceOptions_Insurance;
|
|
1683
|
+
/**
|
|
1684
|
+
* The UPSPremiumCareIndicator indicates special handling is required for shipment having controlled substances. Empty Tag means indicator is present.
|
|
1685
|
+
*
|
|
1686
|
+
* Valid only for Canada to Canada movements.
|
|
1687
|
+
*
|
|
1688
|
+
* Available for the following Return Services:
|
|
1689
|
+
* - Returns Exchange (available with a contract)
|
|
1690
|
+
* - Print Return Label
|
|
1691
|
+
* - Print and Mail
|
|
1692
|
+
* - Electronic Return Label
|
|
1693
|
+
* - Return Service Three Attempt
|
|
1694
|
+
*
|
|
1695
|
+
* May be requested with following UPS services:
|
|
1696
|
+
* - UPS Express® Early
|
|
1697
|
+
* - UPS Express
|
|
1698
|
+
* - UPS Express Saver
|
|
1699
|
+
* - UPS Standard.
|
|
1700
|
+
*
|
|
1701
|
+
* Not available for packages with the following:
|
|
1702
|
+
* - Delivery Confirmation - Signature Required
|
|
1703
|
+
* - Delivery Confirmation - Adult Signature Required.
|
|
1704
|
+
*
|
|
1705
|
+
*/
|
|
1706
|
+
UPSPremiumCareIndicator?: string;
|
|
1707
|
+
HazMat?: PackageServiceOptions_HazMat;
|
|
1708
|
+
DryIce?: PackageServiceOptions_DryIce;
|
|
1709
|
+
};
|
|
1710
|
+
|
|
1711
|
+
/**
|
|
1712
|
+
* UnitOfMeasurement Container.
|
|
1713
|
+
*/
|
|
1714
|
+
type PackageWeight_UnitOfMeasurement = {
|
|
1715
|
+
/**
|
|
1716
|
+
* Code representing the unit of measure associated with the package weight.
|
|
1717
|
+
*
|
|
1718
|
+
* Unit of Measurement "OZS" is the only valid UOM for Worldwide Economy DDU Shipments.
|
|
1719
|
+
*
|
|
1720
|
+
* Valid values:
|
|
1721
|
+
* - LBS - Pounds (default)
|
|
1722
|
+
* - KGS - Kilograms
|
|
1723
|
+
* - OZS - Ounces
|
|
1724
|
+
*
|
|
1725
|
+
*/
|
|
1726
|
+
Code: string;
|
|
1727
|
+
/**
|
|
1728
|
+
* Text description of the code representing the unit of measure associated with the package weight. Length and value are not validated.
|
|
1729
|
+
*/
|
|
1730
|
+
Description: string;
|
|
1731
|
+
};
|
|
1732
|
+
|
|
1733
|
+
/**
|
|
1734
|
+
* Package Weight Container. Required for an GFP Rating request. Otherwise optional. Required for Heavy Goods service. Package Weight will be ignored for Simple Rate
|
|
1735
|
+
*/
|
|
1736
|
+
type Package_PackageWeight = {
|
|
1737
|
+
UnitOfMeasurement: PackageWeight_UnitOfMeasurement;
|
|
1738
|
+
/**
|
|
1739
|
+
* Actual package weight. Weight accepted for letters/envelopes.
|
|
1740
|
+
*/
|
|
1741
|
+
Weight: string;
|
|
1742
|
+
};
|
|
1743
|
+
|
|
1744
|
+
/**
|
|
1745
|
+
* Packaging Type Container.
|
|
1746
|
+
*/
|
|
1747
|
+
type Package_PackagingType = {
|
|
1748
|
+
/**
|
|
1749
|
+
* The code for the UPS packaging type associated with the package. Valid values:
|
|
1750
|
+
* - 00 - UNKNOWN
|
|
1751
|
+
* - 01 - UPS Letter
|
|
1752
|
+
* - 02 - Package
|
|
1753
|
+
* - 03 - Tube
|
|
1754
|
+
* - 04 - Pak
|
|
1755
|
+
* - 21 - Express Box
|
|
1756
|
+
* - 24 - 25KG Box
|
|
1757
|
+
* - 25 - 10KG Box
|
|
1758
|
+
* - 30 - Pallet
|
|
1759
|
+
* - 2a - Small Express Box
|
|
1760
|
+
* - 2b - Medium Express Box
|
|
1761
|
+
* - 2c - Large Express Box.
|
|
1762
|
+
*
|
|
1763
|
+
* For FRS rating requests the only valid value is customer supplied packaging “02”.
|
|
1764
|
+
*
|
|
1765
|
+
*/
|
|
1766
|
+
Code: string;
|
|
1767
|
+
/**
|
|
1768
|
+
* A text description of the code for the UPS packaging type associated with the shipment. Length is not validated.
|
|
1769
|
+
*/
|
|
1770
|
+
Description?: string;
|
|
1771
|
+
};
|
|
1772
|
+
|
|
1773
|
+
/**
|
|
1774
|
+
* SimpleRate Container
|
|
1775
|
+
*/
|
|
1776
|
+
type Package_SimpleRate = {
|
|
1777
|
+
/**
|
|
1778
|
+
* Simple Rate Package Size Valid values: XS - Extra Small S - Small M - Medium L - Large XL - Extra Large
|
|
1779
|
+
*/
|
|
1780
|
+
Code: string;
|
|
1781
|
+
/**
|
|
1782
|
+
* Simple Rate Package Size Description
|
|
1783
|
+
*/
|
|
1784
|
+
Description?: string;
|
|
1785
|
+
};
|
|
1786
|
+
|
|
1787
|
+
/**
|
|
1788
|
+
* UPS Premier
|
|
1789
|
+
*/
|
|
1790
|
+
type Package_UPSPremier = {
|
|
1791
|
+
/**
|
|
1792
|
+
* UPS Premier Category Valid values are 01,02,03 UPS Premier Silver - 01 UPS Premier Gold - 02 UPS Premier Platinum - 03
|
|
1793
|
+
*/
|
|
1794
|
+
Category: string;
|
|
1795
|
+
};
|
|
1796
|
+
|
|
1797
|
+
/**
|
|
1798
|
+
* Package Container. Only one Package allowed for Simple Rate
|
|
1799
|
+
*/
|
|
1800
|
+
type Shipment_Package = {
|
|
1801
|
+
PackagingType?: Package_PackagingType;
|
|
1802
|
+
Dimensions?: Package_Dimensions;
|
|
1803
|
+
DimWeight?: Package_DimWeight;
|
|
1804
|
+
PackageWeight?: Package_PackageWeight;
|
|
1805
|
+
Commodity?: Package_Commodity;
|
|
1806
|
+
/**
|
|
1807
|
+
* This element does not require a value and if one is entered it will be ignored. If present, it indicates the shipment will be categorized as a Large Package.
|
|
1808
|
+
*/
|
|
1809
|
+
LargePackageIndicator?: string;
|
|
1810
|
+
PackageServiceOptions?: Package_PackageServiceOptions;
|
|
1811
|
+
/**
|
|
1812
|
+
* A flag indicating if the packages require additional handling. True if AdditionalHandlingIndicator tag exists; false otherwise. Additional Handling indicator indicates it's a non-corrugated package. Empty Tag.
|
|
1813
|
+
*/
|
|
1814
|
+
AdditionalHandlingIndicator?: string;
|
|
1815
|
+
SimpleRate?: Package_SimpleRate;
|
|
1816
|
+
UPSPremier?: Package_UPSPremier;
|
|
1817
|
+
/**
|
|
1818
|
+
* Presence/Absence Indicator. Any value inside is ignored. It indicates if packge is oversized. Applicable for UPS Worldwide Economy DDU service
|
|
1819
|
+
*/
|
|
1820
|
+
OversizeIndicator?: string;
|
|
1821
|
+
/**
|
|
1822
|
+
* Presence/Absence Indicator. Any value inside is ignored. It indicates if packge is qualified for minimum billable weight. Applicable for UPS Worldwide Economy DDU service
|
|
1823
|
+
*/
|
|
1824
|
+
MinimumBillableWeightIndicator?: string;
|
|
1825
|
+
};
|
|
1826
|
+
|
|
1827
|
+
/**
|
|
1828
|
+
* Container for additional information for the bill receiver's UPS accounts address.
|
|
1829
|
+
*/
|
|
1830
|
+
type BillReceiver_Address = {
|
|
1831
|
+
/**
|
|
1832
|
+
* The postal code for the UPS account's pickup address. The pickup postal code was entered in the UPS system when the account was set-up.
|
|
1833
|
+
*/
|
|
1834
|
+
PostalCode?: string;
|
|
1835
|
+
};
|
|
1836
|
+
|
|
1837
|
+
/**
|
|
1838
|
+
* Container for the BillReceiver billing option. This element or its sibling element, BillShipper, BillThirdParty or Consignee Billed, must be present but no more than one can be present. For a return shipment, Bill Receiver is invalid for Transportation charges.
|
|
1839
|
+
*/
|
|
1840
|
+
type ShipmentCharge_BillReceiver = {
|
|
1841
|
+
/**
|
|
1842
|
+
* The UPS account number. The account must be a valid UPS account number that is active. For US, PR and CA accounts, the account must be a daily pickup account, an occasional account, a customer B.I.N account, or a dropper shipper account. All other accounts must be either a daily pickup account, an occasional account, a drop shipper account, or a non-shipping account.
|
|
1843
|
+
*/
|
|
1844
|
+
AccountNumber: string;
|
|
1845
|
+
Address?: BillReceiver_Address;
|
|
1846
|
+
};
|
|
1847
|
+
|
|
1848
|
+
/**
|
|
1849
|
+
* Container for the BillShipper billing option. This element or its sibling element, BillReceiver, BillThirdParty or ConsigneeBilledIndicator, must be present but no more than one can be present.
|
|
1850
|
+
*/
|
|
1851
|
+
type ShipmentCharge_BillShipper = {
|
|
1852
|
+
/**
|
|
1853
|
+
* UPS account number Must be the same UPS account number as the one provided in Shipper/ShipperNumber.
|
|
1854
|
+
*/
|
|
1855
|
+
AccountNumber: string;
|
|
1856
|
+
};
|
|
1857
|
+
|
|
1858
|
+
/**
|
|
1859
|
+
* Container for additional information for the third party UPS accounts address.
|
|
1860
|
+
*/
|
|
1861
|
+
type BillThirdParty_Address = {
|
|
1862
|
+
/**
|
|
1863
|
+
* The origin street address including name and number (when applicable).
|
|
1864
|
+
*/
|
|
1865
|
+
AddressLine?: Array<string>;
|
|
1866
|
+
/**
|
|
1867
|
+
* Origin city.
|
|
1868
|
+
*/
|
|
1869
|
+
City?: string;
|
|
1870
|
+
/**
|
|
1871
|
+
* Origin state code.
|
|
1872
|
+
*/
|
|
1873
|
+
StateProvinceCode?: string;
|
|
1874
|
+
/**
|
|
1875
|
+
* Origin postal code. The postal code must be the same as the UPS account pickup address postal code. Required for United States and Canadian UPS accounts and/or if the UPS account pickup address has a postal code. If the UPS account's pickup country or territory is US or Puerto Rico, the postal code is 5 or 9 digits. The character '-' may be used to separate the first five digits and the last four digits. If the UPS account's pickup country or territory is CA, the postal code is 6 alphanumeric characters whose format is A#A#A# where A is an uppercase letter and # is a digit.
|
|
1876
|
+
*/
|
|
1877
|
+
PostalCode?: string;
|
|
1878
|
+
/**
|
|
1879
|
+
* Origin country or territory code. Refer to the Supported Country or Territory Tables located in the Appendix.
|
|
1880
|
+
*/
|
|
1881
|
+
CountryCode: string;
|
|
1882
|
+
};
|
|
1883
|
+
|
|
1884
|
+
/**
|
|
1885
|
+
* Container for the third party billing option. This element or its sibling element, BillShipper, BillReceiver or Consignee Billed, must be present but no more than one can be present.
|
|
1886
|
+
*/
|
|
1887
|
+
type ShipmentCharge_BillThirdParty = {
|
|
1888
|
+
/**
|
|
1889
|
+
* The UPS account number of the third party shipper. The account must be a valid UPS account number that is active. For US, PR and CA accounts, the account must be either a daily pickup account, an occasional account, or a customer B.I.N account, or a drop shipper account. All other accounts must be either a daily pickup account, an occasional account, a drop shipper account, or a non-shipping account.
|
|
1890
|
+
*/
|
|
1891
|
+
AccountNumber: string;
|
|
1892
|
+
Address: BillThirdParty_Address;
|
|
1893
|
+
};
|
|
1894
|
+
|
|
1895
|
+
/**
|
|
1896
|
+
* Shipment charge container. If Duty and Tax charges are applicable to a shipment and a payer is not specified, the default payer of Duty and Tax charges is Bill to Receiver. There will be no default payer of Duty and Tax charges for DDU and DDP service.
|
|
1897
|
+
*/
|
|
1898
|
+
type PaymentDetails_ShipmentCharge = {
|
|
1899
|
+
/**
|
|
1900
|
+
* Values are 01 = Transportation, 02 = Duties and Taxes
|
|
1901
|
+
*/
|
|
1902
|
+
Type: string;
|
|
1903
|
+
BillShipper?: ShipmentCharge_BillShipper;
|
|
1904
|
+
BillReceiver?: ShipmentCharge_BillReceiver;
|
|
1905
|
+
BillThirdParty?: ShipmentCharge_BillThirdParty;
|
|
1906
|
+
/**
|
|
1907
|
+
* Consignee Billing payment option indicator. The presence indicates consignee billing option is selected. The absence indicates one of the other payment options is selected. Empty Tag. This element or its sibling element, BillShipper, BillReceiver or BillThirdParty, must be present but no more than one can be present. This billing option is valid for a shipment charge type of Transportation only. Only applies to US/PR and PR/US shipment origins and destination.
|
|
1908
|
+
*/
|
|
1909
|
+
ConsigneeBilledIndicator?: string;
|
|
1910
|
+
};
|
|
1911
|
+
|
|
1912
|
+
/**
|
|
1913
|
+
* Payment details container for detailed shipment charges. The two shipment charges that are available for specification are Transportation charges and Duties and Taxes. This container is used for Who Pays What functionality.
|
|
1914
|
+
*/
|
|
1915
|
+
type Shipment_PaymentDetails = {
|
|
1916
|
+
ShipmentCharge: Array<PaymentDetails_ShipmentCharge>;
|
|
1917
|
+
/**
|
|
1918
|
+
* Split Duty VAT Indicator. The presence indicates the payer specified for Transportation Charges will pay transportation charges and any duties that apply to the shipment. The payer specified for Duties and Taxes will pay the VAT (Value-Added Tax) only. Empty Tag. The payment method for Transportation charges must be UPS account. The UPS account must be a daily pickup account or an occasional account.
|
|
1919
|
+
*/
|
|
1920
|
+
SplitDutyVATIndicator?: string;
|
|
1921
|
+
};
|
|
1922
|
+
|
|
1923
|
+
/**
|
|
1924
|
+
* PromotionalDiscountInformation container. This container contains discount information that the customer wants to request each time while placing a shipment.
|
|
1925
|
+
*/
|
|
1926
|
+
type Shipment_PromotionalDiscountInformation = {
|
|
1927
|
+
/**
|
|
1928
|
+
* Promotion Code. A discount that is applied to the user. Required if PromotionalDiscountInformation container is present.
|
|
1929
|
+
*/
|
|
1930
|
+
PromoCode: string;
|
|
1931
|
+
/**
|
|
1932
|
+
* Promotion Alias code Required if PromotionalDiscountInformation container is present.
|
|
1933
|
+
*/
|
|
1934
|
+
PromoAliasCode: string;
|
|
1935
|
+
};
|
|
1936
|
+
|
|
1937
|
+
/**
|
|
1938
|
+
* Service Container. Only valid with RequestOption = Rate for both Small package and GFP Rating requests.
|
|
1939
|
+
*/
|
|
1940
|
+
type Shipment_Service = {
|
|
1941
|
+
/**
|
|
1942
|
+
* The code for the UPS Service associated with the shipment.
|
|
1943
|
+
*
|
|
1944
|
+
* NOTE: For a complete listing of values, refer to Service Codes in the Appendix
|
|
1945
|
+
*
|
|
1946
|
+
* Valid domestic values:
|
|
1947
|
+
* - 01 = Next Day Air
|
|
1948
|
+
* - 02 = 2nd Day Air
|
|
1949
|
+
* - 03 = Ground
|
|
1950
|
+
* - 12 = 3 Day Select
|
|
1951
|
+
* - 13 = Next Day Air Saver
|
|
1952
|
+
* - 14 = UPS Next Day Air Early
|
|
1953
|
+
* - 59 = 2nd Day Air A.M.
|
|
1954
|
+
* - 75 = UPS Heavy Goods
|
|
1955
|
+
*
|
|
1956
|
+
* Valid international values:
|
|
1957
|
+
* - 07 = Worldwide Express
|
|
1958
|
+
* - 08 = Worldwide Expedited
|
|
1959
|
+
* - 11= Standard
|
|
1960
|
+
* - 54 = Worldwide Express Plus
|
|
1961
|
+
* - 65 = Saver
|
|
1962
|
+
* - 96 = UPS Worldwide Express Freight
|
|
1963
|
+
* - 71 = UPS Worldwide Express Freight Midday
|
|
1964
|
+
*
|
|
1965
|
+
* Required for Rating and ignored for Shopping.
|
|
1966
|
+
*
|
|
1967
|
+
*/
|
|
1968
|
+
Code: string;
|
|
1969
|
+
/**
|
|
1970
|
+
* A text description of the UPS Service associated with the shipment. Length is not validated.
|
|
1971
|
+
*/
|
|
1972
|
+
Description?: string;
|
|
1973
|
+
};
|
|
1974
|
+
|
|
1975
|
+
/**
|
|
1976
|
+
* Address container for Ship From. Address Container
|
|
1977
|
+
*/
|
|
1978
|
+
type ShipFrom_Address = {
|
|
1979
|
+
/**
|
|
1980
|
+
* The origin street address including name and number (when applicable). Length is not validated.
|
|
1981
|
+
*/
|
|
1982
|
+
AddressLine?: Array<string>;
|
|
1983
|
+
/**
|
|
1984
|
+
* Origin city. Required if country or territory does not utilize postal codes. Length is not validated.
|
|
1985
|
+
*/
|
|
1986
|
+
City?: string;
|
|
1987
|
+
/**
|
|
1988
|
+
* Origin state code. A StateProvinceCode and valid account number are required when requesting negotiated rates. Otherwise the StateProvinceCode is optional.
|
|
1989
|
+
*
|
|
1990
|
+
* If the TaxInformationIndicator flag is present in the request, a StateProvinceCode must be entered for tax charges to be accurately calculated in the response.
|
|
1991
|
+
*
|
|
1992
|
+
*/
|
|
1993
|
+
StateProvinceCode?: string;
|
|
1994
|
+
/**
|
|
1995
|
+
* Origin postal code. Required if country or territory utilizes postal codes (e.g. US and PR).
|
|
1996
|
+
*/
|
|
1997
|
+
PostalCode?: string;
|
|
1998
|
+
/**
|
|
1999
|
+
* Origin country or territory code. Refer to the Supported Country or Territory Tables located in the Appendix. Required, but defaults to US.
|
|
2000
|
+
*/
|
|
2001
|
+
CountryCode: string;
|
|
2002
|
+
};
|
|
2003
|
+
|
|
2004
|
+
/**
|
|
2005
|
+
* Ship From Container.
|
|
2006
|
+
*/
|
|
2007
|
+
type Shipment_ShipFrom = {
|
|
2008
|
+
/**
|
|
2009
|
+
* Origin attention name or company name. Length is not validated.
|
|
2010
|
+
*/
|
|
2011
|
+
Name?: string;
|
|
2012
|
+
/**
|
|
2013
|
+
* Origin attention name. Length is not validated.
|
|
2014
|
+
*/
|
|
2015
|
+
AttentionName?: string;
|
|
2016
|
+
Address: ShipFrom_Address;
|
|
2017
|
+
};
|
|
2018
|
+
|
|
2019
|
+
/**
|
|
2020
|
+
* Container to hold shipment indication type.
|
|
2021
|
+
*/
|
|
2022
|
+
type Shipment_ShipmentIndicationType = {
|
|
2023
|
+
/**
|
|
2024
|
+
* Code for Shipment Indication Type.
|
|
2025
|
+
*
|
|
2026
|
+
* Valid values:
|
|
2027
|
+
* - 01 - Hold for Pickup at UPS Access Point
|
|
2028
|
+
* - 02 - UPS Access Point™ Delivery
|
|
2029
|
+
*
|
|
2030
|
+
*/
|
|
2031
|
+
Code: string;
|
|
2032
|
+
/**
|
|
2033
|
+
* Description for Shipment Indication Type. Length is not Validated.
|
|
2034
|
+
*/
|
|
2035
|
+
Description?: string;
|
|
2036
|
+
};
|
|
2037
|
+
|
|
2038
|
+
/**
|
|
2039
|
+
* Shipment Rating Options container.
|
|
2040
|
+
*/
|
|
2041
|
+
type Shipment_ShipmentRatingOptions = {
|
|
2042
|
+
/**
|
|
2043
|
+
* NegotiatedRatesIndicator - Required to display two types of discounts: 1) Bids or Account Based Rates2) Web/Promotional Discounts BidsAccount Based Rates: If the indicator is present, the Shipper is authorized, and the Rating API XML Request is configured to return Negotiated Rates, then Negotiated Rates should be returned in the response. Web/Promotional Discounts: If the indicator is present, the Shipper is authorized for Web/Promotional Discounts then Negotiated Rates should be returned in the response.
|
|
2044
|
+
*/
|
|
2045
|
+
NegotiatedRatesIndicator?: string;
|
|
2046
|
+
/**
|
|
2047
|
+
* FRS Indicator. The indicator is required to obtain rates for UPS Ground Freight Pricing (GFP). The account number must be enabled for GFP.
|
|
2048
|
+
*/
|
|
2049
|
+
FRSShipmentIndicator?: string;
|
|
2050
|
+
/**
|
|
2051
|
+
* RateChartIndicator - If present in a request, the response will contain a RateChart element.
|
|
2052
|
+
*/
|
|
2053
|
+
RateChartIndicator?: string;
|
|
2054
|
+
/**
|
|
2055
|
+
* UserLevelDiscountIndicator - required to obtain rates for User Level Promotions. This is required to obtain User Level Discounts. There must also be no ShipperNumber in the Shipper container.
|
|
2056
|
+
*/
|
|
2057
|
+
UserLevelDiscountIndicator?: string;
|
|
2058
|
+
/**
|
|
2059
|
+
* This indicator applies for a third party (3P) / Freight collect (FC) shipment only. For 3P/FC shipment if the shipper wishes to request for the negotiated rates of the third party then this indicator should be included in the request. If authorized the 3P/FC negotiated rates will be applied to the shipment and rates will be returned in response.
|
|
2060
|
+
*/
|
|
2061
|
+
TPFCNegotiatedRatesIndicator?: string;
|
|
2062
|
+
};
|
|
2063
|
+
|
|
2064
|
+
/**
|
|
2065
|
+
* Access Point COD indicates Shipment level Access Point COD is requested for a shipment. Valid only for "01 - Hold For Pickup At UPS Access Point" Shipment Indication type.
|
|
2066
|
+
*
|
|
2067
|
+
* Shipment Access Point COD is valid only for countries or territories within E.U.
|
|
2068
|
+
*
|
|
2069
|
+
* Not valid with (Shipment) COD.
|
|
2070
|
+
*
|
|
2071
|
+
* Not available to shipment with return service.
|
|
2072
|
+
*
|
|
2073
|
+
*/
|
|
2074
|
+
type ShipmentServiceOptions_AccessPointCOD = {
|
|
2075
|
+
/**
|
|
2076
|
+
* Access Point COD Currency Code. Required if Access Point COD container is present. UPS does not support all international currency codes. Refer to the appendix for a list of valid codes.
|
|
2077
|
+
*/
|
|
2078
|
+
CurrencyCode: string;
|
|
2079
|
+
/**
|
|
2080
|
+
* Access Point COD Monetary Value. Required if Access Point COD container is present.
|
|
2081
|
+
*
|
|
2082
|
+
* 8 digits prior to the decimal place and 2 after.
|
|
2083
|
+
*
|
|
2084
|
+
*/
|
|
2085
|
+
MonetaryValue: string;
|
|
2086
|
+
};
|
|
2087
|
+
|
|
2088
|
+
/**
|
|
2089
|
+
* CODAmount Container. UPS does not support all international currency codes. Refer to the appendix for a list of valid codes.
|
|
2090
|
+
*/
|
|
2091
|
+
type ShipmentServiceOptions_COD_CODAmount = {
|
|
2092
|
+
/**
|
|
2093
|
+
* COD amount currency code type.
|
|
2094
|
+
*/
|
|
2095
|
+
CurrencyCode: string;
|
|
2096
|
+
/**
|
|
2097
|
+
* COD Amount.
|
|
2098
|
+
*/
|
|
2099
|
+
MonetaryValue: string;
|
|
2100
|
+
};
|
|
2101
|
+
|
|
2102
|
+
/**
|
|
2103
|
+
* If present, indicates C.O.D. is requested for the shipment. Shipment level C.O.D. is only available for EU origin countries or territories.C.O.D. shipments are only available for Shippers with Daily Pickup and Drop Shipping accounts.
|
|
2104
|
+
*/
|
|
2105
|
+
type ShipmentServiceOptions_COD = {
|
|
2106
|
+
/**
|
|
2107
|
+
* For valid values, refer to Rating and Shipping COD Supported Countries or Territories in the Appendix.
|
|
2108
|
+
*/
|
|
2109
|
+
CODFundsCode: string;
|
|
2110
|
+
CODAmount: ShipmentServiceOptions_COD_CODAmount;
|
|
2111
|
+
};
|
|
2112
|
+
|
|
2113
|
+
/**
|
|
2114
|
+
* Delivery Confirmation Container. DeliveryConfirmation and C.O.D. are mutually exclusive. Refer to the Appendix for a list of valid origin-destination country or territory pairs associated with each confirmation type.
|
|
2115
|
+
*/
|
|
2116
|
+
type ShipmentServiceOptions_DeliveryConfirmation = {
|
|
2117
|
+
/**
|
|
2118
|
+
* Type of delivery confirmation. Valid values: 1 - Delivery Confirmation Signature Required 2 - Delivery Confirmation Adult Signature Required
|
|
2119
|
+
*/
|
|
2120
|
+
DCISType: string;
|
|
2121
|
+
};
|
|
2122
|
+
|
|
2123
|
+
/**
|
|
2124
|
+
* Shipment Service Delivery Options Container. Valid for UPS Worldwide Express Freight and UPS Worldwide Express Freight Midday shipments.
|
|
2125
|
+
*/
|
|
2126
|
+
type ShipmentServiceOptions_DeliveryOptions = {
|
|
2127
|
+
/**
|
|
2128
|
+
* The presence of the tag LiftGateAtDeliveryIndicator indicates that the shipment requires a lift gate for delivery.
|
|
2129
|
+
*/
|
|
2130
|
+
LiftGateAtDeliveryIndicator?: string;
|
|
2131
|
+
/**
|
|
2132
|
+
* The presence of the tag DropOffAtUPSFacilityIndicator indicates the package will be dropped at a UPS facility for shipment.
|
|
2133
|
+
*/
|
|
2134
|
+
DropOffAtUPSFacilityIndicator?: string;
|
|
2135
|
+
};
|
|
2136
|
+
|
|
2137
|
+
/**
|
|
2138
|
+
* Container for type of Import Control shipments.
|
|
2139
|
+
*/
|
|
2140
|
+
type ShipmentServiceOptions_ImportControl = {
|
|
2141
|
+
/**
|
|
2142
|
+
* Code for type of Import Control shipment. Valid values are: ImportControl One-Attempt '03' = ImportControl Three-Attempt'04' = ImportControl Electronic Label '05' = ImportControl Print Label.
|
|
2143
|
+
*/
|
|
2144
|
+
Code: string;
|
|
2145
|
+
/**
|
|
2146
|
+
* Text description of the code representing the Import Control associated with the shipment.
|
|
2147
|
+
*/
|
|
2148
|
+
Description?: string;
|
|
2149
|
+
};
|
|
2150
|
+
|
|
2151
|
+
/**
|
|
2152
|
+
* Shipment Service Pickup Options Container. Valid for UPS Worldwide Express Freight and UPS Worldwide Express Freight Midday shipments.
|
|
2153
|
+
*/
|
|
2154
|
+
type ShipmentServiceOptions_PickupOptions = {
|
|
2155
|
+
/**
|
|
2156
|
+
* The presence of the tag LiftGatePickupRequiredIndicator indicates that the shipment requires a lift gate for pickup.
|
|
2157
|
+
*/
|
|
2158
|
+
LiftGateAtPickupIndicator?: string;
|
|
2159
|
+
/**
|
|
2160
|
+
* The presence of the tag HoldForPickupIndicator indicates that the user opted to hold the shipment at UPS location for pickup.
|
|
2161
|
+
*/
|
|
2162
|
+
HoldForPickupIndicator?: string;
|
|
2163
|
+
};
|
|
2164
|
+
|
|
2165
|
+
/**
|
|
2166
|
+
* Restricted Articles container. Valid for UPS World Wide Express Freight shipments.
|
|
2167
|
+
*/
|
|
2168
|
+
type ShipmentServiceOptions_RestrictedArticles = {
|
|
2169
|
+
/**
|
|
2170
|
+
* This field is a flag to indicate if the package has Alcohol. True if present; false otherwise. Valid for UPS World Wide Express Freight shipments.
|
|
2171
|
+
*/
|
|
2172
|
+
AlcoholicBeveragesIndicator?: string;
|
|
2173
|
+
/**
|
|
2174
|
+
* This field is a flag to indicate if the package has Biological substances. True if present; false otherwise. Valid for UPS World Wide Express Freight shipments. Lane check will happen based on postal code/ city.
|
|
2175
|
+
*/
|
|
2176
|
+
DiagnosticSpecimensIndicator?: string;
|
|
2177
|
+
/**
|
|
2178
|
+
* This field is a flag to indicate if the package has Perishables. True if present; false otherwise. Valid for UPS World Wide Express Freight shipments.
|
|
2179
|
+
*/
|
|
2180
|
+
PerishablesIndicator?: string;
|
|
2181
|
+
/**
|
|
2182
|
+
* This field is a flag to indicate if the package has Plants. True if present; false otherwise. Valid for UPS World Wide Express Freight shipments.
|
|
2183
|
+
*/
|
|
2184
|
+
PlantsIndicator?: string;
|
|
2185
|
+
/**
|
|
2186
|
+
* This field is a flag to indicate if the package has Seeds. True if present; false otherwise. Valid for UPS World Wide Express Freight shipments.
|
|
2187
|
+
*/
|
|
2188
|
+
SeedsIndicator?: string;
|
|
2189
|
+
/**
|
|
2190
|
+
* This field is a flag to indicate if the package has Special Exceptions Restricted Materials. True if present; false otherwise. Valid for UPS World Wide Express Freight shipments.
|
|
2191
|
+
*/
|
|
2192
|
+
SpecialExceptionsIndicator?: string;
|
|
2193
|
+
/**
|
|
2194
|
+
* This field is a flag to indicate if the package has Tobacco. True if present; false otherwise. Valid for UPS World Wide Express Freight shipments.
|
|
2195
|
+
*/
|
|
2196
|
+
TobaccoIndicator?: string;
|
|
2197
|
+
/**
|
|
2198
|
+
* This field is a flag to indicate if the package has E-Cigarettes. True if present; false otherwise. Valid for UPS World Wide Express Freight shipments.
|
|
2199
|
+
*/
|
|
2200
|
+
ECigarettesIndicator?: string;
|
|
2201
|
+
/**
|
|
2202
|
+
* This field is a flag to indicate if the package has Hemp/CBD. True if present; false otherwise. Valid for UPS World Wide Express Freight shipments.
|
|
2203
|
+
*/
|
|
2204
|
+
HempCBDIndicator?: string;
|
|
2205
|
+
};
|
|
2206
|
+
|
|
2207
|
+
/**
|
|
2208
|
+
* Container for type of Return Services.
|
|
2209
|
+
*/
|
|
2210
|
+
type ShipmentServiceOptions_ReturnService = {
|
|
2211
|
+
/**
|
|
2212
|
+
* Code for type of Return shipment. Valid values are:'3' =UPS One-Attempt Return Label'5' = UPS Three Attempt Return Label'8' = UPS Electronic Return Label'9' = UPS Print Return Label'10' = UPS Exchange Print Return Label '11' = UPS Pack & Collect Service 1-Attempt Box 1 '12' = UPS Pack & Collect Service 1-Attempt Box 2 '13' = UPS Pack & Collect Service 1-Attempt Box 3 '14' = UPS Pack & Collect Service 1-Attempt Box 4 '15' = UPS Pack & Collect Service 1-Attempt Box 5 '16' = UPS Pack & Collect Service 3-Attempt Box 1 '17' = UPS Pack & Collect Service 3-Attempt Box 2 '18' = UPS Pack & Collect Service 3-Attempt Box 3 '19' = UPS Pack & Collect Service 3-Attempt Box 4 '20' = UPS Pack & Collect Service 3-Attempt Box 5 10 = UPS Exchange Print Return Label and 5 = UPS Three Attempt Return Label are not valid for UPS WorldWide Express Freight and UPS Worldwide Express Freight Midday Services. 3 = UPS One-Attempt Return Label is not valid return service with UPS Premium Care accessorial.
|
|
2213
|
+
*/
|
|
2214
|
+
Code: string;
|
|
2215
|
+
/**
|
|
2216
|
+
* Description for type of Return Service.
|
|
2217
|
+
*/
|
|
2218
|
+
Description?: string;
|
|
2219
|
+
};
|
|
2220
|
+
|
|
2221
|
+
/**
|
|
2222
|
+
* Shipment level Accessorials are included in this container.
|
|
2223
|
+
*/
|
|
2224
|
+
type Shipment_ShipmentServiceOptions = {
|
|
2225
|
+
/**
|
|
2226
|
+
* A flag indicating if the shipment requires a GlobalCheckoutIndicator. True if GlobalCheckoutIndicator tag exists; false otherwise Empty Tag.
|
|
2227
|
+
*/
|
|
2228
|
+
GlobalCheckoutIndicator?: string;
|
|
2229
|
+
/**
|
|
2230
|
+
* A flag indicating if the shipment requires a Saturday pickup. True if SaturdayPickupIndicator tag exists; false otherwise. Not available for GFP rating requests. Empty Tag.
|
|
2231
|
+
*/
|
|
2232
|
+
SaturdayPickupIndicator?: string;
|
|
2233
|
+
/**
|
|
2234
|
+
* A flag indicating if a shipment must be delivered on a Saturday. True if SaturdayDeliveryIndicator tag exists; false otherwise Empty Tag.
|
|
2235
|
+
*/
|
|
2236
|
+
SaturdayDeliveryIndicator?: string;
|
|
2237
|
+
/**
|
|
2238
|
+
* A flag indicating if a shipment must be delivered on a Sunday. True if SundayDeliveryIndicator tag exists; false otherwise Empty Tag.
|
|
2239
|
+
*/
|
|
2240
|
+
SundayDeliveryIndicator?: string;
|
|
2241
|
+
/**
|
|
2242
|
+
* If we need diferent available services in response, this option is used for shop request option. SaturdayDeliveryIndicator/ SundayDeliveryIndicator will be ignored in that case. Valid Values:1- Weekday+Saturday services2- Weekday+Sunday services3- Weekday+Sat services+Sun services
|
|
2243
|
+
*/
|
|
2244
|
+
AvailableServicesOption?: string;
|
|
2245
|
+
AccessPointCOD?: ShipmentServiceOptions_AccessPointCOD;
|
|
2246
|
+
/**
|
|
2247
|
+
* Presence/Absence Indicator. Any value inside is ignored.
|
|
2248
|
+
*
|
|
2249
|
+
* DeliverToAddresseeOnlyIndicator is shipper specified restriction that requires the addressee to be the one who takes final delivery of the "Hold For PickUp at UPS Access Point" package.
|
|
2250
|
+
*
|
|
2251
|
+
* Presence of indicator means shipper restriction will apply to the shipment. Only valid for Shipment Indication type "01 - Hold For PickUp at UPS Access Point".
|
|
2252
|
+
*
|
|
2253
|
+
*/
|
|
2254
|
+
DeliverToAddresseeOnlyIndicator?: string;
|
|
2255
|
+
/**
|
|
2256
|
+
* Presence/Absence Indicator. Any value inside is ignored. Direct Delivery Only (DDO) accessorial in a request would ensure that delivery is made only to the Ship To address on the shipping label. This accessorial is not valid with Shipment Indication Types:
|
|
2257
|
+
* - 01 - Hold For Pickup At UPS Access Point
|
|
2258
|
+
* - 02 - UPS Access Point™ Delivery
|
|
2259
|
+
*
|
|
2260
|
+
*/
|
|
2261
|
+
DirectDeliveryOnlyIndicator?: string;
|
|
2262
|
+
COD?: ShipmentServiceOptions_COD;
|
|
2263
|
+
DeliveryConfirmation?: ShipmentServiceOptions_DeliveryConfirmation;
|
|
2264
|
+
/**
|
|
2265
|
+
* Return of Documents Indicator - If the flag is present, the shipper has requested the ReturnOfDocument accessorial be added to the shipment Valid for Poland to Poland shipment.
|
|
2266
|
+
*/
|
|
2267
|
+
ReturnOfDocumentIndicator?: string;
|
|
2268
|
+
/**
|
|
2269
|
+
* UPS carbon neutral indicator. Indicates the shipment will be rated as carbon neutral.
|
|
2270
|
+
*/
|
|
2271
|
+
UPScarbonneutralIndicator?: string;
|
|
2272
|
+
/**
|
|
2273
|
+
* The empty tag in request indicates that customer would be using UPS prepared SED form. Valid for UPS World Wide Express Freight shipments.
|
|
2274
|
+
*/
|
|
2275
|
+
CertificateOfOriginIndicator?: string;
|
|
2276
|
+
PickupOptions?: ShipmentServiceOptions_PickupOptions;
|
|
2277
|
+
DeliveryOptions?: ShipmentServiceOptions_DeliveryOptions;
|
|
2278
|
+
RestrictedArticles?: ShipmentServiceOptions_RestrictedArticles;
|
|
2279
|
+
/**
|
|
2280
|
+
* The empty tag in request indicates that customer would be using UPS prepared SED form. Valid for UPS World Wide Express Freight shipments.
|
|
2281
|
+
*/
|
|
2282
|
+
ShipperExportDeclarationIndicator?: string;
|
|
2283
|
+
/**
|
|
2284
|
+
* Presence/Absence Indicator. Any value inside is ignored. CommercialInvoiceRemovalIndicator - empty tag means indicator is present. CommercialInvoiceRemovalIndicator allows a shipper to dictate that UPS remove the Commercial Invoice from the user's shipment before the shipment is delivered to the ultimate consignee.
|
|
2285
|
+
*/
|
|
2286
|
+
CommercialInvoiceRemovalIndicator?: string;
|
|
2287
|
+
ImportControl?: ShipmentServiceOptions_ImportControl;
|
|
2288
|
+
ReturnService?: ShipmentServiceOptions_ReturnService;
|
|
2289
|
+
/**
|
|
2290
|
+
* Empty Tag means the indicator is present. This field is a flag to indicate if the receiver needs SDL rates in response. True if SDLShipmentIndicator tag exists; false otherwise. If present, the State Department License (SDL) rates will be returned in the response.This service requires that the account number is enabled for SDL.
|
|
2291
|
+
*/
|
|
2292
|
+
SDLShipmentIndicator?: string;
|
|
2293
|
+
/**
|
|
2294
|
+
* For valid values, refer to Rating and Shipping COD Supported Countries or Territories in the Appendix.Presence/Absence Indicator. Any value inside is ignored. This field is a flag to indicate Package Release Code is requested for shipment.
|
|
2295
|
+
*
|
|
2296
|
+
* This accessorial is only valid with ShipmentIndicationType '01' - Hold for Pickup at UPS Access Point™.
|
|
2297
|
+
*
|
|
2298
|
+
*/
|
|
2299
|
+
EPRAIndicator?: string;
|
|
2300
|
+
/**
|
|
2301
|
+
* Inside Delivery accessory. Valid values:
|
|
2302
|
+
* - 01 - White Glove
|
|
2303
|
+
* - 02 - Room of Choice
|
|
2304
|
+
* - 03 - Installation Shippers account needs to have a valid contract for Heavy Goods Service.
|
|
2305
|
+
*
|
|
2306
|
+
*/
|
|
2307
|
+
InsideDelivery?: string;
|
|
2308
|
+
/**
|
|
2309
|
+
* Presence/Absence Indicator. Any value inside is ignored. If present, indicates that the customer would like items disposed. Shippers account needs to have a valid contract for Heavy Goods Service.
|
|
2310
|
+
*/
|
|
2311
|
+
ItemDisposalIndicator?: string;
|
|
2312
|
+
};
|
|
2313
|
+
|
|
2314
|
+
/**
|
|
2315
|
+
* UnitOfMeasurement Container.
|
|
2316
|
+
*/
|
|
2317
|
+
type ShipmentTotalWeight_UnitOfMeasurement = {
|
|
2318
|
+
/**
|
|
2319
|
+
* Code representing the unit of measure associated with the package weight.
|
|
2320
|
+
*
|
|
2321
|
+
* Valid values:
|
|
2322
|
+
* - LBS = Pounds
|
|
2323
|
+
* - KGS = Kilograms.
|
|
2324
|
+
*
|
|
2325
|
+
*/
|
|
2326
|
+
Code: string;
|
|
2327
|
+
/**
|
|
2328
|
+
* Text description of the code representing the unit of measure associated with the shipment weight.
|
|
2329
|
+
*/
|
|
2330
|
+
Description: string;
|
|
2331
|
+
};
|
|
2332
|
+
|
|
2333
|
+
/**
|
|
2334
|
+
* Shipment Total Weight Container. This container is only applicable for "ratetimeintransit" and "shoptimeintransit" request options. Required for all international shipments when retreiving time in transit information, including letters and documents shipments.
|
|
2335
|
+
*/
|
|
2336
|
+
type Shipment_ShipmentTotalWeight = {
|
|
2337
|
+
UnitOfMeasurement: ShipmentTotalWeight_UnitOfMeasurement;
|
|
2338
|
+
/**
|
|
2339
|
+
* Non-zero total weight of all packages in the shipment.
|
|
2340
|
+
*/
|
|
2341
|
+
Weight: string;
|
|
2342
|
+
};
|
|
2343
|
+
|
|
2344
|
+
/**
|
|
2345
|
+
* Address Container. If the ShipFrom container is not present then this address will be used as the ShipFrom. If this address is used as the ShipFrom, the shipment will be rated from this origin address.
|
|
2346
|
+
*/
|
|
2347
|
+
type Shipper_Address = {
|
|
2348
|
+
/**
|
|
2349
|
+
* Shipper's street address including name and number (when applicable). Maximum Occurrence should be three. Length is not validated. Note:Required if requesting Roadie Service
|
|
2350
|
+
*/
|
|
2351
|
+
AddressLine: Array<string>;
|
|
2352
|
+
/**
|
|
2353
|
+
* Shipper's city. Required if country or territory does not utilize postal codes. Length is not validated.
|
|
2354
|
+
*/
|
|
2355
|
+
City?: string;
|
|
2356
|
+
/**
|
|
2357
|
+
* Shipper's state code. Length is not validated.
|
|
2358
|
+
*/
|
|
2359
|
+
StateProvinceCode?: string;
|
|
2360
|
+
/**
|
|
2361
|
+
* Shipper's postal code. Length is not validated.
|
|
2362
|
+
*/
|
|
2363
|
+
PostalCode?: string;
|
|
2364
|
+
/**
|
|
2365
|
+
* Country or Territory code. Refer to the Supported Country or Territory Tables located in Appendix.
|
|
2366
|
+
*/
|
|
2367
|
+
CountryCode: string;
|
|
2368
|
+
};
|
|
2369
|
+
|
|
2370
|
+
/**
|
|
2371
|
+
* Shipper container. Information associated with the UPS account number.
|
|
2372
|
+
*/
|
|
2373
|
+
type Shipment_Shipper = {
|
|
2374
|
+
/**
|
|
2375
|
+
* Shipper's name or company name. Length is not validated.
|
|
2376
|
+
*/
|
|
2377
|
+
Name?: string;
|
|
2378
|
+
/**
|
|
2379
|
+
* Shipper's attention name. Length is not validated.
|
|
2380
|
+
*/
|
|
2381
|
+
AttentionName?: string;
|
|
2382
|
+
/**
|
|
2383
|
+
* Shipper's UPS account number. A valid account number is required to receive negotiated rates. Optional otherwise. Cannot be present when requesting UserLevelDiscount.
|
|
2384
|
+
*/
|
|
2385
|
+
ShipperNumber?: string;
|
|
2386
|
+
Address: Shipper_Address;
|
|
2387
|
+
};
|
|
2388
|
+
|
|
2389
|
+
/**
|
|
2390
|
+
* Address Container.
|
|
2391
|
+
*/
|
|
2392
|
+
type ShipTo_Address = {
|
|
2393
|
+
/**
|
|
2394
|
+
* Destination street address including name and number (when applicable). Max Occurrence can be 3. Length is not validated. Note:Required if requesting Roadie Service
|
|
2395
|
+
*/
|
|
2396
|
+
AddressLine: Array<string>;
|
|
2397
|
+
/**
|
|
2398
|
+
* Destination city. Required if country or territory does not utilize postal codes. Length is not validated.
|
|
2399
|
+
*/
|
|
2400
|
+
City?: string;
|
|
2401
|
+
/**
|
|
2402
|
+
* Destination state code.
|
|
2403
|
+
*/
|
|
2404
|
+
StateProvinceCode?: string;
|
|
2405
|
+
/**
|
|
2406
|
+
* Destination postal code. Required if country or territory utilizes postal codes (i.e. US and PR).
|
|
2407
|
+
*/
|
|
2408
|
+
PostalCode?: string;
|
|
2409
|
+
/**
|
|
2410
|
+
* Destination country or territory code. Refer to the Supported Country or Territory Tables located in the Appendix.
|
|
2411
|
+
*/
|
|
2412
|
+
CountryCode: string;
|
|
2413
|
+
/**
|
|
2414
|
+
* Residential Address flag. This field is a flag to indicate if the destination is a residential location. True if ResidentialAddressIndicator tag exists; false otherwise. This element does not require a value and if one is entered it will be ignored.
|
|
2415
|
+
*
|
|
2416
|
+
* Note: When requesting TimeInTransit information, this indicator must be passed to determine if Three Day Select or Ground shipment is eligible for Saturday Delivery at no charge. If this indicator is not present, address will be considered as commercial. Empty Tag.
|
|
2417
|
+
*
|
|
2418
|
+
*/
|
|
2419
|
+
ResidentialAddressIndicator?: string;
|
|
2420
|
+
};
|
|
2421
|
+
|
|
2422
|
+
/**
|
|
2423
|
+
* Ship To Container
|
|
2424
|
+
*/
|
|
2425
|
+
type Shipment_ShipTo = {
|
|
2426
|
+
/**
|
|
2427
|
+
* Destination attention name or company name. Length is not validated.
|
|
2428
|
+
*/
|
|
2429
|
+
Name?: string;
|
|
2430
|
+
/**
|
|
2431
|
+
* Destination attention name. Length is not validated.
|
|
2432
|
+
*/
|
|
2433
|
+
AttentionName?: string;
|
|
2434
|
+
Address: ShipTo_Address;
|
|
2435
|
+
};
|
|
2436
|
+
|
|
2437
|
+
/**
|
|
2438
|
+
* Container for Shipment Information.
|
|
2439
|
+
*/
|
|
2440
|
+
type RateRequest_Shipment = {
|
|
2441
|
+
/**
|
|
2442
|
+
* The time that the request was made from the originating system. UTC time down to milliseconds. Example - 2016-07-14T12:01:33.999 Applicable only for HazMat request and with subversion greater than or equal to 1701.
|
|
2443
|
+
*/
|
|
2444
|
+
OriginRecordTransactionTimestamp?: string;
|
|
2445
|
+
Shipper: Shipment_Shipper;
|
|
2446
|
+
ShipTo: Shipment_ShipTo;
|
|
2447
|
+
ShipFrom?: Shipment_ShipFrom;
|
|
2448
|
+
AlternateDeliveryAddress?: Shipment_AlternateDeliveryAddress;
|
|
2449
|
+
ShipmentIndicationType?: Array<Shipment_ShipmentIndicationType>;
|
|
2450
|
+
PaymentDetails?: Shipment_PaymentDetails;
|
|
2451
|
+
FRSPaymentInformation?: Shipment_FRSPaymentInformation;
|
|
2452
|
+
FreightShipmentInformation?: Shipment_FreightShipmentInformation;
|
|
2453
|
+
/**
|
|
2454
|
+
* Goods Not In Free Circulation indicator. This is an empty tag, any value inside is ignored. This indicator is invalid for a package type of UPS Letter and DocumentsOnly.
|
|
2455
|
+
*/
|
|
2456
|
+
GoodsNotInFreeCirculationIndicator?: string;
|
|
2457
|
+
Service?: Shipment_Service;
|
|
2458
|
+
/**
|
|
2459
|
+
* Total number of pieces in all pallets. Required for UPS Worldwide Express Freight and UPS Worldwide Express Freight Midday shipments.
|
|
2460
|
+
*/
|
|
2461
|
+
NumOfPieces?: string;
|
|
2462
|
+
ShipmentTotalWeight?: Shipment_ShipmentTotalWeight;
|
|
2463
|
+
/**
|
|
2464
|
+
* Valid values are Document and Non-document. If the indicator is present then the value is Document else Non-Document. Note: Not applicable for FRS rating requests. Empty Tag.
|
|
2465
|
+
*/
|
|
2466
|
+
DocumentsOnlyIndicator?: string;
|
|
2467
|
+
Package: Array<Shipment_Package>;
|
|
2468
|
+
ShipmentServiceOptions?: Shipment_ShipmentServiceOptions;
|
|
2469
|
+
ShipmentRatingOptions?: Shipment_ShipmentRatingOptions;
|
|
2470
|
+
InvoiceLineTotal?: Shipment_InvoiceLineTotal;
|
|
2471
|
+
/**
|
|
2472
|
+
* Presence/Absence Indicator. Any value inside is ignored. RatingMethodRequestedIndicator is an indicator. If present, Billable Weight Calculation method and Rating Method information would be returned in response.
|
|
2473
|
+
*/
|
|
2474
|
+
RatingMethodRequestedIndicator?: string;
|
|
2475
|
+
/**
|
|
2476
|
+
* Presence/Absence Indicator. Any value inside is ignored. TaxInformationIndicator is an indicator. The Tax related information includes any type of Taxes, corresponding Monetary Values, Total Charges with Taxes and disclaimers (if applicable) would be returned in response. If present, any taxes that may be applicable to a shipment would be returned in response. If this indicator is requested with NegotiatedRatesIndicator, Tax related information, if applicable, would be returned only for Negotiated Rates and not for Published Rates.
|
|
2477
|
+
*/
|
|
2478
|
+
TaxInformationIndicator?: string;
|
|
2479
|
+
PromotionalDiscountInformation?: Shipment_PromotionalDiscountInformation;
|
|
2480
|
+
DeliveryTimeInformation?: Shipment_DeliveryTimeInformation;
|
|
2481
|
+
/**
|
|
2482
|
+
* Presence/Absence Indicator. Any value inside is ignored. MasterCartonIndicator is an indicator and presence implies that shipment is Master Carton type. If present, the shipment will be rated as a Master Carton Type. If this indicator is requested with NegotiatedRatesIndicator, rates would be returned only for Negotiated Rates and not for Published Rates.
|
|
2483
|
+
*/
|
|
2484
|
+
MasterCartonIndicator?: string;
|
|
2485
|
+
/**
|
|
2486
|
+
* Presence/Absence Indicator. Any value inside is ignored. WWEShipmentIndicator is an indicator and presence implies that WWE service details requested for RequestOption=Shop or RequestOption=Shoptimeintransit RequestOption=Shop or RequestOption=Shoptimeintransit
|
|
2487
|
+
*/
|
|
2488
|
+
WWEShipmentIndicator?: string;
|
|
2489
|
+
};
|
|
2490
|
+
|
|
2491
|
+
/**
|
|
2492
|
+
* Rate Request container.
|
|
2493
|
+
*/
|
|
2494
|
+
type RateRequest = {
|
|
2495
|
+
Request: RateRequest_Request;
|
|
2496
|
+
PickupType?: RateRequest_PickupType;
|
|
2497
|
+
CustomerClassification?: RateRequest_CustomerClassification;
|
|
2498
|
+
Shipment: RateRequest_Shipment;
|
|
2499
|
+
};
|
|
2500
|
+
|
|
2501
|
+
/**
|
|
2502
|
+
* N/A
|
|
2503
|
+
*/
|
|
2504
|
+
type RATERequestWrapper = {
|
|
2505
|
+
RateRequest: RateRequest;
|
|
2506
|
+
};
|
|
2507
|
+
|
|
2508
|
+
/**
|
|
2509
|
+
* UPS Rating Request Builder
|
|
2510
|
+
* * This module transforms agnostic Shipstack rating requests into the
|
|
2511
|
+
* specific nested JSON structure required by the UPS Rating API.
|
|
2512
|
+
*/
|
|
2513
|
+
|
|
2514
|
+
/**
|
|
2515
|
+
* Transforms an agnostic Shipstack rate request into a UPS RATERequestWrapper.
|
|
2516
|
+
* * @param {InternalRateRequest} req - The standardized rating request.
|
|
2517
|
+
* @param {string} shipperNumber - The 6-digit UPS account number (required for negotiated rates).
|
|
2518
|
+
* @returns {RATERequestWrapper} The formatted UPS rating payload.
|
|
2519
|
+
* @category Builders
|
|
2520
|
+
* @public
|
|
2521
|
+
*/
|
|
2522
|
+
declare function buildUpsRateRequest(req: RateRequest$1, shipperNumber: string): RATERequestWrapper;
|
|
2523
|
+
|
|
2524
|
+
/**
|
|
2525
|
+
* Service Client for the FedEx Rates and Transit Times API v1.
|
|
2526
|
+
* * This client abstracts the complexity of the FedEx OAuth2 flow and the
|
|
2527
|
+
* deeply nested request structures required by the 'rateAndTransitTimes' endpoint.
|
|
2528
|
+
* It ensures that every request is authenticated with a fresh Bearer token
|
|
2529
|
+
* scoped to the provided credentials.
|
|
2530
|
+
* * @example
|
|
2531
|
+
* ```typescript
|
|
2532
|
+
* const client = new FedexRatesClient(config);
|
|
2533
|
+
* await client.init();
|
|
2534
|
+
* const rates = await client.getRates(fedexPayload);
|
|
2535
|
+
* ```
|
|
2536
|
+
*/
|
|
2537
|
+
declare class FedexRatesClient {
|
|
2538
|
+
private config;
|
|
2539
|
+
/**
|
|
2540
|
+
* Initializes the FedEx Rates client.
|
|
2541
|
+
* @param config - Validated FedEx configuration including clientId and clientSecret.
|
|
2542
|
+
*/
|
|
2543
|
+
constructor(config: FedexConfig);
|
|
2544
|
+
/**
|
|
2545
|
+
* Performs the OAuth2 handshake and configures the global OpenAPI state.
|
|
2546
|
+
* * This method must be called before executing any rate requests. it injects
|
|
2547
|
+
* the retrieved Bearer token into the OpenAPI singleton used by the generated SDK.
|
|
2548
|
+
* * @returns {Promise<void>}
|
|
2549
|
+
* @throws {ShipstackError} If authentication fails or credentials are invalid.
|
|
2550
|
+
*/
|
|
2551
|
+
init(): Promise<void>;
|
|
2552
|
+
/**
|
|
2553
|
+
* Retrieves real-time rates and transit times from FedEx.
|
|
2554
|
+
* * Maps to the 'POST /rate/v1/rates/quotes' endpoint. This method ensures
|
|
2555
|
+
* a fresh token is present before dispatching the request.
|
|
2556
|
+
* * @param requestBody - The raw FedEx 'RateAndTransitTimesRequest' payload.
|
|
2557
|
+
* @returns {Promise<any>} The raw FedEx 'RateAndTransitTimesResponse' object.
|
|
2558
|
+
* @throws {Error} If the API returns a terminal error or network failure occurs.
|
|
2559
|
+
*/
|
|
2560
|
+
getRates(requestBody: any): Promise<any>;
|
|
2561
|
+
}
|
|
2562
|
+
/**
|
|
2563
|
+
* Factory function to instantiate a new FedexRatesClient.
|
|
2564
|
+
* @param config - The FedEx configuration slice.
|
|
2565
|
+
* @returns An instance of FedexRatesClient.
|
|
2566
|
+
*/
|
|
2567
|
+
declare const createFedexRatesClient: (config: FedexConfig) => FedexRatesClient;
|
|
2568
|
+
|
|
2569
|
+
/**
|
|
2570
|
+
* USPS Rates Service Client
|
|
2571
|
+
* * A specialized wrapper for the USPS Domestic Prices v3 API.
|
|
2572
|
+
* This client manages the configuration and execution of rate lookups,
|
|
2573
|
+
* utilizing the generated OpenAPI SDK for standardized data fetching.
|
|
2574
|
+
*/
|
|
2575
|
+
|
|
2576
|
+
/**
|
|
2577
|
+
* Client for fetching real-time USPS domestic shipping rates.
|
|
2578
|
+
* @public
|
|
2579
|
+
*/
|
|
2580
|
+
declare class UspsRatesClient {
|
|
2581
|
+
private config;
|
|
2582
|
+
/**
|
|
2583
|
+
* Initializes the USPS Rates Client with provided configuration.
|
|
2584
|
+
* @param {UspsConfig} config - USPS-specific credentials and environment settings.
|
|
2585
|
+
*/
|
|
2586
|
+
constructor(config: UspsConfig);
|
|
2587
|
+
/**
|
|
2588
|
+
* Synchronizes the OpenAPI configuration singleton with the library's
|
|
2589
|
+
* global client factory settings.
|
|
2590
|
+
* @returns {Promise<void>}
|
|
2591
|
+
*/
|
|
2592
|
+
init(): Promise<void>;
|
|
2593
|
+
/**
|
|
2594
|
+
* Queries the USPS API for available services and prices based on
|
|
2595
|
+
* package weight, dimensions, and destination.
|
|
2596
|
+
*
|
|
2597
|
+
* * Executes against the /base-rates/search endpoint.
|
|
2598
|
+
*
|
|
2599
|
+
* @param {any} requestBody - The search parameters (BaseRatesQuery schema).
|
|
2600
|
+
* @returns {Promise<any>} A collection of available shipping rates and service levels.
|
|
2601
|
+
* @throws {Error} If the API request fails or the configuration is invalid.
|
|
2602
|
+
*/
|
|
2603
|
+
getRates(requestBody: any): Promise<any>;
|
|
2604
|
+
}
|
|
2605
|
+
/**
|
|
2606
|
+
* Factory function to create a new UspsRatesClient instance.
|
|
2607
|
+
*/
|
|
2608
|
+
declare const createUspsRatesClient: (config: UspsConfig) => UspsRatesClient;
|
|
2609
|
+
|
|
2610
|
+
/**
|
|
2611
|
+
* UPS Rating Service Client
|
|
2612
|
+
* * Interacts with the generated RatingService to fetch shipping quotes.
|
|
2613
|
+
*/
|
|
2614
|
+
|
|
2615
|
+
declare class UpsRatingClient {
|
|
2616
|
+
private config;
|
|
2617
|
+
private tokenManager;
|
|
2618
|
+
private ratingService;
|
|
2619
|
+
/**
|
|
2620
|
+
* Initializes the UPS Rating Client and its internal service instance.
|
|
2621
|
+
* * @param {UpsConfig} config - UPS-specific configuration.
|
|
2622
|
+
*/
|
|
2623
|
+
constructor(config: UpsConfig);
|
|
2624
|
+
/**
|
|
2625
|
+
* Fetches available shipping rates.
|
|
2626
|
+
* * @param {RATERequestWrapper} payload - The UPS-formatted request body.
|
|
2627
|
+
* @returns {Promise<any>} The raw UPS RATEResponseWrapper.
|
|
2628
|
+
*/
|
|
2629
|
+
getRates(payload: RATERequestWrapper): Promise<any>;
|
|
2630
|
+
}
|
|
2631
|
+
declare const createUpsRatesClient: (config: UpsConfig) => UpsRatingClient;
|
|
2632
|
+
|
|
2633
|
+
/**
|
|
2634
|
+
* Shipstack Shipping Manager
|
|
2635
|
+
* * High-level orchestrator for cross-carrier operations.
|
|
2636
|
+
* * This class provides the primary interface for e-commerce checkout logic,
|
|
2637
|
+
* such as comparing and ranking rates across all configured carriers.
|
|
2638
|
+
* * @module Core/ShippingManager
|
|
2639
|
+
*/
|
|
2640
|
+
|
|
2641
|
+
/**
|
|
2642
|
+
* Core manager for multi-carrier shipping operations.
|
|
2643
|
+
* @public
|
|
2644
|
+
*/
|
|
2645
|
+
declare class ShippingManager {
|
|
2646
|
+
private config;
|
|
2647
|
+
/**
|
|
2648
|
+
* Initializes the Shipping Manager with a specific configuration instance.
|
|
2649
|
+
* @param {ShippingConfig} config - The global library configuration.
|
|
2650
|
+
*/
|
|
2651
|
+
constructor(config: ShippingConfig);
|
|
2652
|
+
/**
|
|
2653
|
+
* Validates a physical address against a specific carrier.
|
|
2654
|
+
* @param {AddressValidationRequest} req - The address validation payload.
|
|
2655
|
+
*/
|
|
2656
|
+
validateAddress(req: AddressValidationRequest): Promise<AddressValidationResult>;
|
|
2657
|
+
/**
|
|
2658
|
+
* Retrieves tracking updates for a shipment.
|
|
2659
|
+
* @param {string | string[]} trackingNumbers - Identifiers for the packages.
|
|
2660
|
+
* @param {"usps" | "fedex" | "ups"} carrier - The target carrier.
|
|
2661
|
+
*/
|
|
2662
|
+
track(trackingNumbers: string | string[], carrier: "usps" | "fedex" | "ups"): Promise<NormalizedTracking[]>;
|
|
2663
|
+
/**
|
|
2664
|
+
* Fetches, flattens, and ranks rates from enabled carriers.
|
|
2665
|
+
* * Executes carrier requests in parallel and identifies value-added options.
|
|
2666
|
+
* * @param req - The standardized shipment details, excluding the carrier.
|
|
2667
|
+
* @param {Array<"usps" | "fedex" | "ups">} carriers - List of carriers to query.
|
|
2668
|
+
* @returns {Promise<NormalizedRate[]>} A sorted list of rates by cost (ascending).
|
|
2669
|
+
*/
|
|
2670
|
+
getRankedRates(req: Omit<RateRequest$1, "carrier">, carriers: ("usps" | "fedex" | "ups")[]): Promise<NormalizedRate[]>;
|
|
2671
|
+
}
|
|
2672
|
+
|
|
2673
|
+
/**
|
|
2674
|
+
* Shipstack: The Universal Shipping SDK
|
|
2675
|
+
* * Primary entry point for the Shipstack library.
|
|
2676
|
+
* Provides a stateful 'ShippingClient', the advanced 'ShippingManager',
|
|
2677
|
+
* and stateless functional exports for serverless integrations.
|
|
2678
|
+
* * @module Shipstack
|
|
2679
|
+
*/
|
|
2680
|
+
|
|
2681
|
+
/**
|
|
2682
|
+
* 1. CLASS-BASED API (The SDK Pattern)
|
|
2683
|
+
* * Ideal for applications where configuration is initialized once.
|
|
2684
|
+
* @category Core
|
|
2685
|
+
*/
|
|
2686
|
+
declare class ShippingClient {
|
|
2687
|
+
private config;
|
|
2688
|
+
/**
|
|
2689
|
+
* Initializes the Shipstack client with carrier credentials.
|
|
2690
|
+
* @param {ShippingConfig} config - The global library configuration.
|
|
2691
|
+
*/
|
|
2692
|
+
constructor(config: ShippingConfig);
|
|
2693
|
+
/**
|
|
2694
|
+
* Retrieves all available shipping rates across configured carriers.
|
|
2695
|
+
*/
|
|
2696
|
+
getRates(request: RateRequest$1): Promise<NormalizedRate[]>;
|
|
2697
|
+
/**
|
|
2698
|
+
* Validates and normalizes a physical address using a specified carrier.
|
|
2699
|
+
*/
|
|
2700
|
+
validateAddress(request: AddressValidationRequest): Promise<AddressValidationResult>;
|
|
2701
|
+
/**
|
|
2702
|
+
* Standardized tracking for one or more packages.
|
|
2703
|
+
* @param {string | string[]} trackingNumbers - Identifiers for the packages.
|
|
2704
|
+
* @param {"usps" | "fedex" | "ups"} carrier - The target carrier.
|
|
2705
|
+
*/
|
|
2706
|
+
track(trackingNumbers: string | string[], carrier: "usps" | "fedex" | "ups"): Promise<NormalizedTracking[]>;
|
|
2707
|
+
/**
|
|
2708
|
+
* Identifies the single cheapest shipping option.
|
|
2709
|
+
*/
|
|
2710
|
+
getBestValue(request: RateRequest$1): Promise<NormalizedRate | null>;
|
|
2711
|
+
/**
|
|
2712
|
+
* Identifies the service with the shortest transit time.
|
|
2713
|
+
*/
|
|
2714
|
+
getFastest(request: RateRequest$1): Promise<NormalizedRate | null>;
|
|
2715
|
+
/**
|
|
2716
|
+
* Static utility to predict the carrier based on tracking number patterns.
|
|
2717
|
+
*/
|
|
2718
|
+
static predict(trackingNumber: string): "usps" | "fedex" | "ups" | "unknown";
|
|
2719
|
+
/**
|
|
2720
|
+
* Builds a staged shipment payload for the specified carrier without purchasing a label.
|
|
2721
|
+
*/
|
|
2722
|
+
buildShipment(request: ShipmentRequest): Promise<StagedShipment>;
|
|
2723
|
+
/**
|
|
2724
|
+
* Creates a shipping label and returns a normalized shipment object.
|
|
2725
|
+
*/
|
|
2726
|
+
createShipment(request: ShipmentRequest): Promise<NormalizedShipment>;
|
|
2727
|
+
}
|
|
2728
|
+
/**
|
|
2729
|
+
* 2. FUNCTIONAL API (Direct Exports)
|
|
2730
|
+
* * Stateless versions for dynamic configuration or tree-shaking.
|
|
2731
|
+
*/
|
|
2732
|
+
declare const getRates: typeof getRates$1;
|
|
2733
|
+
declare const validateAddress: typeof validateAddress$1;
|
|
2734
|
+
declare const trackShipment: typeof trackShipment$1;
|
|
2735
|
+
declare const getBestValueRate: typeof getBestValueRate$1;
|
|
2736
|
+
declare const getFastestService: typeof getFastestService$1;
|
|
2737
|
+
declare const predictCarrier: typeof predictCarrier$1;
|
|
2738
|
+
declare const buildShipment: typeof buildShipment$1;
|
|
2739
|
+
declare const createShipment: typeof createShipment$1;
|
|
2740
|
+
|
|
2741
|
+
export { type AddressClassification, type AddressValidationRequest, type AddressValidationResult, type CustomsDeclaration, type FedexConfig, type NormalizedAddress, type NormalizedRate, type NormalizedShipment, type NormalizedTracking, type NormalizedTrackingEvent, type RateRequest$1 as RateRequest, type ShipmentRequest, ShippingClient, type ShippingConfig, ShippingManager, ShipstackError, type StagedShipment, ThrottlingError, type UpsConfig, type UspsConfig, buildFedexRateRequest, buildShipment, buildUpsRateRequest, buildUspsRateRequest, createFedexRatesClient, createShipment, createUpsRatesClient, createUspsRatesClient, getBestValueRate, getEnabledCarriers, getEnvironment, getFastestService, getFedexConfig, getRates, getUpsConfig, getUspsConfig, isShipstackError, isThrottlingError, predictCarrier, setShipstackConfig, trackShipment, validateAddress };
|