@oway/sdk 0.1.0 → 0.1.2
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/README.md +3 -3
- package/dist/index.d.mts +1058 -230
- package/dist/index.d.ts +1058 -230
- package/dist/index.js +12 -6
- package/dist/index.mjs +12 -6
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,114 +1,3 @@
|
|
|
1
|
-
interface OwayConfig {
|
|
2
|
-
/**
|
|
3
|
-
* M2M Client ID (REQUIRED for all integrations)
|
|
4
|
-
* Provided by Oway Sales Engineering team
|
|
5
|
-
*/
|
|
6
|
-
clientId: string;
|
|
7
|
-
/**
|
|
8
|
-
* M2M Client Secret (REQUIRED for all integrations)
|
|
9
|
-
* Provided by Oway Sales Engineering team
|
|
10
|
-
*/
|
|
11
|
-
clientSecret: string;
|
|
12
|
-
/**
|
|
13
|
-
* Default company API key (optional)
|
|
14
|
-
*
|
|
15
|
-
* Single-company: Set this to your company's API key
|
|
16
|
-
* Multi-company: Omit this and provide per-request
|
|
17
|
-
*
|
|
18
|
-
* Get from: https://app.oway.io/settings/api
|
|
19
|
-
*/
|
|
20
|
-
apiKey?: string;
|
|
21
|
-
/**
|
|
22
|
-
* Base URL for the Oway API
|
|
23
|
-
* @default "https://rest-api.sandbox.oway.io"
|
|
24
|
-
*/
|
|
25
|
-
baseUrl?: string;
|
|
26
|
-
/**
|
|
27
|
-
* Token endpoint for authentication
|
|
28
|
-
* @default "https://rest-api.sandbox.oway.io/v1/auth/token"
|
|
29
|
-
*/
|
|
30
|
-
tokenUrl?: string;
|
|
31
|
-
/**
|
|
32
|
-
* Maximum number of retry attempts for failed requests
|
|
33
|
-
* @default 3
|
|
34
|
-
*/
|
|
35
|
-
maxRetries?: number;
|
|
36
|
-
/**
|
|
37
|
-
* Timeout in milliseconds for API requests
|
|
38
|
-
* @default 30000
|
|
39
|
-
*/
|
|
40
|
-
timeout?: number;
|
|
41
|
-
/**
|
|
42
|
-
* Enable debug logging (logs sanitized request/response metadata)
|
|
43
|
-
* @default false
|
|
44
|
-
*/
|
|
45
|
-
debug?: boolean;
|
|
46
|
-
/**
|
|
47
|
-
* Custom logger implementation
|
|
48
|
-
*/
|
|
49
|
-
logger?: {
|
|
50
|
-
debug: (msg: string, meta?: Record<string, any>) => void;
|
|
51
|
-
info: (msg: string, meta?: Record<string, any>) => void;
|
|
52
|
-
warn: (msg: string, meta?: Record<string, any>) => void;
|
|
53
|
-
error: (msg: string, meta?: Record<string, any>) => void;
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
declare class OwayError extends Error {
|
|
57
|
-
code?: string | undefined;
|
|
58
|
-
statusCode?: number | undefined;
|
|
59
|
-
requestId?: string | undefined;
|
|
60
|
-
constructor(message: string, code?: string | undefined, statusCode?: number | undefined, requestId?: string | undefined);
|
|
61
|
-
/**
|
|
62
|
-
* Determines if this error represents a transient failure that should be retried
|
|
63
|
-
*/
|
|
64
|
-
isRetryable(): boolean;
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* HTTP client for making authenticated requests to the Oway API
|
|
68
|
-
*/
|
|
69
|
-
declare class HttpClient {
|
|
70
|
-
private config;
|
|
71
|
-
private accessToken;
|
|
72
|
-
private tokenExpiry;
|
|
73
|
-
private tokenRefreshPromise;
|
|
74
|
-
constructor(config: OwayConfig);
|
|
75
|
-
/**
|
|
76
|
-
* Internal logging with sanitization
|
|
77
|
-
*/
|
|
78
|
-
private log;
|
|
79
|
-
/**
|
|
80
|
-
* Sanitize objects for logging - remove sensitive fields
|
|
81
|
-
*/
|
|
82
|
-
private sanitizeForLogging;
|
|
83
|
-
/**
|
|
84
|
-
* Get or refresh the access token using the API key
|
|
85
|
-
* Handles concurrent requests by queuing them behind a single refresh
|
|
86
|
-
*/
|
|
87
|
-
private getAccessToken;
|
|
88
|
-
/**
|
|
89
|
-
* Perform the actual token refresh using M2M credentials
|
|
90
|
-
*/
|
|
91
|
-
private refreshToken;
|
|
92
|
-
/**
|
|
93
|
-
* Generate a unique request ID
|
|
94
|
-
*/
|
|
95
|
-
private generateRequestId;
|
|
96
|
-
/**
|
|
97
|
-
* Make an authenticated request to the Oway API
|
|
98
|
-
*/
|
|
99
|
-
request<T>(method: string, path: string, options?: {
|
|
100
|
-
query?: Record<string, string | number | boolean>;
|
|
101
|
-
body?: unknown;
|
|
102
|
-
headers?: Record<string, string>;
|
|
103
|
-
requestId?: string;
|
|
104
|
-
companyApiKey?: string;
|
|
105
|
-
}): Promise<T>;
|
|
106
|
-
get<T>(path: string, query?: Record<string, string | number | boolean>, companyApiKey?: string): Promise<T>;
|
|
107
|
-
post<T>(path: string, body?: unknown, companyApiKey?: string): Promise<T>;
|
|
108
|
-
put<T>(path: string, body?: unknown, companyApiKey?: string): Promise<T>;
|
|
109
|
-
delete<T>(path: string, companyApiKey?: string): Promise<T>;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
1
|
/**
|
|
113
2
|
* This file was auto-generated by openapi-typescript.
|
|
114
3
|
* Do not make direct changes to the file.
|
|
@@ -154,15 +43,15 @@ interface paths {
|
|
|
154
43
|
* - `palletCount` - Must be at least 1
|
|
155
44
|
* - `poundsWeight` - Must be between 1 and 2,500 lbs per pallet
|
|
156
45
|
* - `palletDimensions` - Must be valid dimensions within limits (subject to change, these are configurable):
|
|
157
|
-
* - Standard: max
|
|
158
|
-
* - Oversized maximum:
|
|
159
|
-
* - With liftgate: max
|
|
46
|
+
* - Standard: max 60x52x94 inches (LxWxH) - pallets exceeding these are charged as oversized
|
|
47
|
+
* - Oversized maximum: 95x95x96 inches - no pallet can exceed this
|
|
48
|
+
* - With liftgate: max 62x62x94 inches
|
|
160
49
|
*
|
|
161
50
|
* *Component Totals:*
|
|
162
51
|
* - Sum of component `palletCount` must equal order `totalPalletCount`
|
|
163
52
|
* - Sum of component `poundsWeight` must equal order `totalPoundsWeight`
|
|
164
53
|
*/
|
|
165
|
-
put: operations["
|
|
54
|
+
put: operations["confirmShipment"];
|
|
166
55
|
post?: never;
|
|
167
56
|
delete?: never;
|
|
168
57
|
options?: never;
|
|
@@ -182,7 +71,7 @@ interface paths {
|
|
|
182
71
|
* Cancel a shipment by order number
|
|
183
72
|
* @description Cancels an existing shipment using its order number (PRO number). Shipments can only be cancelled when they are in a cancellable state (e.g., before pickup).
|
|
184
73
|
*/
|
|
185
|
-
put: operations["
|
|
74
|
+
put: operations["cancelShipment"];
|
|
186
75
|
post?: never;
|
|
187
76
|
delete?: never;
|
|
188
77
|
options?: never;
|
|
@@ -240,6 +129,77 @@ interface paths {
|
|
|
240
129
|
patch?: never;
|
|
241
130
|
trace?: never;
|
|
242
131
|
};
|
|
132
|
+
"/v1/carrier/{carrierId}/trips": {
|
|
133
|
+
parameters: {
|
|
134
|
+
query?: never;
|
|
135
|
+
header?: never;
|
|
136
|
+
path?: never;
|
|
137
|
+
cookie?: never;
|
|
138
|
+
};
|
|
139
|
+
get?: never;
|
|
140
|
+
put?: never;
|
|
141
|
+
/**
|
|
142
|
+
* Submit trip data
|
|
143
|
+
* @description Submit trip data for carrier vehicles. Each trip must include vehicle ID, trip number, and legs with start/end coordinates and arrival windows.
|
|
144
|
+
*/
|
|
145
|
+
post: operations["addTrips"];
|
|
146
|
+
delete?: never;
|
|
147
|
+
options?: never;
|
|
148
|
+
head?: never;
|
|
149
|
+
patch?: never;
|
|
150
|
+
trace?: never;
|
|
151
|
+
};
|
|
152
|
+
"/v1/carrier/{carrierId}/gps-data": {
|
|
153
|
+
parameters: {
|
|
154
|
+
query?: never;
|
|
155
|
+
header?: never;
|
|
156
|
+
path?: never;
|
|
157
|
+
cookie?: never;
|
|
158
|
+
};
|
|
159
|
+
get?: never;
|
|
160
|
+
put?: never;
|
|
161
|
+
/**
|
|
162
|
+
* Submit GPS data
|
|
163
|
+
* @description Submit GPS location data for carrier vehicles. Each data point must include vehicle ID, coordinates, timestamp, heading, and speed.
|
|
164
|
+
*/
|
|
165
|
+
post: operations["addGpsData"];
|
|
166
|
+
delete?: never;
|
|
167
|
+
options?: never;
|
|
168
|
+
head?: never;
|
|
169
|
+
patch?: never;
|
|
170
|
+
trace?: never;
|
|
171
|
+
};
|
|
172
|
+
"/v1/auth/token": {
|
|
173
|
+
parameters: {
|
|
174
|
+
query?: never;
|
|
175
|
+
header?: never;
|
|
176
|
+
path?: never;
|
|
177
|
+
cookie?: never;
|
|
178
|
+
};
|
|
179
|
+
get?: never;
|
|
180
|
+
put?: never;
|
|
181
|
+
/**
|
|
182
|
+
* Obtain access token
|
|
183
|
+
* @description Exchange client credentials for an access token.
|
|
184
|
+
*
|
|
185
|
+
* The returned token includes scopes that determine API access:
|
|
186
|
+
* - `shipper` scope grants access to `/v1/shipper/**` endpoints
|
|
187
|
+
* - `carrier` scope grants access to `/v1/carrier/**` endpoints
|
|
188
|
+
* - Partners with both scopes can access both APIs with a single token
|
|
189
|
+
*
|
|
190
|
+
* The returned token should be included in subsequent API requests as a Bearer token
|
|
191
|
+
* in the authorization header: `authorization: Bearer {access_token}`
|
|
192
|
+
*
|
|
193
|
+
* Tokens are valid for the duration specified in `expires_in` (seconds).
|
|
194
|
+
* We recommend caching tokens and refreshing them before expiration.
|
|
195
|
+
*/
|
|
196
|
+
post: operations["getToken"];
|
|
197
|
+
delete?: never;
|
|
198
|
+
options?: never;
|
|
199
|
+
head?: never;
|
|
200
|
+
patch?: never;
|
|
201
|
+
trace?: never;
|
|
202
|
+
};
|
|
243
203
|
"/v1/shipper/shipment/{orderNumber}": {
|
|
244
204
|
parameters: {
|
|
245
205
|
query?: never;
|
|
@@ -251,7 +211,7 @@ interface paths {
|
|
|
251
211
|
* Get a shipment by order number
|
|
252
212
|
* @description Retrieves a shipment by its order number (PRO number). The order number is a 5-character alphanumeric code (e.g., ZKYQ5) that uniquely identifies the shipment.
|
|
253
213
|
*/
|
|
254
|
-
get: operations["
|
|
214
|
+
get: operations["getShipment"];
|
|
255
215
|
put?: never;
|
|
256
216
|
post?: never;
|
|
257
217
|
delete?: never;
|
|
@@ -271,7 +231,7 @@ interface paths {
|
|
|
271
231
|
* Track a shipment by order number
|
|
272
232
|
* @description Retrieves tracking information for a shipment by its order number (PRO number). Returns status and estimated/actual pickup and delivery dates.
|
|
273
233
|
*/
|
|
274
|
-
get: operations["
|
|
234
|
+
get: operations["trackShipment"];
|
|
275
235
|
put?: never;
|
|
276
236
|
post?: never;
|
|
277
237
|
delete?: never;
|
|
@@ -313,9 +273,9 @@ interface paths {
|
|
|
313
273
|
};
|
|
314
274
|
/**
|
|
315
275
|
* Get a shipment document by order number
|
|
316
|
-
* @description Retrieves a download link for a shipment document using the order number (PRO number). Supported document types: BILL_OF_LADING, INVOICE, SHIPPING_LABEL.
|
|
276
|
+
* @description Retrieves a download link for a shipment document using the order number (PRO number). Supported document types: BILL_OF_LADING, INVOICE, SHIPPING_LABEL, POD.
|
|
317
277
|
*/
|
|
318
|
-
get: operations["
|
|
278
|
+
get: operations["getDocument"];
|
|
319
279
|
put?: never;
|
|
320
280
|
post?: never;
|
|
321
281
|
delete?: never;
|
|
@@ -344,9 +304,78 @@ interface paths {
|
|
|
344
304
|
patch?: never;
|
|
345
305
|
trace?: never;
|
|
346
306
|
};
|
|
307
|
+
"/v1/carrier/{carrierId}": {
|
|
308
|
+
parameters: {
|
|
309
|
+
query?: never;
|
|
310
|
+
header?: never;
|
|
311
|
+
path?: never;
|
|
312
|
+
cookie?: never;
|
|
313
|
+
};
|
|
314
|
+
/**
|
|
315
|
+
* Get carrier API configuration
|
|
316
|
+
* @description Retrieves the API configuration for a carrier including company name, API version, and available endpoints.
|
|
317
|
+
*/
|
|
318
|
+
get: operations["getCarrierApiConfig"];
|
|
319
|
+
put?: never;
|
|
320
|
+
post?: never;
|
|
321
|
+
delete?: never;
|
|
322
|
+
options?: never;
|
|
323
|
+
head?: never;
|
|
324
|
+
patch?: never;
|
|
325
|
+
trace?: never;
|
|
326
|
+
};
|
|
327
|
+
"/v1/carrier/{carrierId}/jobs": {
|
|
328
|
+
parameters: {
|
|
329
|
+
query?: never;
|
|
330
|
+
header?: never;
|
|
331
|
+
path?: never;
|
|
332
|
+
cookie?: never;
|
|
333
|
+
};
|
|
334
|
+
/**
|
|
335
|
+
* Get carrier jobs
|
|
336
|
+
* @description Retrieves jobs (offers with order data) for a carrier. Filter by active status and time range.
|
|
337
|
+
*/
|
|
338
|
+
get: operations["getJobs"];
|
|
339
|
+
put?: never;
|
|
340
|
+
post?: never;
|
|
341
|
+
delete?: never;
|
|
342
|
+
options?: never;
|
|
343
|
+
head?: never;
|
|
344
|
+
patch?: never;
|
|
345
|
+
trace?: never;
|
|
346
|
+
};
|
|
347
347
|
}
|
|
348
348
|
interface components {
|
|
349
349
|
schemas: {
|
|
350
|
+
/** @description RFC 9457 Problem Details error response */
|
|
351
|
+
ProblemDetail: {
|
|
352
|
+
/**
|
|
353
|
+
* @description A URI reference that identifies the problem type
|
|
354
|
+
* @example https://api.oway.io/errors/location-not-serviceable
|
|
355
|
+
*/
|
|
356
|
+
type?: string;
|
|
357
|
+
/**
|
|
358
|
+
* @description A short, human-readable summary of the problem type
|
|
359
|
+
* @example Bad Request
|
|
360
|
+
*/
|
|
361
|
+
title?: string;
|
|
362
|
+
/**
|
|
363
|
+
* Format: int32
|
|
364
|
+
* @description The HTTP status code
|
|
365
|
+
* @example 400
|
|
366
|
+
*/
|
|
367
|
+
status?: number;
|
|
368
|
+
/**
|
|
369
|
+
* @description A human-readable explanation specific to this occurrence of the problem
|
|
370
|
+
* @example pickupAddress.zipCode must be a 5-digit ZIP code
|
|
371
|
+
*/
|
|
372
|
+
detail?: string;
|
|
373
|
+
/**
|
|
374
|
+
* @description A machine-readable reason code for programmatic handling
|
|
375
|
+
* @example pickup_not_covered
|
|
376
|
+
*/
|
|
377
|
+
reason?: string;
|
|
378
|
+
};
|
|
350
379
|
/** @description Shipment/Order details */
|
|
351
380
|
Shipment: {
|
|
352
381
|
/**
|
|
@@ -370,7 +399,7 @@ interface components {
|
|
|
370
399
|
*/
|
|
371
400
|
orderNumber?: string;
|
|
372
401
|
/**
|
|
373
|
-
* @description Current status
|
|
402
|
+
* @description Current shipment status in the order lifecycle
|
|
374
403
|
* @example CONFIRMED
|
|
375
404
|
* @enum {string}
|
|
376
405
|
*/
|
|
@@ -470,7 +499,7 @@ interface components {
|
|
|
470
499
|
/** @description Request to create a new shipment */
|
|
471
500
|
CreateShipmentRequest: {
|
|
472
501
|
/**
|
|
473
|
-
* @description Optional ID of a previously generated quote.
|
|
502
|
+
* @description Optional ID of a previously generated quote.
|
|
474
503
|
* @example 507f1f77bcf86cd799439013
|
|
475
504
|
*/
|
|
476
505
|
quoteId?: string;
|
|
@@ -506,36 +535,22 @@ interface components {
|
|
|
506
535
|
*/
|
|
507
536
|
requiredDeliveryBy?: string;
|
|
508
537
|
};
|
|
509
|
-
/**
|
|
510
|
-
* @description Individual cargo component in a shipment.
|
|
511
|
-
*
|
|
512
|
-
* **Validation Rules:**
|
|
513
|
-
* - Total weight across all components must equal order totalPoundsWeight
|
|
514
|
-
* - Total pallet count across all components must equal order totalPalletCount
|
|
515
|
-
* - Weight must be between 1 and 2,500 lbs per pallet
|
|
516
|
-
* - Dimensions must be within limits (see palletDimensions field)
|
|
517
|
-
*/
|
|
538
|
+
/** @description A cargo component (pallet group) in a shipment */
|
|
518
539
|
OrderComponent: {
|
|
519
540
|
/**
|
|
520
541
|
* Format: int32
|
|
521
|
-
* @description Number of pallets
|
|
542
|
+
* @description Number of pallets in this component
|
|
522
543
|
* @example 2
|
|
523
544
|
*/
|
|
524
545
|
palletCount: number;
|
|
525
546
|
/**
|
|
526
|
-
* Format:
|
|
527
|
-
* @description
|
|
528
|
-
* @example
|
|
547
|
+
* Format: int32
|
|
548
|
+
* @description Weight per pallet in pounds
|
|
549
|
+
* @example 500
|
|
529
550
|
*/
|
|
530
551
|
poundsWeight: number;
|
|
531
552
|
/**
|
|
532
|
-
* @description Pallet dimensions
|
|
533
|
-
*
|
|
534
|
-
* **Dimension Limits:**
|
|
535
|
-
* - Standard shipments: max 95×95×94 inches
|
|
536
|
-
* - With liftgate accessorial: max 62×62×94 inches
|
|
537
|
-
* - Oversize rule: Both length AND width cannot exceed 60 inches
|
|
538
|
-
* - Minimum: 1×1×1 inches
|
|
553
|
+
* @description Pallet dimensions as [height, length, width] in inches
|
|
539
554
|
* @example [
|
|
540
555
|
* 48,
|
|
541
556
|
* 40,
|
|
@@ -548,14 +563,20 @@ interface components {
|
|
|
548
563
|
QuoteRequest: {
|
|
549
564
|
pickupAddress: components["schemas"]["Address"];
|
|
550
565
|
deliveryAddress: components["schemas"]["Address"];
|
|
551
|
-
/** @description List of pallets or freight pieces.
|
|
566
|
+
/** @description List of pallets or freight pieces. */
|
|
552
567
|
orderComponents: components["schemas"]["OrderComponent"][];
|
|
568
|
+
/**
|
|
569
|
+
* Format: date-time
|
|
570
|
+
* @description Required pickup date (ISO 8601).
|
|
571
|
+
* @example 2026-04-01T08:00:00Z
|
|
572
|
+
*/
|
|
573
|
+
requiredPickupDate?: string;
|
|
553
574
|
};
|
|
554
|
-
/** @description Response containing quote
|
|
575
|
+
/** @description Response containing a shipping quote */
|
|
555
576
|
QuoteResponse: {
|
|
556
577
|
/**
|
|
557
|
-
* @description Unique identifier
|
|
558
|
-
* @example
|
|
578
|
+
* @description Unique quote identifier
|
|
579
|
+
* @example 507f1f77bcf86cd799439013
|
|
559
580
|
*/
|
|
560
581
|
id?: string;
|
|
561
582
|
/**
|
|
@@ -566,11 +587,122 @@ interface components {
|
|
|
566
587
|
quotedPriceInCents?: number;
|
|
567
588
|
/**
|
|
568
589
|
* Format: date-time
|
|
569
|
-
* @description
|
|
570
|
-
* @example 2024-12-
|
|
590
|
+
* @description When this quote expires (ISO 8601 format). Quotes are valid for 2 days.
|
|
591
|
+
* @example 2024-12-20T15:30:00Z
|
|
571
592
|
*/
|
|
572
593
|
quoteExpirationTime?: string;
|
|
573
594
|
};
|
|
595
|
+
TripLeg: {
|
|
596
|
+
/** Format: double */
|
|
597
|
+
startLat?: number;
|
|
598
|
+
/** Format: double */
|
|
599
|
+
startLong?: number;
|
|
600
|
+
/** Format: date-time */
|
|
601
|
+
startTime?: string;
|
|
602
|
+
/** Format: double */
|
|
603
|
+
endLat?: number;
|
|
604
|
+
/** Format: double */
|
|
605
|
+
endLong?: number;
|
|
606
|
+
/** Format: date-time */
|
|
607
|
+
arrivalWindowStart?: string;
|
|
608
|
+
/** Format: date-time */
|
|
609
|
+
arrivalWindowEnd?: string;
|
|
610
|
+
availableForOffers?: boolean;
|
|
611
|
+
/** Format: int32 */
|
|
612
|
+
estDriveTimeMinutes?: number;
|
|
613
|
+
/** Format: int32 */
|
|
614
|
+
stopNumber?: number;
|
|
615
|
+
};
|
|
616
|
+
TripRequest: {
|
|
617
|
+
id?: string;
|
|
618
|
+
carrierId?: string;
|
|
619
|
+
vehicleId?: string;
|
|
620
|
+
tripNo?: string;
|
|
621
|
+
legs?: components["schemas"]["TripLeg"][];
|
|
622
|
+
};
|
|
623
|
+
/** @description GPS location data point for a vehicle */
|
|
624
|
+
GpsData: {
|
|
625
|
+
/**
|
|
626
|
+
* @description Unique identifier for the vehicle
|
|
627
|
+
* @example TRUCK-001
|
|
628
|
+
*/
|
|
629
|
+
vehicleId: string;
|
|
630
|
+
/**
|
|
631
|
+
* Format: date-time
|
|
632
|
+
* @description Timestamp of the GPS reading (ISO 8601 format). Must not be in the future.
|
|
633
|
+
* @example 2025-02-20T17:33:15Z
|
|
634
|
+
*/
|
|
635
|
+
timestamp: string;
|
|
636
|
+
/**
|
|
637
|
+
* Format: double
|
|
638
|
+
* @description Latitude coordinate
|
|
639
|
+
* @example 33.787363
|
|
640
|
+
*/
|
|
641
|
+
latitude: number;
|
|
642
|
+
/**
|
|
643
|
+
* Format: double
|
|
644
|
+
* @description Longitude coordinate
|
|
645
|
+
* @example -118.163715
|
|
646
|
+
*/
|
|
647
|
+
longitude: number;
|
|
648
|
+
/**
|
|
649
|
+
* Format: int32
|
|
650
|
+
* @description Heading in degrees (0-359, where 0 is North)
|
|
651
|
+
* @example 270
|
|
652
|
+
*/
|
|
653
|
+
heading: number;
|
|
654
|
+
/**
|
|
655
|
+
* Format: int32
|
|
656
|
+
* @description Speed in km/h
|
|
657
|
+
* @example 65
|
|
658
|
+
*/
|
|
659
|
+
speed: number;
|
|
660
|
+
};
|
|
661
|
+
/** @description Token request containing client credentials */
|
|
662
|
+
TokenRequest: {
|
|
663
|
+
/**
|
|
664
|
+
* @description Client ID provided by Oway
|
|
665
|
+
* @example abc123def456
|
|
666
|
+
*/
|
|
667
|
+
clientId: string;
|
|
668
|
+
/**
|
|
669
|
+
* @description Client secret provided by Oway
|
|
670
|
+
* @example secret_xyz789
|
|
671
|
+
*/
|
|
672
|
+
clientSecret: string;
|
|
673
|
+
};
|
|
674
|
+
/** @description Successful token response */
|
|
675
|
+
TokenResponse: {
|
|
676
|
+
/**
|
|
677
|
+
* @description The access token to use for API requests
|
|
678
|
+
* @example eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...
|
|
679
|
+
*/
|
|
680
|
+
accessToken?: string;
|
|
681
|
+
/**
|
|
682
|
+
* @description Token type (always 'Bearer')
|
|
683
|
+
* @example Bearer
|
|
684
|
+
*/
|
|
685
|
+
tokenType?: string;
|
|
686
|
+
/**
|
|
687
|
+
* Format: int32
|
|
688
|
+
* @description Token validity in seconds
|
|
689
|
+
* @example 86400
|
|
690
|
+
*/
|
|
691
|
+
expiresIn?: number;
|
|
692
|
+
};
|
|
693
|
+
/** @description Error response for token requests */
|
|
694
|
+
TokenErrorResponse: {
|
|
695
|
+
/**
|
|
696
|
+
* @description Error code
|
|
697
|
+
* @example invalid_client
|
|
698
|
+
*/
|
|
699
|
+
error?: string;
|
|
700
|
+
/**
|
|
701
|
+
* @description Human-readable error description
|
|
702
|
+
* @example Invalid client credentials
|
|
703
|
+
*/
|
|
704
|
+
errorDescription?: string;
|
|
705
|
+
};
|
|
574
706
|
/** @description Shipment tracking information */
|
|
575
707
|
Tracking: {
|
|
576
708
|
/**
|
|
@@ -584,7 +716,7 @@ interface components {
|
|
|
584
716
|
*/
|
|
585
717
|
orderNumber?: string;
|
|
586
718
|
/**
|
|
587
|
-
* @description Current status
|
|
719
|
+
* @description Current shipment status in the order lifecycle
|
|
588
720
|
* @example PICKED_UP
|
|
589
721
|
* @enum {string}
|
|
590
722
|
*/
|
|
@@ -614,51 +746,51 @@ interface components {
|
|
|
614
746
|
*/
|
|
615
747
|
estimatedDeliveryDate?: string;
|
|
616
748
|
};
|
|
617
|
-
/** @description
|
|
749
|
+
/** @description A charge on an invoice */
|
|
618
750
|
InvoiceCharge: {
|
|
619
751
|
/**
|
|
620
|
-
* @description Type of charge
|
|
621
|
-
* @example
|
|
752
|
+
* @description Type of charge
|
|
753
|
+
* @example BASE_FREIGHT
|
|
622
754
|
*/
|
|
623
755
|
chargeType?: string;
|
|
624
756
|
/**
|
|
625
757
|
* @description Human-readable description of the charge
|
|
626
|
-
* @example
|
|
758
|
+
* @example Base Freight
|
|
627
759
|
*/
|
|
628
760
|
description?: string;
|
|
629
761
|
/**
|
|
630
762
|
* Format: int32
|
|
631
|
-
* @description
|
|
632
|
-
* @example
|
|
763
|
+
* @description Amount in cents (USD)
|
|
764
|
+
* @example 100000
|
|
633
765
|
*/
|
|
634
766
|
amountInCents?: number;
|
|
635
767
|
};
|
|
636
|
-
/** @description A line item on
|
|
768
|
+
/** @description A line item on an invoice */
|
|
637
769
|
InvoiceLineItem: {
|
|
638
770
|
/**
|
|
639
|
-
* @description Description of the
|
|
771
|
+
* @description Description of the item
|
|
640
772
|
* @example General Freight
|
|
641
773
|
*/
|
|
642
774
|
description?: string;
|
|
643
775
|
/**
|
|
644
|
-
* @description Freight class
|
|
645
|
-
* @example
|
|
776
|
+
* @description Freight class
|
|
777
|
+
* @example 85
|
|
646
778
|
*/
|
|
647
779
|
freightClass?: string;
|
|
648
780
|
/**
|
|
649
781
|
* Format: int32
|
|
650
782
|
* @description Weight in pounds
|
|
651
|
-
* @example
|
|
783
|
+
* @example 500
|
|
652
784
|
*/
|
|
653
785
|
weight?: number;
|
|
654
786
|
/**
|
|
655
787
|
* Format: int32
|
|
656
788
|
* @description Number of pieces/pallets
|
|
657
|
-
* @example
|
|
789
|
+
* @example 2
|
|
658
790
|
*/
|
|
659
791
|
quantity?: number;
|
|
660
792
|
/**
|
|
661
|
-
* @description
|
|
793
|
+
* @description Package type
|
|
662
794
|
* @example PLT
|
|
663
795
|
*/
|
|
664
796
|
packageType?: string;
|
|
@@ -666,18 +798,18 @@ interface components {
|
|
|
666
798
|
/** @description Itemized invoice for a delivered shipment */
|
|
667
799
|
InvoiceResponse: {
|
|
668
800
|
/**
|
|
669
|
-
* @description
|
|
670
|
-
* @example
|
|
801
|
+
* @description Order ID
|
|
802
|
+
* @example 67b6c5fcfbf1be6b24127646
|
|
671
803
|
*/
|
|
672
804
|
orderId?: string;
|
|
673
805
|
/**
|
|
674
|
-
* @description
|
|
806
|
+
* @description Human-readable order number (PRO number)
|
|
675
807
|
* @example ZKYQ5
|
|
676
808
|
*/
|
|
677
809
|
orderNumber?: string;
|
|
678
810
|
/**
|
|
679
811
|
* Format: date-time
|
|
680
|
-
* @description Invoice date (
|
|
812
|
+
* @description Invoice date (typically same as delivery date)
|
|
681
813
|
* @example 2024-12-20T15:30:00Z
|
|
682
814
|
*/
|
|
683
815
|
invoiceDate?: string;
|
|
@@ -729,11 +861,11 @@ interface components {
|
|
|
729
861
|
consignee?: components["schemas"]["Address"];
|
|
730
862
|
billTo?: components["schemas"]["Address"];
|
|
731
863
|
};
|
|
732
|
-
/** @description Response containing document download
|
|
864
|
+
/** @description Response containing a document download link */
|
|
733
865
|
DocumentResponse: {
|
|
734
866
|
/**
|
|
735
867
|
* @description Name of the document file
|
|
736
|
-
* @example
|
|
868
|
+
* @example bol-ZKYQ5.pdf
|
|
737
869
|
*/
|
|
738
870
|
filename?: string;
|
|
739
871
|
/**
|
|
@@ -742,11 +874,255 @@ interface components {
|
|
|
742
874
|
*/
|
|
743
875
|
fileType?: string;
|
|
744
876
|
/**
|
|
745
|
-
* @description Pre-signed
|
|
746
|
-
* @example https://s3.amazonaws.com
|
|
877
|
+
* @description Pre-signed download URL (valid for limited time)
|
|
878
|
+
* @example https://s3.amazonaws.com/...
|
|
747
879
|
*/
|
|
748
880
|
downloadLink?: string;
|
|
749
881
|
};
|
|
882
|
+
/** @description Carrier API configuration response */
|
|
883
|
+
CarrierApiConfigResponse: {
|
|
884
|
+
/**
|
|
885
|
+
* @description Name of the carrier company
|
|
886
|
+
* @example ABC Logistics
|
|
887
|
+
*/
|
|
888
|
+
companyName?: string;
|
|
889
|
+
/**
|
|
890
|
+
* @description Whether the API is enabled for this carrier
|
|
891
|
+
* @example true
|
|
892
|
+
*/
|
|
893
|
+
apiEnabled?: boolean;
|
|
894
|
+
/**
|
|
895
|
+
* @description Current API version
|
|
896
|
+
* @example v0.2.1
|
|
897
|
+
*/
|
|
898
|
+
apiVersion?: string;
|
|
899
|
+
/** @description List of available API endpoints for this carrier */
|
|
900
|
+
availableEndpoints?: string[];
|
|
901
|
+
};
|
|
902
|
+
AddressAccessorialSnapshot: {
|
|
903
|
+
liftgateRequired?: boolean;
|
|
904
|
+
limitedAccess?: boolean;
|
|
905
|
+
residential?: boolean;
|
|
906
|
+
appointmentRequired?: boolean;
|
|
907
|
+
/** @enum {string} */
|
|
908
|
+
callAheadRequired?: "HALF_HOUR" | "ONE_HOUR" | "TWO_HOURS" | "START_OF_DAY" | "DAY_BEFORE";
|
|
909
|
+
/** Format: date-time */
|
|
910
|
+
createdAt?: string;
|
|
911
|
+
/** Format: date-time */
|
|
912
|
+
updatedAt?: string;
|
|
913
|
+
values?: {
|
|
914
|
+
[key: string]: boolean;
|
|
915
|
+
};
|
|
916
|
+
};
|
|
917
|
+
AppliedPricingRule: {
|
|
918
|
+
ruleId?: string;
|
|
919
|
+
/** @enum {string} */
|
|
920
|
+
type?: "add_on_margin" | "max_margin_cap";
|
|
921
|
+
/** Format: double */
|
|
922
|
+
ruleValue?: number;
|
|
923
|
+
/** Format: int32 */
|
|
924
|
+
adjustmentInCents?: number;
|
|
925
|
+
};
|
|
926
|
+
ComponentDetails: {
|
|
927
|
+
/** Format: int32 */
|
|
928
|
+
palletCount?: number;
|
|
929
|
+
/** Format: float */
|
|
930
|
+
poundsWeight?: number;
|
|
931
|
+
palletDimensions?: number[];
|
|
932
|
+
freightClass?: string;
|
|
933
|
+
};
|
|
934
|
+
OfferWithOrderDataDTO: {
|
|
935
|
+
id?: string;
|
|
936
|
+
driverId?: string;
|
|
937
|
+
carrierId?: string;
|
|
938
|
+
/** Format: date-time */
|
|
939
|
+
deadline?: string;
|
|
940
|
+
orderId?: string;
|
|
941
|
+
state?: string;
|
|
942
|
+
/** Format: date-time */
|
|
943
|
+
decidedAt?: string;
|
|
944
|
+
/** Format: int32 */
|
|
945
|
+
centsPayOut?: number;
|
|
946
|
+
routeId?: string;
|
|
947
|
+
/** Format: double */
|
|
948
|
+
routeScore?: number;
|
|
949
|
+
/** @enum {string} */
|
|
950
|
+
matchingMethod?: "MANUAL" | "REGION" | "LANE" | "TERMINAL" | "TRIP";
|
|
951
|
+
pickupPin?: string;
|
|
952
|
+
deliveryPin?: string;
|
|
953
|
+
contacted?: boolean;
|
|
954
|
+
communicationExpired?: boolean;
|
|
955
|
+
/** Format: int32 */
|
|
956
|
+
carrierCounterOfferPriceInCents?: number;
|
|
957
|
+
emailThreadId?: string;
|
|
958
|
+
/** Format: int32 */
|
|
959
|
+
manualCentsPayoutOverride?: number;
|
|
960
|
+
additionalPayoutsInCents?: {
|
|
961
|
+
[key: string]: number;
|
|
962
|
+
};
|
|
963
|
+
/** Format: int32 */
|
|
964
|
+
totalPayoutInCents?: number;
|
|
965
|
+
realTimeVehicleLocationSnapshots?: components["schemas"]["VehicleLocationSnapshot"][];
|
|
966
|
+
tripFragmentMatches?: components["schemas"]["TripFragmentMatch"][];
|
|
967
|
+
/** Format: date-time */
|
|
968
|
+
createdAt?: string;
|
|
969
|
+
/** Format: date-time */
|
|
970
|
+
updatedAt?: string;
|
|
971
|
+
orderData?: components["schemas"]["Order"];
|
|
972
|
+
pickupAddressData?: components["schemas"]["Address"];
|
|
973
|
+
dropoffAddressData?: components["schemas"]["Address"];
|
|
974
|
+
orderAccessorials?: components["schemas"]["OrderAccessorials"];
|
|
975
|
+
};
|
|
976
|
+
Order: {
|
|
977
|
+
id?: string;
|
|
978
|
+
customerId?: string;
|
|
979
|
+
companyId?: string;
|
|
980
|
+
additionalCustomerIds?: string[];
|
|
981
|
+
apiOrder?: boolean;
|
|
982
|
+
orderNumber?: string;
|
|
983
|
+
pickupAddressId?: string;
|
|
984
|
+
deliveryAddressId?: string;
|
|
985
|
+
logisticsId?: string;
|
|
986
|
+
/** Format: int32 */
|
|
987
|
+
totalPalletCount?: number;
|
|
988
|
+
/** Format: float */
|
|
989
|
+
totalPoundsWeight?: number;
|
|
990
|
+
description?: string;
|
|
991
|
+
ltlCode?: string;
|
|
992
|
+
quote?: components["schemas"]["Quote"];
|
|
993
|
+
billingAddressId?: string;
|
|
994
|
+
paid?: boolean;
|
|
995
|
+
/** Format: int32 */
|
|
996
|
+
amountDue?: number;
|
|
997
|
+
/** Format: date-time */
|
|
998
|
+
paidAt?: string;
|
|
999
|
+
paidBy?: string;
|
|
1000
|
+
paymentMethod?: string;
|
|
1001
|
+
paymentNotes?: string;
|
|
1002
|
+
confirmed?: boolean;
|
|
1003
|
+
state?: string;
|
|
1004
|
+
/** @enum {string} */
|
|
1005
|
+
cancellationReason?: "unspecified" | "customer_cancellation" | "shipment_entry_error" | "low_coverage" | "unacceptable_margin" | "expired" | "carrier_exception" | "shipper_exception" | "tonu" | "chargeback_other";
|
|
1006
|
+
orderComponents?: components["schemas"]["ComponentDetails"][];
|
|
1007
|
+
poNumber?: string;
|
|
1008
|
+
refNumber?: string;
|
|
1009
|
+
emailThreadId?: string;
|
|
1010
|
+
/** Format: date-time */
|
|
1011
|
+
decidedAt?: string;
|
|
1012
|
+
/** Format: date-time */
|
|
1013
|
+
paymentDueAt?: string;
|
|
1014
|
+
/** Format: date-time */
|
|
1015
|
+
createdAt?: string;
|
|
1016
|
+
/** Format: date-time */
|
|
1017
|
+
updatedAt?: string;
|
|
1018
|
+
searchMatches?: components["schemas"]["SearchMatch"][];
|
|
1019
|
+
/** Format: double */
|
|
1020
|
+
avgPoundsPerCubicFoot?: number;
|
|
1021
|
+
/** Format: double */
|
|
1022
|
+
totalCubicFeet?: number;
|
|
1023
|
+
orderPreConfirmation?: boolean;
|
|
1024
|
+
/** Format: int32 */
|
|
1025
|
+
totalPriceInCents?: number;
|
|
1026
|
+
/** Format: int32 */
|
|
1027
|
+
totalPriceInCentsWithoutBrokerCharges?: number;
|
|
1028
|
+
};
|
|
1029
|
+
OrderAccessorials: {
|
|
1030
|
+
pickupAccessorials?: components["schemas"]["AddressAccessorialSnapshot"];
|
|
1031
|
+
deliveryAccessorials?: components["schemas"]["AddressAccessorialSnapshot"];
|
|
1032
|
+
hazmat?: boolean;
|
|
1033
|
+
reefer?: boolean;
|
|
1034
|
+
};
|
|
1035
|
+
Quote: {
|
|
1036
|
+
id?: string;
|
|
1037
|
+
customerId?: string;
|
|
1038
|
+
shipperId?: string;
|
|
1039
|
+
orderId?: string;
|
|
1040
|
+
pickupZip?: string;
|
|
1041
|
+
dropoffZip?: string;
|
|
1042
|
+
/** Format: int32 */
|
|
1043
|
+
numPallets?: number;
|
|
1044
|
+
/** Format: float */
|
|
1045
|
+
totalWeight?: number;
|
|
1046
|
+
/** Format: int32 */
|
|
1047
|
+
centsCharge?: number;
|
|
1048
|
+
/** Format: date-time */
|
|
1049
|
+
timeStamp?: string;
|
|
1050
|
+
exposePrice?: boolean;
|
|
1051
|
+
coverageDenialReason?: string;
|
|
1052
|
+
/** Format: int32 */
|
|
1053
|
+
suggestedCarrierPayoutCents?: number;
|
|
1054
|
+
/** Format: double */
|
|
1055
|
+
carrierProbability?: number;
|
|
1056
|
+
/** Format: double */
|
|
1057
|
+
shipperProbability?: number;
|
|
1058
|
+
/** Format: double */
|
|
1059
|
+
pickupScoreSurroundingNormalized?: number;
|
|
1060
|
+
/** Format: double */
|
|
1061
|
+
dropoffScoreSurroundingNormalized?: number;
|
|
1062
|
+
/** Format: double */
|
|
1063
|
+
originalPrice?: number;
|
|
1064
|
+
/** Format: double */
|
|
1065
|
+
miles?: number;
|
|
1066
|
+
additionalChargesInCents?: {
|
|
1067
|
+
[key: string]: number;
|
|
1068
|
+
};
|
|
1069
|
+
brokerChargesInCents?: {
|
|
1070
|
+
[key: string]: number;
|
|
1071
|
+
};
|
|
1072
|
+
/** Format: int32 */
|
|
1073
|
+
pricingRuleAdjustmentInCents?: number;
|
|
1074
|
+
appliedPricingRules?: components["schemas"]["AppliedPricingRule"][];
|
|
1075
|
+
/** Format: date-time */
|
|
1076
|
+
createdAt?: string;
|
|
1077
|
+
/** Format: date-time */
|
|
1078
|
+
updatedAt?: string;
|
|
1079
|
+
/** Format: int32 */
|
|
1080
|
+
totalCentsChargeWithBrokerCharges?: number;
|
|
1081
|
+
/** @enum {string} */
|
|
1082
|
+
status?: "open" | "display" | "price_locked" | "confirmed" | "rejected";
|
|
1083
|
+
/** @enum {string} */
|
|
1084
|
+
quoteSource?: "pricing_model" | "manual_entry" | "pricing_model_v2";
|
|
1085
|
+
};
|
|
1086
|
+
SearchMatch: {
|
|
1087
|
+
field?: string;
|
|
1088
|
+
value?: string;
|
|
1089
|
+
/** Format: int32 */
|
|
1090
|
+
startIndex?: number;
|
|
1091
|
+
/** Format: int32 */
|
|
1092
|
+
endIndex?: number;
|
|
1093
|
+
};
|
|
1094
|
+
TripDetour: {
|
|
1095
|
+
/** Format: int32 */
|
|
1096
|
+
totalDetourSeconds?: number;
|
|
1097
|
+
/** Format: int32 */
|
|
1098
|
+
pickupDetourSeconds?: number;
|
|
1099
|
+
/** Format: int32 */
|
|
1100
|
+
deliveryDetourSeconds?: number;
|
|
1101
|
+
};
|
|
1102
|
+
TripFragmentMatch: {
|
|
1103
|
+
tripId?: string;
|
|
1104
|
+
tripFragmentId?: string;
|
|
1105
|
+
vehicleId?: string;
|
|
1106
|
+
/** Format: int32 */
|
|
1107
|
+
pickupStopNumber?: number;
|
|
1108
|
+
/** Format: int32 */
|
|
1109
|
+
deliveryStopNumber?: number;
|
|
1110
|
+
tripDetour?: components["schemas"]["TripDetour"];
|
|
1111
|
+
};
|
|
1112
|
+
VehicleLocationSnapshot: {
|
|
1113
|
+
id?: string;
|
|
1114
|
+
vehicleId?: string;
|
|
1115
|
+
vehicleName?: string;
|
|
1116
|
+
location?: string;
|
|
1117
|
+
/** Format: int32 */
|
|
1118
|
+
heading?: number;
|
|
1119
|
+
/** Format: int32 */
|
|
1120
|
+
speed?: number;
|
|
1121
|
+
/** Format: date-time */
|
|
1122
|
+
lastUpdated?: string;
|
|
1123
|
+
/** Format: int32 */
|
|
1124
|
+
numHexesAwayFromPickup?: number;
|
|
1125
|
+
};
|
|
750
1126
|
};
|
|
751
1127
|
responses: never;
|
|
752
1128
|
parameters: never;
|
|
@@ -755,7 +1131,7 @@ interface components {
|
|
|
755
1131
|
pathItems: never;
|
|
756
1132
|
}
|
|
757
1133
|
interface operations {
|
|
758
|
-
|
|
1134
|
+
confirmShipment: {
|
|
759
1135
|
parameters: {
|
|
760
1136
|
query?: never;
|
|
761
1137
|
header?: never;
|
|
@@ -776,7 +1152,7 @@ interface operations {
|
|
|
776
1152
|
[name: string]: unknown;
|
|
777
1153
|
};
|
|
778
1154
|
content: {
|
|
779
|
-
"application/
|
|
1155
|
+
"application/json": components["schemas"]["Shipment"];
|
|
780
1156
|
};
|
|
781
1157
|
};
|
|
782
1158
|
/** @description Invalid request: orderNumber is required, order is not in INITIALIZED state, or is missing a quote */
|
|
@@ -785,7 +1161,7 @@ interface operations {
|
|
|
785
1161
|
[name: string]: unknown;
|
|
786
1162
|
};
|
|
787
1163
|
content: {
|
|
788
|
-
"application/
|
|
1164
|
+
"application/json": components["schemas"]["ProblemDetail"];
|
|
789
1165
|
};
|
|
790
1166
|
};
|
|
791
1167
|
/** @description Unauthorized: missing or invalid Bearer token (authentication failed) */
|
|
@@ -794,7 +1170,7 @@ interface operations {
|
|
|
794
1170
|
[name: string]: unknown;
|
|
795
1171
|
};
|
|
796
1172
|
content: {
|
|
797
|
-
"application/
|
|
1173
|
+
"application/json": components["schemas"]["ProblemDetail"];
|
|
798
1174
|
};
|
|
799
1175
|
};
|
|
800
1176
|
/** @description Forbidden: missing/invalid API key, or shipment does not belong to your company */
|
|
@@ -803,7 +1179,7 @@ interface operations {
|
|
|
803
1179
|
[name: string]: unknown;
|
|
804
1180
|
};
|
|
805
1181
|
content: {
|
|
806
|
-
"application/
|
|
1182
|
+
"application/json": components["schemas"]["ProblemDetail"];
|
|
807
1183
|
};
|
|
808
1184
|
};
|
|
809
1185
|
/** @description Shipment not found */
|
|
@@ -812,7 +1188,7 @@ interface operations {
|
|
|
812
1188
|
[name: string]: unknown;
|
|
813
1189
|
};
|
|
814
1190
|
content: {
|
|
815
|
-
"application/
|
|
1191
|
+
"application/json": components["schemas"]["ProblemDetail"];
|
|
816
1192
|
};
|
|
817
1193
|
};
|
|
818
1194
|
/** @description Internal server error */
|
|
@@ -821,12 +1197,12 @@ interface operations {
|
|
|
821
1197
|
[name: string]: unknown;
|
|
822
1198
|
};
|
|
823
1199
|
content: {
|
|
824
|
-
"application/
|
|
1200
|
+
"application/json": components["schemas"]["ProblemDetail"];
|
|
825
1201
|
};
|
|
826
1202
|
};
|
|
827
1203
|
};
|
|
828
1204
|
};
|
|
829
|
-
|
|
1205
|
+
cancelShipment: {
|
|
830
1206
|
parameters: {
|
|
831
1207
|
query?: never;
|
|
832
1208
|
header?: never;
|
|
@@ -847,7 +1223,7 @@ interface operations {
|
|
|
847
1223
|
[name: string]: unknown;
|
|
848
1224
|
};
|
|
849
1225
|
content: {
|
|
850
|
-
"application/
|
|
1226
|
+
"application/json": components["schemas"]["Shipment"];
|
|
851
1227
|
};
|
|
852
1228
|
};
|
|
853
1229
|
/** @description Invalid request: orderNumber is required, or order cannot be cancelled in its current state */
|
|
@@ -856,7 +1232,7 @@ interface operations {
|
|
|
856
1232
|
[name: string]: unknown;
|
|
857
1233
|
};
|
|
858
1234
|
content: {
|
|
859
|
-
"application/
|
|
1235
|
+
"application/json": components["schemas"]["ProblemDetail"];
|
|
860
1236
|
};
|
|
861
1237
|
};
|
|
862
1238
|
/** @description Unauthorized: missing or invalid Bearer token (authentication failed) */
|
|
@@ -865,7 +1241,7 @@ interface operations {
|
|
|
865
1241
|
[name: string]: unknown;
|
|
866
1242
|
};
|
|
867
1243
|
content: {
|
|
868
|
-
"application/
|
|
1244
|
+
"application/json": components["schemas"]["ProblemDetail"];
|
|
869
1245
|
};
|
|
870
1246
|
};
|
|
871
1247
|
/** @description Forbidden: missing/invalid API key, or shipment does not belong to your company */
|
|
@@ -874,7 +1250,7 @@ interface operations {
|
|
|
874
1250
|
[name: string]: unknown;
|
|
875
1251
|
};
|
|
876
1252
|
content: {
|
|
877
|
-
"application/
|
|
1253
|
+
"application/json": components["schemas"]["ProblemDetail"];
|
|
878
1254
|
};
|
|
879
1255
|
};
|
|
880
1256
|
/** @description Shipment not found */
|
|
@@ -883,7 +1259,7 @@ interface operations {
|
|
|
883
1259
|
[name: string]: unknown;
|
|
884
1260
|
};
|
|
885
1261
|
content: {
|
|
886
|
-
"application/
|
|
1262
|
+
"application/json": components["schemas"]["ProblemDetail"];
|
|
887
1263
|
};
|
|
888
1264
|
};
|
|
889
1265
|
/** @description Internal server error */
|
|
@@ -892,7 +1268,7 @@ interface operations {
|
|
|
892
1268
|
[name: string]: unknown;
|
|
893
1269
|
};
|
|
894
1270
|
content: {
|
|
895
|
-
"application/
|
|
1271
|
+
"application/json": components["schemas"]["ProblemDetail"];
|
|
896
1272
|
};
|
|
897
1273
|
};
|
|
898
1274
|
};
|
|
@@ -916,7 +1292,7 @@ interface operations {
|
|
|
916
1292
|
[name: string]: unknown;
|
|
917
1293
|
};
|
|
918
1294
|
content: {
|
|
919
|
-
"application/
|
|
1295
|
+
"application/json": components["schemas"]["Shipment"];
|
|
920
1296
|
};
|
|
921
1297
|
};
|
|
922
1298
|
/** @description Invalid request: validation error, quote mismatch, or expired quote */
|
|
@@ -925,7 +1301,7 @@ interface operations {
|
|
|
925
1301
|
[name: string]: unknown;
|
|
926
1302
|
};
|
|
927
1303
|
content: {
|
|
928
|
-
"application/
|
|
1304
|
+
"application/json": components["schemas"]["ProblemDetail"];
|
|
929
1305
|
};
|
|
930
1306
|
};
|
|
931
1307
|
/** @description Unauthorized: missing or invalid Bearer token (authentication failed) */
|
|
@@ -934,7 +1310,7 @@ interface operations {
|
|
|
934
1310
|
[name: string]: unknown;
|
|
935
1311
|
};
|
|
936
1312
|
content: {
|
|
937
|
-
"application/
|
|
1313
|
+
"application/json": components["schemas"]["ProblemDetail"];
|
|
938
1314
|
};
|
|
939
1315
|
};
|
|
940
1316
|
/** @description Forbidden: missing/invalid API key, user not in company, or quote not owned by company */
|
|
@@ -943,7 +1319,22 @@ interface operations {
|
|
|
943
1319
|
[name: string]: unknown;
|
|
944
1320
|
};
|
|
945
1321
|
content: {
|
|
946
|
-
"application/
|
|
1322
|
+
"application/json": components["schemas"]["ProblemDetail"];
|
|
1323
|
+
};
|
|
1324
|
+
};
|
|
1325
|
+
/**
|
|
1326
|
+
* @description Unprocessable Entity. Possible reasons:
|
|
1327
|
+
*
|
|
1328
|
+
* - **Location Not Serviceable** (`reason: no_coverage`) — the lane is not within Oway's active coverage area.
|
|
1329
|
+
* - **Request Not Permitted** (`reason: account_restriction`) — the requested truck type or accessorial is not enabled for your account. Contact your Oway representative to update your available options.
|
|
1330
|
+
* - **Daily Trip Limit Reached** (`reason: daily_trip_limit`) — your account has reached its maximum shipments for the requested pickup date. You can still place orders for other dates.
|
|
1331
|
+
*/
|
|
1332
|
+
422: {
|
|
1333
|
+
headers: {
|
|
1334
|
+
[name: string]: unknown;
|
|
1335
|
+
};
|
|
1336
|
+
content: {
|
|
1337
|
+
"application/json": components["schemas"]["ProblemDetail"];
|
|
947
1338
|
};
|
|
948
1339
|
};
|
|
949
1340
|
/** @description Internal server error */
|
|
@@ -952,7 +1343,7 @@ interface operations {
|
|
|
952
1343
|
[name: string]: unknown;
|
|
953
1344
|
};
|
|
954
1345
|
content: {
|
|
955
|
-
"application/
|
|
1346
|
+
"application/json": components["schemas"]["ProblemDetail"];
|
|
956
1347
|
};
|
|
957
1348
|
};
|
|
958
1349
|
};
|
|
@@ -976,7 +1367,7 @@ interface operations {
|
|
|
976
1367
|
[name: string]: unknown;
|
|
977
1368
|
};
|
|
978
1369
|
content: {
|
|
979
|
-
"application/
|
|
1370
|
+
"application/json": components["schemas"]["QuoteResponse"];
|
|
980
1371
|
};
|
|
981
1372
|
};
|
|
982
1373
|
/** @description Invalid request: validation error */
|
|
@@ -985,7 +1376,7 @@ interface operations {
|
|
|
985
1376
|
[name: string]: unknown;
|
|
986
1377
|
};
|
|
987
1378
|
content: {
|
|
988
|
-
"application/
|
|
1379
|
+
"application/json": components["schemas"]["ProblemDetail"];
|
|
989
1380
|
};
|
|
990
1381
|
};
|
|
991
1382
|
/** @description Unauthorized: missing or invalid Bearer token (authentication failed) */
|
|
@@ -994,7 +1385,7 @@ interface operations {
|
|
|
994
1385
|
[name: string]: unknown;
|
|
995
1386
|
};
|
|
996
1387
|
content: {
|
|
997
|
-
"application/
|
|
1388
|
+
"application/json": components["schemas"]["ProblemDetail"];
|
|
998
1389
|
};
|
|
999
1390
|
};
|
|
1000
1391
|
/** @description Forbidden: missing/invalid API key, or user does not belong to the authorized company */
|
|
@@ -1003,7 +1394,94 @@ interface operations {
|
|
|
1003
1394
|
[name: string]: unknown;
|
|
1004
1395
|
};
|
|
1005
1396
|
content: {
|
|
1006
|
-
"application/
|
|
1397
|
+
"application/json": components["schemas"]["ProblemDetail"];
|
|
1398
|
+
};
|
|
1399
|
+
};
|
|
1400
|
+
/**
|
|
1401
|
+
* @description Unprocessable Entity. Possible reasons:
|
|
1402
|
+
*
|
|
1403
|
+
* - **Location Not Serviceable** (`reason: no_coverage`) — the lane is not within Oway's active coverage area.
|
|
1404
|
+
* - **Request Not Permitted** (`reason: account_restriction`) — the requested truck type or accessorial is not enabled for your account. Contact your Oway representative to update your available options.
|
|
1405
|
+
* - **Daily Trip Limit Reached** (`reason: daily_trip_limit`) — your account has reached its maximum shipments for the requested pickup date. You can still place orders for other dates.
|
|
1406
|
+
*/
|
|
1407
|
+
422: {
|
|
1408
|
+
headers: {
|
|
1409
|
+
[name: string]: unknown;
|
|
1410
|
+
};
|
|
1411
|
+
content: {
|
|
1412
|
+
"application/json": components["schemas"]["ProblemDetail"];
|
|
1413
|
+
};
|
|
1414
|
+
};
|
|
1415
|
+
/** @description Internal server error */
|
|
1416
|
+
500: {
|
|
1417
|
+
headers: {
|
|
1418
|
+
[name: string]: unknown;
|
|
1419
|
+
};
|
|
1420
|
+
content: {
|
|
1421
|
+
"application/json": components["schemas"]["ProblemDetail"];
|
|
1422
|
+
};
|
|
1423
|
+
};
|
|
1424
|
+
};
|
|
1425
|
+
};
|
|
1426
|
+
addTrips: {
|
|
1427
|
+
parameters: {
|
|
1428
|
+
query?: never;
|
|
1429
|
+
header?: never;
|
|
1430
|
+
path: {
|
|
1431
|
+
/** @description The unique identifier of the carrier */
|
|
1432
|
+
carrierId: string;
|
|
1433
|
+
};
|
|
1434
|
+
cookie?: never;
|
|
1435
|
+
};
|
|
1436
|
+
requestBody: {
|
|
1437
|
+
content: {
|
|
1438
|
+
"application/json": components["schemas"]["TripRequest"][];
|
|
1439
|
+
};
|
|
1440
|
+
};
|
|
1441
|
+
responses: {
|
|
1442
|
+
/** @description Trips accepted and processed; returns count of trips added */
|
|
1443
|
+
200: {
|
|
1444
|
+
headers: {
|
|
1445
|
+
[name: string]: unknown;
|
|
1446
|
+
};
|
|
1447
|
+
content: {
|
|
1448
|
+
"application/json": number;
|
|
1449
|
+
};
|
|
1450
|
+
};
|
|
1451
|
+
/** @description Invalid request: missing required fields or invalid trip data */
|
|
1452
|
+
400: {
|
|
1453
|
+
headers: {
|
|
1454
|
+
[name: string]: unknown;
|
|
1455
|
+
};
|
|
1456
|
+
content: {
|
|
1457
|
+
"application/json": components["schemas"]["ProblemDetail"];
|
|
1458
|
+
};
|
|
1459
|
+
};
|
|
1460
|
+
/** @description Unauthorized: missing or invalid bearer token */
|
|
1461
|
+
401: {
|
|
1462
|
+
headers: {
|
|
1463
|
+
[name: string]: unknown;
|
|
1464
|
+
};
|
|
1465
|
+
content: {
|
|
1466
|
+
"application/json": components["schemas"]["ProblemDetail"];
|
|
1467
|
+
};
|
|
1468
|
+
};
|
|
1469
|
+
/** @description Forbidden: API access is not enabled for this carrier */
|
|
1470
|
+
403: {
|
|
1471
|
+
headers: {
|
|
1472
|
+
[name: string]: unknown;
|
|
1473
|
+
};
|
|
1474
|
+
content: {
|
|
1475
|
+
"application/json": components["schemas"]["ProblemDetail"];
|
|
1476
|
+
};
|
|
1477
|
+
};
|
|
1478
|
+
/** @description Carrier not found */
|
|
1479
|
+
404: {
|
|
1480
|
+
headers: {
|
|
1481
|
+
[name: string]: unknown;
|
|
1482
|
+
};
|
|
1483
|
+
content: {
|
|
1484
|
+
"application/json": components["schemas"]["ProblemDetail"];
|
|
1007
1485
|
};
|
|
1008
1486
|
};
|
|
1009
1487
|
/** @description Internal server error */
|
|
@@ -1012,12 +1490,126 @@ interface operations {
|
|
|
1012
1490
|
[name: string]: unknown;
|
|
1013
1491
|
};
|
|
1014
1492
|
content: {
|
|
1015
|
-
"application/
|
|
1493
|
+
"application/json": components["schemas"]["ProblemDetail"];
|
|
1016
1494
|
};
|
|
1017
1495
|
};
|
|
1018
1496
|
};
|
|
1019
1497
|
};
|
|
1020
|
-
|
|
1498
|
+
addGpsData: {
|
|
1499
|
+
parameters: {
|
|
1500
|
+
query?: never;
|
|
1501
|
+
header?: never;
|
|
1502
|
+
path: {
|
|
1503
|
+
/** @description The unique identifier of the carrier */
|
|
1504
|
+
carrierId: string;
|
|
1505
|
+
};
|
|
1506
|
+
cookie?: never;
|
|
1507
|
+
};
|
|
1508
|
+
requestBody: {
|
|
1509
|
+
content: {
|
|
1510
|
+
"application/json": components["schemas"]["GpsData"][];
|
|
1511
|
+
};
|
|
1512
|
+
};
|
|
1513
|
+
responses: {
|
|
1514
|
+
/** @description GPS data accepted and processed; returns count of data points added */
|
|
1515
|
+
200: {
|
|
1516
|
+
headers: {
|
|
1517
|
+
[name: string]: unknown;
|
|
1518
|
+
};
|
|
1519
|
+
content: {
|
|
1520
|
+
"application/json": number;
|
|
1521
|
+
};
|
|
1522
|
+
};
|
|
1523
|
+
/** @description Invalid request: malformed JSON, missing fields, or invalid data */
|
|
1524
|
+
400: {
|
|
1525
|
+
headers: {
|
|
1526
|
+
[name: string]: unknown;
|
|
1527
|
+
};
|
|
1528
|
+
content: {
|
|
1529
|
+
"application/json": components["schemas"]["ProblemDetail"];
|
|
1530
|
+
};
|
|
1531
|
+
};
|
|
1532
|
+
/** @description Unauthorized: missing or invalid bearer token */
|
|
1533
|
+
401: {
|
|
1534
|
+
headers: {
|
|
1535
|
+
[name: string]: unknown;
|
|
1536
|
+
};
|
|
1537
|
+
content: {
|
|
1538
|
+
"application/json": components["schemas"]["ProblemDetail"];
|
|
1539
|
+
};
|
|
1540
|
+
};
|
|
1541
|
+
/** @description Forbidden: API access is not enabled for this carrier */
|
|
1542
|
+
403: {
|
|
1543
|
+
headers: {
|
|
1544
|
+
[name: string]: unknown;
|
|
1545
|
+
};
|
|
1546
|
+
content: {
|
|
1547
|
+
"application/json": components["schemas"]["ProblemDetail"];
|
|
1548
|
+
};
|
|
1549
|
+
};
|
|
1550
|
+
/** @description Carrier not found */
|
|
1551
|
+
404: {
|
|
1552
|
+
headers: {
|
|
1553
|
+
[name: string]: unknown;
|
|
1554
|
+
};
|
|
1555
|
+
content: {
|
|
1556
|
+
"application/json": components["schemas"]["ProblemDetail"];
|
|
1557
|
+
};
|
|
1558
|
+
};
|
|
1559
|
+
/** @description Internal server error */
|
|
1560
|
+
500: {
|
|
1561
|
+
headers: {
|
|
1562
|
+
[name: string]: unknown;
|
|
1563
|
+
};
|
|
1564
|
+
content: {
|
|
1565
|
+
"application/json": components["schemas"]["ProblemDetail"];
|
|
1566
|
+
};
|
|
1567
|
+
};
|
|
1568
|
+
};
|
|
1569
|
+
};
|
|
1570
|
+
getToken: {
|
|
1571
|
+
parameters: {
|
|
1572
|
+
query?: never;
|
|
1573
|
+
header?: never;
|
|
1574
|
+
path?: never;
|
|
1575
|
+
cookie?: never;
|
|
1576
|
+
};
|
|
1577
|
+
requestBody: {
|
|
1578
|
+
content: {
|
|
1579
|
+
"application/json": components["schemas"]["TokenRequest"];
|
|
1580
|
+
};
|
|
1581
|
+
};
|
|
1582
|
+
responses: {
|
|
1583
|
+
/** @description Token successfully generated */
|
|
1584
|
+
200: {
|
|
1585
|
+
headers: {
|
|
1586
|
+
[name: string]: unknown;
|
|
1587
|
+
};
|
|
1588
|
+
content: {
|
|
1589
|
+
"application/json": components["schemas"]["TokenResponse"];
|
|
1590
|
+
};
|
|
1591
|
+
};
|
|
1592
|
+
/** @description Invalid request: missing required fields */
|
|
1593
|
+
400: {
|
|
1594
|
+
headers: {
|
|
1595
|
+
[name: string]: unknown;
|
|
1596
|
+
};
|
|
1597
|
+
content: {
|
|
1598
|
+
"application/json": components["schemas"]["TokenErrorResponse"];
|
|
1599
|
+
};
|
|
1600
|
+
};
|
|
1601
|
+
/** @description Unauthorized: invalid credentials */
|
|
1602
|
+
401: {
|
|
1603
|
+
headers: {
|
|
1604
|
+
[name: string]: unknown;
|
|
1605
|
+
};
|
|
1606
|
+
content: {
|
|
1607
|
+
"application/json": components["schemas"]["TokenErrorResponse"];
|
|
1608
|
+
};
|
|
1609
|
+
};
|
|
1610
|
+
};
|
|
1611
|
+
};
|
|
1612
|
+
getShipment: {
|
|
1021
1613
|
parameters: {
|
|
1022
1614
|
query?: never;
|
|
1023
1615
|
header?: never;
|
|
@@ -1038,7 +1630,7 @@ interface operations {
|
|
|
1038
1630
|
[name: string]: unknown;
|
|
1039
1631
|
};
|
|
1040
1632
|
content: {
|
|
1041
|
-
"application/
|
|
1633
|
+
"application/json": components["schemas"]["Shipment"];
|
|
1042
1634
|
};
|
|
1043
1635
|
};
|
|
1044
1636
|
/** @description Invalid request: orderNumber is required */
|
|
@@ -1047,7 +1639,7 @@ interface operations {
|
|
|
1047
1639
|
[name: string]: unknown;
|
|
1048
1640
|
};
|
|
1049
1641
|
content: {
|
|
1050
|
-
"application/
|
|
1642
|
+
"application/json": components["schemas"]["ProblemDetail"];
|
|
1051
1643
|
};
|
|
1052
1644
|
};
|
|
1053
1645
|
/** @description Unauthorized: missing or invalid Bearer token (authentication failed) */
|
|
@@ -1056,7 +1648,7 @@ interface operations {
|
|
|
1056
1648
|
[name: string]: unknown;
|
|
1057
1649
|
};
|
|
1058
1650
|
content: {
|
|
1059
|
-
"application/
|
|
1651
|
+
"application/json": components["schemas"]["ProblemDetail"];
|
|
1060
1652
|
};
|
|
1061
1653
|
};
|
|
1062
1654
|
/** @description Forbidden: missing/invalid API key, or shipment does not belong to your company */
|
|
@@ -1065,7 +1657,7 @@ interface operations {
|
|
|
1065
1657
|
[name: string]: unknown;
|
|
1066
1658
|
};
|
|
1067
1659
|
content: {
|
|
1068
|
-
"application/
|
|
1660
|
+
"application/json": components["schemas"]["ProblemDetail"];
|
|
1069
1661
|
};
|
|
1070
1662
|
};
|
|
1071
1663
|
/** @description Shipment not found */
|
|
@@ -1074,12 +1666,12 @@ interface operations {
|
|
|
1074
1666
|
[name: string]: unknown;
|
|
1075
1667
|
};
|
|
1076
1668
|
content: {
|
|
1077
|
-
"application/
|
|
1669
|
+
"application/json": components["schemas"]["ProblemDetail"];
|
|
1078
1670
|
};
|
|
1079
1671
|
};
|
|
1080
1672
|
};
|
|
1081
1673
|
};
|
|
1082
|
-
|
|
1674
|
+
trackShipment: {
|
|
1083
1675
|
parameters: {
|
|
1084
1676
|
query?: never;
|
|
1085
1677
|
header?: never;
|
|
@@ -1100,7 +1692,7 @@ interface operations {
|
|
|
1100
1692
|
[name: string]: unknown;
|
|
1101
1693
|
};
|
|
1102
1694
|
content: {
|
|
1103
|
-
"application/
|
|
1695
|
+
"application/json": components["schemas"]["Tracking"];
|
|
1104
1696
|
};
|
|
1105
1697
|
};
|
|
1106
1698
|
/** @description Invalid request: orderNumber is required */
|
|
@@ -1109,7 +1701,7 @@ interface operations {
|
|
|
1109
1701
|
[name: string]: unknown;
|
|
1110
1702
|
};
|
|
1111
1703
|
content: {
|
|
1112
|
-
"application/
|
|
1704
|
+
"application/json": components["schemas"]["ProblemDetail"];
|
|
1113
1705
|
};
|
|
1114
1706
|
};
|
|
1115
1707
|
/** @description Unauthorized: missing or invalid Bearer token (authentication failed) */
|
|
@@ -1118,7 +1710,7 @@ interface operations {
|
|
|
1118
1710
|
[name: string]: unknown;
|
|
1119
1711
|
};
|
|
1120
1712
|
content: {
|
|
1121
|
-
"application/
|
|
1713
|
+
"application/json": components["schemas"]["ProblemDetail"];
|
|
1122
1714
|
};
|
|
1123
1715
|
};
|
|
1124
1716
|
/** @description Forbidden: missing/invalid API key, or shipment does not belong to your company */
|
|
@@ -1127,7 +1719,7 @@ interface operations {
|
|
|
1127
1719
|
[name: string]: unknown;
|
|
1128
1720
|
};
|
|
1129
1721
|
content: {
|
|
1130
|
-
"application/
|
|
1722
|
+
"application/json": components["schemas"]["ProblemDetail"];
|
|
1131
1723
|
};
|
|
1132
1724
|
};
|
|
1133
1725
|
/** @description Shipment not found */
|
|
@@ -1136,7 +1728,7 @@ interface operations {
|
|
|
1136
1728
|
[name: string]: unknown;
|
|
1137
1729
|
};
|
|
1138
1730
|
content: {
|
|
1139
|
-
"application/
|
|
1731
|
+
"application/json": components["schemas"]["ProblemDetail"];
|
|
1140
1732
|
};
|
|
1141
1733
|
};
|
|
1142
1734
|
};
|
|
@@ -1162,7 +1754,7 @@ interface operations {
|
|
|
1162
1754
|
[name: string]: unknown;
|
|
1163
1755
|
};
|
|
1164
1756
|
content: {
|
|
1165
|
-
"application/
|
|
1757
|
+
"application/json": components["schemas"]["InvoiceResponse"];
|
|
1166
1758
|
};
|
|
1167
1759
|
};
|
|
1168
1760
|
/** @description Invalid request: orderNumber is required, or shipment is not in DELIVERED state */
|
|
@@ -1171,7 +1763,7 @@ interface operations {
|
|
|
1171
1763
|
[name: string]: unknown;
|
|
1172
1764
|
};
|
|
1173
1765
|
content: {
|
|
1174
|
-
"application/
|
|
1766
|
+
"application/json": components["schemas"]["ProblemDetail"];
|
|
1175
1767
|
};
|
|
1176
1768
|
};
|
|
1177
1769
|
/** @description Unauthorized: missing or invalid Bearer token (authentication failed) */
|
|
@@ -1180,7 +1772,7 @@ interface operations {
|
|
|
1180
1772
|
[name: string]: unknown;
|
|
1181
1773
|
};
|
|
1182
1774
|
content: {
|
|
1183
|
-
"application/
|
|
1775
|
+
"application/json": components["schemas"]["ProblemDetail"];
|
|
1184
1776
|
};
|
|
1185
1777
|
};
|
|
1186
1778
|
/** @description Forbidden: missing/invalid API key, or shipment does not belong to your company */
|
|
@@ -1189,7 +1781,7 @@ interface operations {
|
|
|
1189
1781
|
[name: string]: unknown;
|
|
1190
1782
|
};
|
|
1191
1783
|
content: {
|
|
1192
|
-
"application/
|
|
1784
|
+
"application/json": components["schemas"]["ProblemDetail"];
|
|
1193
1785
|
};
|
|
1194
1786
|
};
|
|
1195
1787
|
/** @description Shipment not found */
|
|
@@ -1198,12 +1790,12 @@ interface operations {
|
|
|
1198
1790
|
[name: string]: unknown;
|
|
1199
1791
|
};
|
|
1200
1792
|
content: {
|
|
1201
|
-
"application/
|
|
1793
|
+
"application/json": components["schemas"]["ProblemDetail"];
|
|
1202
1794
|
};
|
|
1203
1795
|
};
|
|
1204
1796
|
};
|
|
1205
1797
|
};
|
|
1206
|
-
|
|
1798
|
+
getDocument: {
|
|
1207
1799
|
parameters: {
|
|
1208
1800
|
query?: never;
|
|
1209
1801
|
header?: never;
|
|
@@ -1214,7 +1806,7 @@ interface operations {
|
|
|
1214
1806
|
*/
|
|
1215
1807
|
orderNumber: string;
|
|
1216
1808
|
/** @description Type of document to retrieve */
|
|
1217
|
-
documentType: "BILL_OF_LADING" | "INVOICE" | "SHIPPING_LABEL";
|
|
1809
|
+
documentType: "BILL_OF_LADING" | "INVOICE" | "SHIPPING_LABEL" | "POD";
|
|
1218
1810
|
};
|
|
1219
1811
|
cookie?: never;
|
|
1220
1812
|
};
|
|
@@ -1226,7 +1818,7 @@ interface operations {
|
|
|
1226
1818
|
[name: string]: unknown;
|
|
1227
1819
|
};
|
|
1228
1820
|
content: {
|
|
1229
|
-
"application/
|
|
1821
|
+
"application/json": components["schemas"]["DocumentResponse"];
|
|
1230
1822
|
};
|
|
1231
1823
|
};
|
|
1232
1824
|
/** @description Invalid request: orderNumber and documentType are required */
|
|
@@ -1235,7 +1827,7 @@ interface operations {
|
|
|
1235
1827
|
[name: string]: unknown;
|
|
1236
1828
|
};
|
|
1237
1829
|
content: {
|
|
1238
|
-
"application/
|
|
1830
|
+
"application/json": components["schemas"]["ProblemDetail"];
|
|
1239
1831
|
};
|
|
1240
1832
|
};
|
|
1241
1833
|
/** @description Unauthorized: missing or invalid Bearer token (authentication failed) */
|
|
@@ -1244,7 +1836,7 @@ interface operations {
|
|
|
1244
1836
|
[name: string]: unknown;
|
|
1245
1837
|
};
|
|
1246
1838
|
content: {
|
|
1247
|
-
"application/
|
|
1839
|
+
"application/json": components["schemas"]["ProblemDetail"];
|
|
1248
1840
|
};
|
|
1249
1841
|
};
|
|
1250
1842
|
/** @description Forbidden: missing/invalid API key, or shipment does not belong to your company */
|
|
@@ -1253,7 +1845,7 @@ interface operations {
|
|
|
1253
1845
|
[name: string]: unknown;
|
|
1254
1846
|
};
|
|
1255
1847
|
content: {
|
|
1256
|
-
"application/
|
|
1848
|
+
"application/json": components["schemas"]["ProblemDetail"];
|
|
1257
1849
|
};
|
|
1258
1850
|
};
|
|
1259
1851
|
/** @description Shipment or document not found */
|
|
@@ -1262,7 +1854,7 @@ interface operations {
|
|
|
1262
1854
|
[name: string]: unknown;
|
|
1263
1855
|
};
|
|
1264
1856
|
content: {
|
|
1265
|
-
"application/
|
|
1857
|
+
"application/json": components["schemas"]["ProblemDetail"];
|
|
1266
1858
|
};
|
|
1267
1859
|
};
|
|
1268
1860
|
/** @description Internal server error */
|
|
@@ -1271,7 +1863,7 @@ interface operations {
|
|
|
1271
1863
|
[name: string]: unknown;
|
|
1272
1864
|
};
|
|
1273
1865
|
content: {
|
|
1274
|
-
"application/
|
|
1866
|
+
"application/json": components["schemas"]["ProblemDetail"];
|
|
1275
1867
|
};
|
|
1276
1868
|
};
|
|
1277
1869
|
};
|
|
@@ -1294,7 +1886,7 @@ interface operations {
|
|
|
1294
1886
|
[name: string]: unknown;
|
|
1295
1887
|
};
|
|
1296
1888
|
content: {
|
|
1297
|
-
"application/
|
|
1889
|
+
"application/json": components["schemas"]["QuoteResponse"];
|
|
1298
1890
|
};
|
|
1299
1891
|
};
|
|
1300
1892
|
/** @description Invalid request: quote ID format is invalid */
|
|
@@ -1303,7 +1895,7 @@ interface operations {
|
|
|
1303
1895
|
[name: string]: unknown;
|
|
1304
1896
|
};
|
|
1305
1897
|
content: {
|
|
1306
|
-
"application/
|
|
1898
|
+
"application/json": components["schemas"]["ProblemDetail"];
|
|
1307
1899
|
};
|
|
1308
1900
|
};
|
|
1309
1901
|
/** @description Unauthorized: missing or invalid Bearer token (authentication failed) */
|
|
@@ -1312,7 +1904,7 @@ interface operations {
|
|
|
1312
1904
|
[name: string]: unknown;
|
|
1313
1905
|
};
|
|
1314
1906
|
content: {
|
|
1315
|
-
"application/
|
|
1907
|
+
"application/json": components["schemas"]["ProblemDetail"];
|
|
1316
1908
|
};
|
|
1317
1909
|
};
|
|
1318
1910
|
/** @description Forbidden: missing, invalid, or expired API key (authorization failed) */
|
|
@@ -1321,7 +1913,7 @@ interface operations {
|
|
|
1321
1913
|
[name: string]: unknown;
|
|
1322
1914
|
};
|
|
1323
1915
|
content: {
|
|
1324
|
-
"application/
|
|
1916
|
+
"application/json": components["schemas"]["ProblemDetail"];
|
|
1325
1917
|
};
|
|
1326
1918
|
};
|
|
1327
1919
|
/** @description Quote not found */
|
|
@@ -1330,23 +1922,259 @@ interface operations {
|
|
|
1330
1922
|
[name: string]: unknown;
|
|
1331
1923
|
};
|
|
1332
1924
|
content: {
|
|
1333
|
-
"application/
|
|
1925
|
+
"application/json": components["schemas"]["ProblemDetail"];
|
|
1926
|
+
};
|
|
1927
|
+
};
|
|
1928
|
+
};
|
|
1929
|
+
};
|
|
1930
|
+
getCarrierApiConfig: {
|
|
1931
|
+
parameters: {
|
|
1932
|
+
query?: never;
|
|
1933
|
+
header?: never;
|
|
1934
|
+
path: {
|
|
1935
|
+
/** @description The unique identifier of the carrier */
|
|
1936
|
+
carrierId: string;
|
|
1937
|
+
};
|
|
1938
|
+
cookie?: never;
|
|
1939
|
+
};
|
|
1940
|
+
requestBody?: never;
|
|
1941
|
+
responses: {
|
|
1942
|
+
/** @description Configuration retrieved successfully */
|
|
1943
|
+
200: {
|
|
1944
|
+
headers: {
|
|
1945
|
+
[name: string]: unknown;
|
|
1946
|
+
};
|
|
1947
|
+
content: {
|
|
1948
|
+
"application/json": components["schemas"]["CarrierApiConfigResponse"];
|
|
1949
|
+
};
|
|
1950
|
+
};
|
|
1951
|
+
/** @description Unauthorized: missing or invalid bearer token */
|
|
1952
|
+
401: {
|
|
1953
|
+
headers: {
|
|
1954
|
+
[name: string]: unknown;
|
|
1955
|
+
};
|
|
1956
|
+
content: {
|
|
1957
|
+
"application/json": components["schemas"]["ProblemDetail"];
|
|
1958
|
+
};
|
|
1959
|
+
};
|
|
1960
|
+
/** @description Forbidden: API access is not enabled for this carrier */
|
|
1961
|
+
403: {
|
|
1962
|
+
headers: {
|
|
1963
|
+
[name: string]: unknown;
|
|
1964
|
+
};
|
|
1965
|
+
content: {
|
|
1966
|
+
"application/json": components["schemas"]["ProblemDetail"];
|
|
1967
|
+
};
|
|
1968
|
+
};
|
|
1969
|
+
/** @description Carrier not found */
|
|
1970
|
+
404: {
|
|
1971
|
+
headers: {
|
|
1972
|
+
[name: string]: unknown;
|
|
1973
|
+
};
|
|
1974
|
+
content: {
|
|
1975
|
+
"application/json": components["schemas"]["ProblemDetail"];
|
|
1976
|
+
};
|
|
1977
|
+
};
|
|
1978
|
+
/** @description Internal server error */
|
|
1979
|
+
500: {
|
|
1980
|
+
headers: {
|
|
1981
|
+
[name: string]: unknown;
|
|
1982
|
+
};
|
|
1983
|
+
content: {
|
|
1984
|
+
"application/json": components["schemas"]["ProblemDetail"];
|
|
1985
|
+
};
|
|
1986
|
+
};
|
|
1987
|
+
};
|
|
1988
|
+
};
|
|
1989
|
+
getJobs: {
|
|
1990
|
+
parameters: {
|
|
1991
|
+
query?: {
|
|
1992
|
+
/** @description If true, only return currently active jobs */
|
|
1993
|
+
activeOnly?: boolean;
|
|
1994
|
+
/** @description Filter jobs created after this time (ISO 8601 format) */
|
|
1995
|
+
startTime?: string;
|
|
1996
|
+
/** @description Filter jobs created before this time (ISO 8601 format) */
|
|
1997
|
+
endTime?: string;
|
|
1998
|
+
};
|
|
1999
|
+
header?: never;
|
|
2000
|
+
path: {
|
|
2001
|
+
/** @description The unique identifier of the carrier */
|
|
2002
|
+
carrierId: string;
|
|
2003
|
+
};
|
|
2004
|
+
cookie?: never;
|
|
2005
|
+
};
|
|
2006
|
+
requestBody?: never;
|
|
2007
|
+
responses: {
|
|
2008
|
+
/** @description Jobs retrieved successfully */
|
|
2009
|
+
200: {
|
|
2010
|
+
headers: {
|
|
2011
|
+
[name: string]: unknown;
|
|
2012
|
+
};
|
|
2013
|
+
content: {
|
|
2014
|
+
"application/json": components["schemas"]["OfferWithOrderDataDTO"][];
|
|
2015
|
+
};
|
|
2016
|
+
};
|
|
2017
|
+
/** @description Unauthorized: missing or invalid bearer token */
|
|
2018
|
+
401: {
|
|
2019
|
+
headers: {
|
|
2020
|
+
[name: string]: unknown;
|
|
2021
|
+
};
|
|
2022
|
+
content: {
|
|
2023
|
+
"application/json": components["schemas"]["ProblemDetail"];
|
|
2024
|
+
};
|
|
2025
|
+
};
|
|
2026
|
+
/** @description Forbidden: API access is not enabled for this carrier */
|
|
2027
|
+
403: {
|
|
2028
|
+
headers: {
|
|
2029
|
+
[name: string]: unknown;
|
|
2030
|
+
};
|
|
2031
|
+
content: {
|
|
2032
|
+
"application/json": components["schemas"]["ProblemDetail"];
|
|
2033
|
+
};
|
|
2034
|
+
};
|
|
2035
|
+
/** @description Carrier not found */
|
|
2036
|
+
404: {
|
|
2037
|
+
headers: {
|
|
2038
|
+
[name: string]: unknown;
|
|
2039
|
+
};
|
|
2040
|
+
content: {
|
|
2041
|
+
"application/json": components["schemas"]["ProblemDetail"];
|
|
2042
|
+
};
|
|
2043
|
+
};
|
|
2044
|
+
/** @description Internal server error */
|
|
2045
|
+
500: {
|
|
2046
|
+
headers: {
|
|
2047
|
+
[name: string]: unknown;
|
|
2048
|
+
};
|
|
2049
|
+
content: {
|
|
2050
|
+
"application/json": components["schemas"]["ProblemDetail"];
|
|
1334
2051
|
};
|
|
1335
2052
|
};
|
|
1336
2053
|
};
|
|
1337
2054
|
};
|
|
1338
2055
|
}
|
|
1339
2056
|
|
|
2057
|
+
interface OwayConfig {
|
|
2058
|
+
/**
|
|
2059
|
+
* M2M Client ID (REQUIRED for all integrations)
|
|
2060
|
+
* Provided by Oway Sales Engineering team
|
|
2061
|
+
*/
|
|
2062
|
+
clientId: string;
|
|
2063
|
+
/**
|
|
2064
|
+
* M2M Client Secret (REQUIRED for all integrations)
|
|
2065
|
+
* Provided by Oway Sales Engineering team
|
|
2066
|
+
*/
|
|
2067
|
+
clientSecret: string;
|
|
2068
|
+
/**
|
|
2069
|
+
* Default company API key (optional)
|
|
2070
|
+
*
|
|
2071
|
+
* Single-company: Set this to your company's API key
|
|
2072
|
+
* Multi-company: Omit this and provide per-request
|
|
2073
|
+
*
|
|
2074
|
+
* Get from: https://app.oway.io/settings/api
|
|
2075
|
+
*/
|
|
2076
|
+
apiKey?: string;
|
|
2077
|
+
/**
|
|
2078
|
+
* Base URL for the Oway API
|
|
2079
|
+
* @default "https://api.sandbox.oway.io"
|
|
2080
|
+
*/
|
|
2081
|
+
baseUrl?: string;
|
|
2082
|
+
/**
|
|
2083
|
+
* Token endpoint for authentication
|
|
2084
|
+
* @default "https://api.sandbox.oway.io/v1/auth/token"
|
|
2085
|
+
*/
|
|
2086
|
+
tokenUrl?: string;
|
|
2087
|
+
/**
|
|
2088
|
+
* Maximum number of retry attempts for failed requests
|
|
2089
|
+
* @default 3
|
|
2090
|
+
*/
|
|
2091
|
+
maxRetries?: number;
|
|
2092
|
+
/**
|
|
2093
|
+
* Timeout in milliseconds for API requests
|
|
2094
|
+
* @default 30000
|
|
2095
|
+
*/
|
|
2096
|
+
timeout?: number;
|
|
2097
|
+
/**
|
|
2098
|
+
* Enable debug logging (logs sanitized request/response metadata)
|
|
2099
|
+
* @default false
|
|
2100
|
+
*/
|
|
2101
|
+
debug?: boolean;
|
|
2102
|
+
/**
|
|
2103
|
+
* Custom logger implementation
|
|
2104
|
+
*/
|
|
2105
|
+
logger?: {
|
|
2106
|
+
debug: (msg: string, meta?: Record<string, any>) => void;
|
|
2107
|
+
info: (msg: string, meta?: Record<string, any>) => void;
|
|
2108
|
+
warn: (msg: string, meta?: Record<string, any>) => void;
|
|
2109
|
+
error: (msg: string, meta?: Record<string, any>) => void;
|
|
2110
|
+
};
|
|
2111
|
+
}
|
|
2112
|
+
declare class OwayError extends Error {
|
|
2113
|
+
code?: string | undefined;
|
|
2114
|
+
statusCode?: number | undefined;
|
|
2115
|
+
requestId?: string | undefined;
|
|
2116
|
+
constructor(message: string, code?: string | undefined, statusCode?: number | undefined, requestId?: string | undefined);
|
|
2117
|
+
/**
|
|
2118
|
+
* Determines if this error represents a transient failure that should be retried
|
|
2119
|
+
*/
|
|
2120
|
+
isRetryable(): boolean;
|
|
2121
|
+
}
|
|
2122
|
+
/**
|
|
2123
|
+
* HTTP client for making authenticated requests to the Oway API
|
|
2124
|
+
*/
|
|
2125
|
+
declare class HttpClient {
|
|
2126
|
+
private config;
|
|
2127
|
+
private accessToken;
|
|
2128
|
+
private tokenExpiry;
|
|
2129
|
+
private tokenRefreshPromise;
|
|
2130
|
+
constructor(config: OwayConfig);
|
|
2131
|
+
/**
|
|
2132
|
+
* Internal logging with sanitization
|
|
2133
|
+
*/
|
|
2134
|
+
private log;
|
|
2135
|
+
/**
|
|
2136
|
+
* Sanitize objects for logging - remove sensitive fields
|
|
2137
|
+
*/
|
|
2138
|
+
private sanitizeForLogging;
|
|
2139
|
+
/**
|
|
2140
|
+
* Get or refresh the access token using the API key
|
|
2141
|
+
* Handles concurrent requests by queuing them behind a single refresh
|
|
2142
|
+
*/
|
|
2143
|
+
private getAccessToken;
|
|
2144
|
+
/**
|
|
2145
|
+
* Perform the actual token refresh using M2M credentials
|
|
2146
|
+
*/
|
|
2147
|
+
private refreshToken;
|
|
2148
|
+
/**
|
|
2149
|
+
* Generate a unique request ID
|
|
2150
|
+
*/
|
|
2151
|
+
private generateRequestId;
|
|
2152
|
+
/**
|
|
2153
|
+
* Make an authenticated request to the Oway API
|
|
2154
|
+
*/
|
|
2155
|
+
request<T>(method: string, path: string, options?: {
|
|
2156
|
+
query?: Record<string, string | number | boolean>;
|
|
2157
|
+
body?: unknown;
|
|
2158
|
+
headers?: Record<string, string>;
|
|
2159
|
+
requestId?: string;
|
|
2160
|
+
companyApiKey?: string;
|
|
2161
|
+
}): Promise<T>;
|
|
2162
|
+
get<T>(path: string, query?: Record<string, string | number | boolean>, companyApiKey?: string): Promise<T>;
|
|
2163
|
+
post<T>(path: string, body?: unknown, companyApiKey?: string): Promise<T>;
|
|
2164
|
+
put<T>(path: string, body?: unknown, companyApiKey?: string): Promise<T>;
|
|
2165
|
+
delete<T>(path: string, companyApiKey?: string): Promise<T>;
|
|
2166
|
+
}
|
|
2167
|
+
|
|
1340
2168
|
/**
|
|
1341
2169
|
* Clean type aliases for the Oway SDK
|
|
1342
2170
|
*/
|
|
1343
2171
|
|
|
1344
2172
|
type QuoteRequest = paths['/v1/shipper/quote']['post']['requestBody']['content']['application/json'];
|
|
1345
2173
|
type ShipmentRequest = paths['/v1/shipper/shipment']['post']['requestBody']['content']['application/json'];
|
|
1346
|
-
type Quote = paths['/v1/shipper/quote']['post']['responses']['200']['content']['application/
|
|
1347
|
-
type Shipment = paths['/v1/shipper/shipment']['post']['responses']['200']['content']['application/
|
|
1348
|
-
type Tracking = paths['/v1/shipper/shipment/{orderNumber}/tracking']['get']['responses']['200']['content']['application/
|
|
1349
|
-
type Invoice = paths['/v1/shipper/shipment/{orderNumber}/invoice']['get']['responses']['200']['content']['application/
|
|
2174
|
+
type Quote = paths['/v1/shipper/quote']['post']['responses']['200']['content']['application/json'];
|
|
2175
|
+
type Shipment = paths['/v1/shipper/shipment']['post']['responses']['200']['content']['application/json'];
|
|
2176
|
+
type Tracking = paths['/v1/shipper/shipment/{orderNumber}/tracking']['get']['responses']['200']['content']['application/json'];
|
|
2177
|
+
type Invoice = paths['/v1/shipper/shipment/{orderNumber}/invoice']['get']['responses']['200']['content']['application/json'];
|
|
1350
2178
|
type Address = components['schemas']['Address'];
|
|
1351
2179
|
|
|
1352
2180
|
declare class Quotes {
|
|
@@ -1389,12 +2217,12 @@ declare const OwayEnvironments: {
|
|
|
1389
2217
|
* Sandbox environment for development and testing
|
|
1390
2218
|
* Safe to use - no real shipments created
|
|
1391
2219
|
*/
|
|
1392
|
-
readonly SANDBOX: "https://
|
|
2220
|
+
readonly SANDBOX: "https://api.sandbox.oway.io";
|
|
1393
2221
|
/**
|
|
1394
2222
|
* Production environment for live traffic
|
|
1395
2223
|
* Real shipments will be created and billed
|
|
1396
2224
|
*/
|
|
1397
|
-
readonly PRODUCTION: "https://
|
|
2225
|
+
readonly PRODUCTION: "https://api.oway.io";
|
|
1398
2226
|
};
|
|
1399
2227
|
|
|
1400
2228
|
/**
|