@oway/sdk 0.2.1 → 0.2.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/dist/index.d.mts +494 -16
- package/dist/index.d.ts +494 -16
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -79,6 +79,32 @@ interface paths {
|
|
|
79
79
|
patch?: never;
|
|
80
80
|
trace?: never;
|
|
81
81
|
};
|
|
82
|
+
"/v1/shipper/shipment/{orderNumber}/appointment/{stop}": {
|
|
83
|
+
parameters: {
|
|
84
|
+
query?: never;
|
|
85
|
+
header?: never;
|
|
86
|
+
path?: never;
|
|
87
|
+
cookie?: never;
|
|
88
|
+
};
|
|
89
|
+
/**
|
|
90
|
+
* Read merged appointment requirement for a stop
|
|
91
|
+
* @description Returns the effective AppointmentRequirement for one stop, computed as the merge of the place-level default and the order-level override using a "more-strict wins" rule. The `_merged` diagnostic block in the response shows per-field provenance (PLACE | ORDER | PLACE_AND_ORDER | NONE).
|
|
92
|
+
*/
|
|
93
|
+
get: operations["getAppointment"];
|
|
94
|
+
/**
|
|
95
|
+
* Upsert appointment requirement for a stop
|
|
96
|
+
* @description Idempotent upsert of the order-level AppointmentRequirement for one stop (pickup or delivery). The full provided requirement replaces any prior value. Returns the merged effective requirement (place-level default + this order-level override) with a per-field provenance diagnostic.
|
|
97
|
+
*
|
|
98
|
+
* Mutability: writes are accepted until the order reaches ACCEPTED. Writes against ACCEPTED+ orders return 409 order_accepted_appointment_locked.
|
|
99
|
+
*/
|
|
100
|
+
put: operations["upsertAppointment"];
|
|
101
|
+
post?: never;
|
|
102
|
+
delete?: never;
|
|
103
|
+
options?: never;
|
|
104
|
+
head?: never;
|
|
105
|
+
patch?: never;
|
|
106
|
+
trace?: never;
|
|
107
|
+
};
|
|
82
108
|
"/v1/carrier/shipments/{identifier}/pickup": {
|
|
83
109
|
parameters: {
|
|
84
110
|
query?: never;
|
|
@@ -243,6 +269,34 @@ interface paths {
|
|
|
243
269
|
patch?: never;
|
|
244
270
|
trace?: never;
|
|
245
271
|
};
|
|
272
|
+
"/v1/shipper/shipment/{orderNumber}/appointment/{stop}/document/{documentType}": {
|
|
273
|
+
parameters: {
|
|
274
|
+
query?: never;
|
|
275
|
+
header?: never;
|
|
276
|
+
path?: never;
|
|
277
|
+
cookie?: never;
|
|
278
|
+
};
|
|
279
|
+
get?: never;
|
|
280
|
+
put?: never;
|
|
281
|
+
/**
|
|
282
|
+
* Upload a supporting document for an appointment
|
|
283
|
+
* @description Multipart upload of a supporting document for one stop on an order. Allowed content types: application/pdf, image/jpeg, image/png. Images are wrapped to single-page PDF on upload. Max size 10 MB. Replaces any existing document of the same (stop, type).
|
|
284
|
+
*
|
|
285
|
+
* documentType must be one of: PACKING_SLIP, CUSTOMER_BOL. APPOINTMENT_DOCUMENT is system-only and returns 400 if attempted.
|
|
286
|
+
*
|
|
287
|
+
* Mutability: writes against an order past ACCEPTED return 409 order_accepted_appointment_locked.
|
|
288
|
+
*/
|
|
289
|
+
post: operations["uploadDocument"];
|
|
290
|
+
/**
|
|
291
|
+
* Delete a supporting document for an appointment
|
|
292
|
+
* @description Idempotent delete. Returns 204 whether or not the document existed.
|
|
293
|
+
*/
|
|
294
|
+
delete: operations["deleteDocument"];
|
|
295
|
+
options?: never;
|
|
296
|
+
head?: never;
|
|
297
|
+
patch?: never;
|
|
298
|
+
trace?: never;
|
|
299
|
+
};
|
|
246
300
|
"/v1/shipper/quote": {
|
|
247
301
|
parameters: {
|
|
248
302
|
query?: never;
|
|
@@ -476,6 +530,26 @@ interface paths {
|
|
|
476
530
|
patch?: never;
|
|
477
531
|
trace?: never;
|
|
478
532
|
};
|
|
533
|
+
"/v1/shipper/shipment/{orderNumber}/appointment/{stop}/pdf": {
|
|
534
|
+
parameters: {
|
|
535
|
+
query?: never;
|
|
536
|
+
header?: never;
|
|
537
|
+
path?: never;
|
|
538
|
+
cookie?: never;
|
|
539
|
+
};
|
|
540
|
+
/**
|
|
541
|
+
* Read generated appointment PDF (Phase 2)
|
|
542
|
+
* @description Returns the generated appointment PDF snapshot for one stop. Phase 1: always returns 404. The PDF doesn't exist until Phase 2 wires up generation at carrier acceptance. The endpoint is defined now to lock the URL contract.
|
|
543
|
+
*/
|
|
544
|
+
get: operations["getAppointmentPdf"];
|
|
545
|
+
put?: never;
|
|
546
|
+
post?: never;
|
|
547
|
+
delete?: never;
|
|
548
|
+
options?: never;
|
|
549
|
+
head?: never;
|
|
550
|
+
patch?: never;
|
|
551
|
+
trace?: never;
|
|
552
|
+
};
|
|
479
553
|
"/v1/shipper/quote/{quoteId}": {
|
|
480
554
|
parameters: {
|
|
481
555
|
query?: never;
|
|
@@ -755,6 +829,95 @@ interface components {
|
|
|
755
829
|
*/
|
|
756
830
|
updatedAt?: string;
|
|
757
831
|
};
|
|
832
|
+
/** @description A single contact for the appointment. At least one of email or phone must be present. */
|
|
833
|
+
AppointmentContact: {
|
|
834
|
+
/**
|
|
835
|
+
* @description Contact name
|
|
836
|
+
* @example Maria Lopez
|
|
837
|
+
*/
|
|
838
|
+
name: string;
|
|
839
|
+
/**
|
|
840
|
+
* @description Email address
|
|
841
|
+
* @example maria@aqua.com
|
|
842
|
+
*/
|
|
843
|
+
email?: string;
|
|
844
|
+
/**
|
|
845
|
+
* @description Phone in E.164 format
|
|
846
|
+
* @example +15555550101
|
|
847
|
+
*/
|
|
848
|
+
phone?: string;
|
|
849
|
+
/**
|
|
850
|
+
* @description Role of the contact at the facility
|
|
851
|
+
* @example Warehouse Manager
|
|
852
|
+
*/
|
|
853
|
+
role?: string;
|
|
854
|
+
};
|
|
855
|
+
/** @description Structured appointment metadata for a single stop on an order. Sent on PUT /v1/shipper/shipment/{orderNumber}/appointment/{stop} or via the appointments block on POST /v1/shipper/shipment. */
|
|
856
|
+
AppointmentRequirementRequest: {
|
|
857
|
+
/**
|
|
858
|
+
* @description How the appointment is scheduled
|
|
859
|
+
* @example PORTAL
|
|
860
|
+
* @enum {string}
|
|
861
|
+
*/
|
|
862
|
+
channel: "PHONE" | "EMAIL" | "PORTAL";
|
|
863
|
+
/**
|
|
864
|
+
* @description Portal URL where the carrier will book the appointment. Required when channel == PORTAL, must be omitted otherwise.
|
|
865
|
+
* @example https://retaillink.example.com/scheduling
|
|
866
|
+
*/
|
|
867
|
+
portalUrl?: string;
|
|
868
|
+
/** @description Contacts the carrier can use to schedule the appointment */
|
|
869
|
+
contacts?: components["schemas"]["AppointmentContact"][];
|
|
870
|
+
/**
|
|
871
|
+
* @description Free-text instructions shown to the carrier. Max 2000 chars.
|
|
872
|
+
* @example Driver must check in at gate B. Lift gate required. Schedule via portal at least 24 hours in advance.
|
|
873
|
+
*/
|
|
874
|
+
instructions?: string;
|
|
875
|
+
/**
|
|
876
|
+
* @description Reference numbers (PO, customer pickup #, etc.) the carrier will be asked for. Max 10 entries, each max 64 chars.
|
|
877
|
+
* @example [
|
|
878
|
+
* "81CRR",
|
|
879
|
+
* "DOCK-12"
|
|
880
|
+
* ]
|
|
881
|
+
*/
|
|
882
|
+
referenceNumbers?: string[];
|
|
883
|
+
/**
|
|
884
|
+
* Format: int32
|
|
885
|
+
* @description Minimum advance notice (in hours) the receiver requires. 0–168.
|
|
886
|
+
* @example 24
|
|
887
|
+
*/
|
|
888
|
+
leadTimeHours?: number;
|
|
889
|
+
};
|
|
890
|
+
/** @description The effective (merged) appointment requirement for one stop, with per-field provenance in the _merged diagnostic. */
|
|
891
|
+
AppointmentRequirementResponse: {
|
|
892
|
+
/**
|
|
893
|
+
* @description Channel for booking the appointment
|
|
894
|
+
* @enum {string}
|
|
895
|
+
*/
|
|
896
|
+
channel?: "PHONE" | "EMAIL" | "PORTAL";
|
|
897
|
+
/** @description Portal URL when channel is PORTAL */
|
|
898
|
+
portalUrl?: string;
|
|
899
|
+
/** @description Contacts the carrier can use */
|
|
900
|
+
contacts?: components["schemas"]["AppointmentContact"][];
|
|
901
|
+
/** @description Free-text instructions */
|
|
902
|
+
instructions?: string;
|
|
903
|
+
/** @description Reference numbers */
|
|
904
|
+
referenceNumbers?: string[];
|
|
905
|
+
/**
|
|
906
|
+
* Format: int32
|
|
907
|
+
* @description Minimum advance notice in hours
|
|
908
|
+
*/
|
|
909
|
+
leadTimeHours?: number;
|
|
910
|
+
/** @description Whether the merged effective appointmentRequired is true (OR of place-level and order-level booleans). */
|
|
911
|
+
appointmentRequired?: boolean;
|
|
912
|
+
_merged?: components["schemas"]["MergedDiagnostic"];
|
|
913
|
+
};
|
|
914
|
+
/** @description Per-field provenance for the merged appointment requirement. Tells the caller whether each field came from the place-level default, the order-level override, both, or neither. */
|
|
915
|
+
MergedDiagnostic: {
|
|
916
|
+
/** @description Map of field name -> source. Field names: channel, portalUrl, contacts, instructions, referenceNumbers, leadTimeHours. Values: PLACE | ORDER | PLACE_AND_ORDER | NONE. */
|
|
917
|
+
fields?: {
|
|
918
|
+
[key: string]: "PLACE" | "ORDER" | "PLACE_AND_ORDER" | "NONE";
|
|
919
|
+
};
|
|
920
|
+
};
|
|
758
921
|
/** @description GPS coordinates for a shipment event */
|
|
759
922
|
EventCoordinates: {
|
|
760
923
|
/**
|
|
@@ -1448,6 +1611,11 @@ interface components {
|
|
|
1448
1611
|
*/
|
|
1449
1612
|
callAheadRequired?: boolean;
|
|
1450
1613
|
};
|
|
1614
|
+
/** @description Optional inline-on-create block on POST /v1/shipper/shipment. Each entry is the AppointmentRequirementRequest for the corresponding stop, applied only if that address has appointmentRequired=true. */
|
|
1615
|
+
AppointmentsBlock: {
|
|
1616
|
+
pickup?: components["schemas"]["AppointmentRequirementRequest"];
|
|
1617
|
+
delivery?: components["schemas"]["AppointmentRequirementRequest"];
|
|
1618
|
+
};
|
|
1451
1619
|
/** @description Request to create a new shipment */
|
|
1452
1620
|
CreateShipmentRequest: {
|
|
1453
1621
|
/**
|
|
@@ -1470,8 +1638,8 @@ interface components {
|
|
|
1470
1638
|
*/
|
|
1471
1639
|
poNumber?: string;
|
|
1472
1640
|
/**
|
|
1473
|
-
* @description
|
|
1474
|
-
* @example
|
|
1641
|
+
* @description Your reference number for this shipment (typically your Bill of Lading number). Prints on partner-branded BOLs alongside the Oway order number.
|
|
1642
|
+
* @example BOL-2026-04129
|
|
1475
1643
|
*/
|
|
1476
1644
|
refNumber?: string;
|
|
1477
1645
|
/**
|
|
@@ -1486,6 +1654,7 @@ interface components {
|
|
|
1486
1654
|
* @example 2024-12-26T17:00:00Z
|
|
1487
1655
|
*/
|
|
1488
1656
|
requiredDeliveryBy?: string;
|
|
1657
|
+
appointments?: components["schemas"]["AppointmentsBlock"];
|
|
1489
1658
|
};
|
|
1490
1659
|
/** @description Pallet dimensions in inches. All fields optional: if any are omitted the entire dimensions object is treated as missing and the API default of 40 x 48 x 60 in. (length x width x height) is applied. */
|
|
1491
1660
|
Dimensions: {
|
|
@@ -1533,6 +1702,70 @@ interface components {
|
|
|
1533
1702
|
*/
|
|
1534
1703
|
palletDimensions?: number[];
|
|
1535
1704
|
dimensions?: components["schemas"]["Dimensions"];
|
|
1705
|
+
/**
|
|
1706
|
+
* @description Per-component freight description (e.g. NMFC item name)
|
|
1707
|
+
* @example Stone NOI
|
|
1708
|
+
*/
|
|
1709
|
+
description?: string;
|
|
1710
|
+
/**
|
|
1711
|
+
* @description NMFC commodity code for this component
|
|
1712
|
+
* @example 90500-04
|
|
1713
|
+
*/
|
|
1714
|
+
nmfcCode?: string;
|
|
1715
|
+
/**
|
|
1716
|
+
* @description Packaging type for this component (e.g. Pallets, Boxes, Crates)
|
|
1717
|
+
* @example Pallets
|
|
1718
|
+
*/
|
|
1719
|
+
packagingType?: string;
|
|
1720
|
+
/**
|
|
1721
|
+
* Format: int32
|
|
1722
|
+
* @description Number of pieces (loose items) in this component, distinct from pallet count
|
|
1723
|
+
* @example 0
|
|
1724
|
+
*/
|
|
1725
|
+
pieceCount?: number;
|
|
1726
|
+
};
|
|
1727
|
+
/** @description Metadata for an uploaded appointment supporting document. */
|
|
1728
|
+
AppointmentDocumentResponse: {
|
|
1729
|
+
/**
|
|
1730
|
+
* @description Document ID
|
|
1731
|
+
* @example 65f1a2b3c4d5e6f7a8b9c0d1
|
|
1732
|
+
*/
|
|
1733
|
+
id?: string;
|
|
1734
|
+
/**
|
|
1735
|
+
* @description Stop the document is attached to
|
|
1736
|
+
* @example DELIVERY
|
|
1737
|
+
* @enum {string}
|
|
1738
|
+
*/
|
|
1739
|
+
stop?: "PICKUP" | "DELIVERY";
|
|
1740
|
+
/**
|
|
1741
|
+
* @description Document type
|
|
1742
|
+
* @example PACKING_SLIP
|
|
1743
|
+
* @enum {string}
|
|
1744
|
+
*/
|
|
1745
|
+
type?: "PACKING_SLIP" | "CUSTOMER_BOL" | "APPOINTMENT_DOCUMENT";
|
|
1746
|
+
/**
|
|
1747
|
+
* @description Original filename (renamed to .pdf if needed)
|
|
1748
|
+
* @example packing-slip.pdf
|
|
1749
|
+
*/
|
|
1750
|
+
filename?: string;
|
|
1751
|
+
/**
|
|
1752
|
+
* Format: int64
|
|
1753
|
+
* @description Size in bytes after storage (images converted to PDF)
|
|
1754
|
+
* @example 1245678
|
|
1755
|
+
*/
|
|
1756
|
+
sizeBytes?: number;
|
|
1757
|
+
/**
|
|
1758
|
+
* @description Stored content type (always application/pdf)
|
|
1759
|
+
* @example application/pdf
|
|
1760
|
+
*/
|
|
1761
|
+
contentType?: string;
|
|
1762
|
+
/**
|
|
1763
|
+
* Format: date-time
|
|
1764
|
+
* @description Upload timestamp
|
|
1765
|
+
*/
|
|
1766
|
+
uploadedAt?: string;
|
|
1767
|
+
/** @description User ID that performed the upload */
|
|
1768
|
+
uploadedBy?: string;
|
|
1536
1769
|
};
|
|
1537
1770
|
/** @description Request to generate a shipping quote. Quotes are valid for 2 days from creation. */
|
|
1538
1771
|
QuoteRequest: {
|
|
@@ -1807,19 +2040,6 @@ interface components {
|
|
|
1807
2040
|
*/
|
|
1808
2041
|
clientSecret: string;
|
|
1809
2042
|
};
|
|
1810
|
-
/** @description Error response for token requests */
|
|
1811
|
-
TokenErrorResponse: {
|
|
1812
|
-
/**
|
|
1813
|
-
* @description Error code
|
|
1814
|
-
* @example invalid_client
|
|
1815
|
-
*/
|
|
1816
|
-
error?: string;
|
|
1817
|
-
/**
|
|
1818
|
-
* @description Human-readable error description
|
|
1819
|
-
* @example Invalid client credentials
|
|
1820
|
-
*/
|
|
1821
|
-
errorDescription?: string;
|
|
1822
|
-
};
|
|
1823
2043
|
/** @description Successful token response */
|
|
1824
2044
|
TokenResponse: {
|
|
1825
2045
|
/**
|
|
@@ -1839,6 +2059,19 @@ interface components {
|
|
|
1839
2059
|
*/
|
|
1840
2060
|
expiresIn?: number;
|
|
1841
2061
|
};
|
|
2062
|
+
/** @description Error response for token requests */
|
|
2063
|
+
TokenErrorResponse: {
|
|
2064
|
+
/**
|
|
2065
|
+
* @description Error code
|
|
2066
|
+
* @example invalid_client
|
|
2067
|
+
*/
|
|
2068
|
+
error?: string;
|
|
2069
|
+
/**
|
|
2070
|
+
* @description Human-readable error description
|
|
2071
|
+
* @example Invalid client credentials
|
|
2072
|
+
*/
|
|
2073
|
+
errorDescription?: string;
|
|
2074
|
+
};
|
|
1842
2075
|
/** @description Shipment tracking information */
|
|
1843
2076
|
Tracking: {
|
|
1844
2077
|
/**
|
|
@@ -2232,6 +2465,102 @@ interface operations {
|
|
|
2232
2465
|
};
|
|
2233
2466
|
};
|
|
2234
2467
|
};
|
|
2468
|
+
getAppointment: {
|
|
2469
|
+
parameters: {
|
|
2470
|
+
query?: never;
|
|
2471
|
+
header?: never;
|
|
2472
|
+
path: {
|
|
2473
|
+
/**
|
|
2474
|
+
* @description Order number (PRO)
|
|
2475
|
+
* @example ZKYQ5
|
|
2476
|
+
*/
|
|
2477
|
+
orderNumber: string;
|
|
2478
|
+
/** @description pickup | delivery */
|
|
2479
|
+
stop: "PICKUP" | "DELIVERY";
|
|
2480
|
+
};
|
|
2481
|
+
cookie?: never;
|
|
2482
|
+
};
|
|
2483
|
+
requestBody?: never;
|
|
2484
|
+
responses: {
|
|
2485
|
+
/** @description Merged appointment requirement. Fields are null when neither place nor order has data for that field; `_merged` is always present and shows source of each field. */
|
|
2486
|
+
200: {
|
|
2487
|
+
headers: {
|
|
2488
|
+
[name: string]: unknown;
|
|
2489
|
+
};
|
|
2490
|
+
content: {
|
|
2491
|
+
"application/json": components["schemas"]["AppointmentRequirementResponse"];
|
|
2492
|
+
};
|
|
2493
|
+
};
|
|
2494
|
+
/** @description Order does not exist or does not belong to your company. */
|
|
2495
|
+
404: {
|
|
2496
|
+
headers: {
|
|
2497
|
+
[name: string]: unknown;
|
|
2498
|
+
};
|
|
2499
|
+
content: {
|
|
2500
|
+
"application/json": components["schemas"]["ProblemDetail"];
|
|
2501
|
+
};
|
|
2502
|
+
};
|
|
2503
|
+
};
|
|
2504
|
+
};
|
|
2505
|
+
upsertAppointment: {
|
|
2506
|
+
parameters: {
|
|
2507
|
+
query?: never;
|
|
2508
|
+
header?: never;
|
|
2509
|
+
path: {
|
|
2510
|
+
/**
|
|
2511
|
+
* @description Order number (PRO)
|
|
2512
|
+
* @example ZKYQ5
|
|
2513
|
+
*/
|
|
2514
|
+
orderNumber: string;
|
|
2515
|
+
/** @description pickup | delivery */
|
|
2516
|
+
stop: "PICKUP" | "DELIVERY";
|
|
2517
|
+
};
|
|
2518
|
+
cookie?: never;
|
|
2519
|
+
};
|
|
2520
|
+
requestBody: {
|
|
2521
|
+
content: {
|
|
2522
|
+
"application/json": components["schemas"]["AppointmentRequirementRequest"];
|
|
2523
|
+
};
|
|
2524
|
+
};
|
|
2525
|
+
responses: {
|
|
2526
|
+
/** @description Appointment requirement upserted; body is the merged effective requirement. */
|
|
2527
|
+
200: {
|
|
2528
|
+
headers: {
|
|
2529
|
+
[name: string]: unknown;
|
|
2530
|
+
};
|
|
2531
|
+
content: {
|
|
2532
|
+
"application/json": components["schemas"]["AppointmentRequirementResponse"];
|
|
2533
|
+
};
|
|
2534
|
+
};
|
|
2535
|
+
/** @description Validation failure. Response body's `violations[]` lists field paths and reasons. */
|
|
2536
|
+
400: {
|
|
2537
|
+
headers: {
|
|
2538
|
+
[name: string]: unknown;
|
|
2539
|
+
};
|
|
2540
|
+
content: {
|
|
2541
|
+
"application/json": components["schemas"]["ProblemDetail"];
|
|
2542
|
+
};
|
|
2543
|
+
};
|
|
2544
|
+
/** @description Order does not exist or does not belong to your company. */
|
|
2545
|
+
404: {
|
|
2546
|
+
headers: {
|
|
2547
|
+
[name: string]: unknown;
|
|
2548
|
+
};
|
|
2549
|
+
content: {
|
|
2550
|
+
"application/json": components["schemas"]["ProblemDetail"];
|
|
2551
|
+
};
|
|
2552
|
+
};
|
|
2553
|
+
/** @description Order has reached ACCEPTED; appointment data is locked. Contact help@oway.io for changes. */
|
|
2554
|
+
409: {
|
|
2555
|
+
headers: {
|
|
2556
|
+
[name: string]: unknown;
|
|
2557
|
+
};
|
|
2558
|
+
content: {
|
|
2559
|
+
"application/json": components["schemas"]["ProblemDetail"];
|
|
2560
|
+
};
|
|
2561
|
+
};
|
|
2562
|
+
};
|
|
2563
|
+
};
|
|
2235
2564
|
confirmPickup: {
|
|
2236
2565
|
parameters: {
|
|
2237
2566
|
query?: never;
|
|
@@ -2717,7 +3046,10 @@ interface operations {
|
|
|
2717
3046
|
createShipment: {
|
|
2718
3047
|
parameters: {
|
|
2719
3048
|
query?: never;
|
|
2720
|
-
header?:
|
|
3049
|
+
header?: {
|
|
3050
|
+
/** @description Optional idempotency key. Retrying the same request with the same key within 24h returns the original response without creating a second shipment. Reusing the key with a different body returns 409 idempotency_key_conflict. */
|
|
3051
|
+
"Idempotency-Key"?: string;
|
|
3052
|
+
};
|
|
2721
3053
|
path?: never;
|
|
2722
3054
|
cookie?: never;
|
|
2723
3055
|
};
|
|
@@ -2789,6 +3121,128 @@ interface operations {
|
|
|
2789
3121
|
};
|
|
2790
3122
|
};
|
|
2791
3123
|
};
|
|
3124
|
+
uploadDocument: {
|
|
3125
|
+
parameters: {
|
|
3126
|
+
query?: never;
|
|
3127
|
+
header?: never;
|
|
3128
|
+
path: {
|
|
3129
|
+
/**
|
|
3130
|
+
* @description Order number (PRO)
|
|
3131
|
+
* @example ZKYQ5
|
|
3132
|
+
*/
|
|
3133
|
+
orderNumber: string;
|
|
3134
|
+
/** @description pickup | delivery */
|
|
3135
|
+
stop: "PICKUP" | "DELIVERY";
|
|
3136
|
+
/** @description Document type: PACKING_SLIP or CUSTOMER_BOL */
|
|
3137
|
+
documentType: "PACKING_SLIP" | "CUSTOMER_BOL" | "APPOINTMENT_DOCUMENT";
|
|
3138
|
+
};
|
|
3139
|
+
cookie?: never;
|
|
3140
|
+
};
|
|
3141
|
+
requestBody?: {
|
|
3142
|
+
content: {
|
|
3143
|
+
"multipart/form-data": {
|
|
3144
|
+
/** Format: binary */
|
|
3145
|
+
file: string;
|
|
3146
|
+
};
|
|
3147
|
+
};
|
|
3148
|
+
};
|
|
3149
|
+
responses: {
|
|
3150
|
+
/** @description Document uploaded; body is the persisted document metadata. */
|
|
3151
|
+
200: {
|
|
3152
|
+
headers: {
|
|
3153
|
+
[name: string]: unknown;
|
|
3154
|
+
};
|
|
3155
|
+
content: {
|
|
3156
|
+
"application/json": components["schemas"]["AppointmentDocumentResponse"];
|
|
3157
|
+
};
|
|
3158
|
+
};
|
|
3159
|
+
/** @description Bad request. Includes attempts to upload APPOINTMENT_DOCUMENT (reason: appointment_document_not_user_uploadable). */
|
|
3160
|
+
400: {
|
|
3161
|
+
headers: {
|
|
3162
|
+
[name: string]: unknown;
|
|
3163
|
+
};
|
|
3164
|
+
content: {
|
|
3165
|
+
"application/json": components["schemas"]["ProblemDetail"];
|
|
3166
|
+
};
|
|
3167
|
+
};
|
|
3168
|
+
/** @description Order does not exist or does not belong to your company. */
|
|
3169
|
+
404: {
|
|
3170
|
+
headers: {
|
|
3171
|
+
[name: string]: unknown;
|
|
3172
|
+
};
|
|
3173
|
+
content: {
|
|
3174
|
+
"application/json": components["schemas"]["ProblemDetail"];
|
|
3175
|
+
};
|
|
3176
|
+
};
|
|
3177
|
+
/** @description Order is past ACCEPTED; appointment data is locked. */
|
|
3178
|
+
409: {
|
|
3179
|
+
headers: {
|
|
3180
|
+
[name: string]: unknown;
|
|
3181
|
+
};
|
|
3182
|
+
content: {
|
|
3183
|
+
"application/json": components["schemas"]["ProblemDetail"];
|
|
3184
|
+
};
|
|
3185
|
+
};
|
|
3186
|
+
/** @description File exceeds the 10 MB upload limit. */
|
|
3187
|
+
413: {
|
|
3188
|
+
headers: {
|
|
3189
|
+
[name: string]: unknown;
|
|
3190
|
+
};
|
|
3191
|
+
content: {
|
|
3192
|
+
"application/json": components["schemas"]["ProblemDetail"];
|
|
3193
|
+
};
|
|
3194
|
+
};
|
|
3195
|
+
/** @description Unsupported content type. Allowed: application/pdf, image/jpeg, image/png. */
|
|
3196
|
+
415: {
|
|
3197
|
+
headers: {
|
|
3198
|
+
[name: string]: unknown;
|
|
3199
|
+
};
|
|
3200
|
+
content: {
|
|
3201
|
+
"application/json": components["schemas"]["ProblemDetail"];
|
|
3202
|
+
};
|
|
3203
|
+
};
|
|
3204
|
+
};
|
|
3205
|
+
};
|
|
3206
|
+
deleteDocument: {
|
|
3207
|
+
parameters: {
|
|
3208
|
+
query?: never;
|
|
3209
|
+
header?: never;
|
|
3210
|
+
path: {
|
|
3211
|
+
orderNumber: string;
|
|
3212
|
+
stop: "PICKUP" | "DELIVERY";
|
|
3213
|
+
documentType: "PACKING_SLIP" | "CUSTOMER_BOL" | "APPOINTMENT_DOCUMENT";
|
|
3214
|
+
};
|
|
3215
|
+
cookie?: never;
|
|
3216
|
+
};
|
|
3217
|
+
requestBody?: never;
|
|
3218
|
+
responses: {
|
|
3219
|
+
/** @description Deleted (or no-op when absent). */
|
|
3220
|
+
204: {
|
|
3221
|
+
headers: {
|
|
3222
|
+
[name: string]: unknown;
|
|
3223
|
+
};
|
|
3224
|
+
content?: never;
|
|
3225
|
+
};
|
|
3226
|
+
/** @description Order does not exist or does not belong to your company. */
|
|
3227
|
+
404: {
|
|
3228
|
+
headers: {
|
|
3229
|
+
[name: string]: unknown;
|
|
3230
|
+
};
|
|
3231
|
+
content: {
|
|
3232
|
+
"*/*": components["schemas"]["ProblemDetail"];
|
|
3233
|
+
};
|
|
3234
|
+
};
|
|
3235
|
+
/** @description Order is past ACCEPTED; appointment data is locked. */
|
|
3236
|
+
409: {
|
|
3237
|
+
headers: {
|
|
3238
|
+
[name: string]: unknown;
|
|
3239
|
+
};
|
|
3240
|
+
content: {
|
|
3241
|
+
"*/*": components["schemas"]["ProblemDetail"];
|
|
3242
|
+
};
|
|
3243
|
+
};
|
|
3244
|
+
};
|
|
3245
|
+
};
|
|
2792
3246
|
requestQuote: {
|
|
2793
3247
|
parameters: {
|
|
2794
3248
|
query?: never;
|
|
@@ -3477,6 +3931,30 @@ interface operations {
|
|
|
3477
3931
|
};
|
|
3478
3932
|
};
|
|
3479
3933
|
};
|
|
3934
|
+
getAppointmentPdf: {
|
|
3935
|
+
parameters: {
|
|
3936
|
+
query?: never;
|
|
3937
|
+
header?: never;
|
|
3938
|
+
path: {
|
|
3939
|
+
orderNumber: string;
|
|
3940
|
+
stop: "PICKUP" | "DELIVERY";
|
|
3941
|
+
};
|
|
3942
|
+
cookie?: never;
|
|
3943
|
+
};
|
|
3944
|
+
requestBody?: never;
|
|
3945
|
+
responses: {
|
|
3946
|
+
/** @description PDF not generated. Phase 1 always returns this; Phase 2 will return the PDF when available. */
|
|
3947
|
+
404: {
|
|
3948
|
+
headers: {
|
|
3949
|
+
[name: string]: unknown;
|
|
3950
|
+
};
|
|
3951
|
+
content: {
|
|
3952
|
+
"application/pdf": components["schemas"]["ProblemDetail"];
|
|
3953
|
+
"application/json": components["schemas"]["ProblemDetail"];
|
|
3954
|
+
};
|
|
3955
|
+
};
|
|
3956
|
+
};
|
|
3957
|
+
};
|
|
3480
3958
|
getQuote: {
|
|
3481
3959
|
parameters: {
|
|
3482
3960
|
query?: never;
|
package/dist/index.d.ts
CHANGED
|
@@ -79,6 +79,32 @@ interface paths {
|
|
|
79
79
|
patch?: never;
|
|
80
80
|
trace?: never;
|
|
81
81
|
};
|
|
82
|
+
"/v1/shipper/shipment/{orderNumber}/appointment/{stop}": {
|
|
83
|
+
parameters: {
|
|
84
|
+
query?: never;
|
|
85
|
+
header?: never;
|
|
86
|
+
path?: never;
|
|
87
|
+
cookie?: never;
|
|
88
|
+
};
|
|
89
|
+
/**
|
|
90
|
+
* Read merged appointment requirement for a stop
|
|
91
|
+
* @description Returns the effective AppointmentRequirement for one stop, computed as the merge of the place-level default and the order-level override using a "more-strict wins" rule. The `_merged` diagnostic block in the response shows per-field provenance (PLACE | ORDER | PLACE_AND_ORDER | NONE).
|
|
92
|
+
*/
|
|
93
|
+
get: operations["getAppointment"];
|
|
94
|
+
/**
|
|
95
|
+
* Upsert appointment requirement for a stop
|
|
96
|
+
* @description Idempotent upsert of the order-level AppointmentRequirement for one stop (pickup or delivery). The full provided requirement replaces any prior value. Returns the merged effective requirement (place-level default + this order-level override) with a per-field provenance diagnostic.
|
|
97
|
+
*
|
|
98
|
+
* Mutability: writes are accepted until the order reaches ACCEPTED. Writes against ACCEPTED+ orders return 409 order_accepted_appointment_locked.
|
|
99
|
+
*/
|
|
100
|
+
put: operations["upsertAppointment"];
|
|
101
|
+
post?: never;
|
|
102
|
+
delete?: never;
|
|
103
|
+
options?: never;
|
|
104
|
+
head?: never;
|
|
105
|
+
patch?: never;
|
|
106
|
+
trace?: never;
|
|
107
|
+
};
|
|
82
108
|
"/v1/carrier/shipments/{identifier}/pickup": {
|
|
83
109
|
parameters: {
|
|
84
110
|
query?: never;
|
|
@@ -243,6 +269,34 @@ interface paths {
|
|
|
243
269
|
patch?: never;
|
|
244
270
|
trace?: never;
|
|
245
271
|
};
|
|
272
|
+
"/v1/shipper/shipment/{orderNumber}/appointment/{stop}/document/{documentType}": {
|
|
273
|
+
parameters: {
|
|
274
|
+
query?: never;
|
|
275
|
+
header?: never;
|
|
276
|
+
path?: never;
|
|
277
|
+
cookie?: never;
|
|
278
|
+
};
|
|
279
|
+
get?: never;
|
|
280
|
+
put?: never;
|
|
281
|
+
/**
|
|
282
|
+
* Upload a supporting document for an appointment
|
|
283
|
+
* @description Multipart upload of a supporting document for one stop on an order. Allowed content types: application/pdf, image/jpeg, image/png. Images are wrapped to single-page PDF on upload. Max size 10 MB. Replaces any existing document of the same (stop, type).
|
|
284
|
+
*
|
|
285
|
+
* documentType must be one of: PACKING_SLIP, CUSTOMER_BOL. APPOINTMENT_DOCUMENT is system-only and returns 400 if attempted.
|
|
286
|
+
*
|
|
287
|
+
* Mutability: writes against an order past ACCEPTED return 409 order_accepted_appointment_locked.
|
|
288
|
+
*/
|
|
289
|
+
post: operations["uploadDocument"];
|
|
290
|
+
/**
|
|
291
|
+
* Delete a supporting document for an appointment
|
|
292
|
+
* @description Idempotent delete. Returns 204 whether or not the document existed.
|
|
293
|
+
*/
|
|
294
|
+
delete: operations["deleteDocument"];
|
|
295
|
+
options?: never;
|
|
296
|
+
head?: never;
|
|
297
|
+
patch?: never;
|
|
298
|
+
trace?: never;
|
|
299
|
+
};
|
|
246
300
|
"/v1/shipper/quote": {
|
|
247
301
|
parameters: {
|
|
248
302
|
query?: never;
|
|
@@ -476,6 +530,26 @@ interface paths {
|
|
|
476
530
|
patch?: never;
|
|
477
531
|
trace?: never;
|
|
478
532
|
};
|
|
533
|
+
"/v1/shipper/shipment/{orderNumber}/appointment/{stop}/pdf": {
|
|
534
|
+
parameters: {
|
|
535
|
+
query?: never;
|
|
536
|
+
header?: never;
|
|
537
|
+
path?: never;
|
|
538
|
+
cookie?: never;
|
|
539
|
+
};
|
|
540
|
+
/**
|
|
541
|
+
* Read generated appointment PDF (Phase 2)
|
|
542
|
+
* @description Returns the generated appointment PDF snapshot for one stop. Phase 1: always returns 404. The PDF doesn't exist until Phase 2 wires up generation at carrier acceptance. The endpoint is defined now to lock the URL contract.
|
|
543
|
+
*/
|
|
544
|
+
get: operations["getAppointmentPdf"];
|
|
545
|
+
put?: never;
|
|
546
|
+
post?: never;
|
|
547
|
+
delete?: never;
|
|
548
|
+
options?: never;
|
|
549
|
+
head?: never;
|
|
550
|
+
patch?: never;
|
|
551
|
+
trace?: never;
|
|
552
|
+
};
|
|
479
553
|
"/v1/shipper/quote/{quoteId}": {
|
|
480
554
|
parameters: {
|
|
481
555
|
query?: never;
|
|
@@ -755,6 +829,95 @@ interface components {
|
|
|
755
829
|
*/
|
|
756
830
|
updatedAt?: string;
|
|
757
831
|
};
|
|
832
|
+
/** @description A single contact for the appointment. At least one of email or phone must be present. */
|
|
833
|
+
AppointmentContact: {
|
|
834
|
+
/**
|
|
835
|
+
* @description Contact name
|
|
836
|
+
* @example Maria Lopez
|
|
837
|
+
*/
|
|
838
|
+
name: string;
|
|
839
|
+
/**
|
|
840
|
+
* @description Email address
|
|
841
|
+
* @example maria@aqua.com
|
|
842
|
+
*/
|
|
843
|
+
email?: string;
|
|
844
|
+
/**
|
|
845
|
+
* @description Phone in E.164 format
|
|
846
|
+
* @example +15555550101
|
|
847
|
+
*/
|
|
848
|
+
phone?: string;
|
|
849
|
+
/**
|
|
850
|
+
* @description Role of the contact at the facility
|
|
851
|
+
* @example Warehouse Manager
|
|
852
|
+
*/
|
|
853
|
+
role?: string;
|
|
854
|
+
};
|
|
855
|
+
/** @description Structured appointment metadata for a single stop on an order. Sent on PUT /v1/shipper/shipment/{orderNumber}/appointment/{stop} or via the appointments block on POST /v1/shipper/shipment. */
|
|
856
|
+
AppointmentRequirementRequest: {
|
|
857
|
+
/**
|
|
858
|
+
* @description How the appointment is scheduled
|
|
859
|
+
* @example PORTAL
|
|
860
|
+
* @enum {string}
|
|
861
|
+
*/
|
|
862
|
+
channel: "PHONE" | "EMAIL" | "PORTAL";
|
|
863
|
+
/**
|
|
864
|
+
* @description Portal URL where the carrier will book the appointment. Required when channel == PORTAL, must be omitted otherwise.
|
|
865
|
+
* @example https://retaillink.example.com/scheduling
|
|
866
|
+
*/
|
|
867
|
+
portalUrl?: string;
|
|
868
|
+
/** @description Contacts the carrier can use to schedule the appointment */
|
|
869
|
+
contacts?: components["schemas"]["AppointmentContact"][];
|
|
870
|
+
/**
|
|
871
|
+
* @description Free-text instructions shown to the carrier. Max 2000 chars.
|
|
872
|
+
* @example Driver must check in at gate B. Lift gate required. Schedule via portal at least 24 hours in advance.
|
|
873
|
+
*/
|
|
874
|
+
instructions?: string;
|
|
875
|
+
/**
|
|
876
|
+
* @description Reference numbers (PO, customer pickup #, etc.) the carrier will be asked for. Max 10 entries, each max 64 chars.
|
|
877
|
+
* @example [
|
|
878
|
+
* "81CRR",
|
|
879
|
+
* "DOCK-12"
|
|
880
|
+
* ]
|
|
881
|
+
*/
|
|
882
|
+
referenceNumbers?: string[];
|
|
883
|
+
/**
|
|
884
|
+
* Format: int32
|
|
885
|
+
* @description Minimum advance notice (in hours) the receiver requires. 0–168.
|
|
886
|
+
* @example 24
|
|
887
|
+
*/
|
|
888
|
+
leadTimeHours?: number;
|
|
889
|
+
};
|
|
890
|
+
/** @description The effective (merged) appointment requirement for one stop, with per-field provenance in the _merged diagnostic. */
|
|
891
|
+
AppointmentRequirementResponse: {
|
|
892
|
+
/**
|
|
893
|
+
* @description Channel for booking the appointment
|
|
894
|
+
* @enum {string}
|
|
895
|
+
*/
|
|
896
|
+
channel?: "PHONE" | "EMAIL" | "PORTAL";
|
|
897
|
+
/** @description Portal URL when channel is PORTAL */
|
|
898
|
+
portalUrl?: string;
|
|
899
|
+
/** @description Contacts the carrier can use */
|
|
900
|
+
contacts?: components["schemas"]["AppointmentContact"][];
|
|
901
|
+
/** @description Free-text instructions */
|
|
902
|
+
instructions?: string;
|
|
903
|
+
/** @description Reference numbers */
|
|
904
|
+
referenceNumbers?: string[];
|
|
905
|
+
/**
|
|
906
|
+
* Format: int32
|
|
907
|
+
* @description Minimum advance notice in hours
|
|
908
|
+
*/
|
|
909
|
+
leadTimeHours?: number;
|
|
910
|
+
/** @description Whether the merged effective appointmentRequired is true (OR of place-level and order-level booleans). */
|
|
911
|
+
appointmentRequired?: boolean;
|
|
912
|
+
_merged?: components["schemas"]["MergedDiagnostic"];
|
|
913
|
+
};
|
|
914
|
+
/** @description Per-field provenance for the merged appointment requirement. Tells the caller whether each field came from the place-level default, the order-level override, both, or neither. */
|
|
915
|
+
MergedDiagnostic: {
|
|
916
|
+
/** @description Map of field name -> source. Field names: channel, portalUrl, contacts, instructions, referenceNumbers, leadTimeHours. Values: PLACE | ORDER | PLACE_AND_ORDER | NONE. */
|
|
917
|
+
fields?: {
|
|
918
|
+
[key: string]: "PLACE" | "ORDER" | "PLACE_AND_ORDER" | "NONE";
|
|
919
|
+
};
|
|
920
|
+
};
|
|
758
921
|
/** @description GPS coordinates for a shipment event */
|
|
759
922
|
EventCoordinates: {
|
|
760
923
|
/**
|
|
@@ -1448,6 +1611,11 @@ interface components {
|
|
|
1448
1611
|
*/
|
|
1449
1612
|
callAheadRequired?: boolean;
|
|
1450
1613
|
};
|
|
1614
|
+
/** @description Optional inline-on-create block on POST /v1/shipper/shipment. Each entry is the AppointmentRequirementRequest for the corresponding stop, applied only if that address has appointmentRequired=true. */
|
|
1615
|
+
AppointmentsBlock: {
|
|
1616
|
+
pickup?: components["schemas"]["AppointmentRequirementRequest"];
|
|
1617
|
+
delivery?: components["schemas"]["AppointmentRequirementRequest"];
|
|
1618
|
+
};
|
|
1451
1619
|
/** @description Request to create a new shipment */
|
|
1452
1620
|
CreateShipmentRequest: {
|
|
1453
1621
|
/**
|
|
@@ -1470,8 +1638,8 @@ interface components {
|
|
|
1470
1638
|
*/
|
|
1471
1639
|
poNumber?: string;
|
|
1472
1640
|
/**
|
|
1473
|
-
* @description
|
|
1474
|
-
* @example
|
|
1641
|
+
* @description Your reference number for this shipment (typically your Bill of Lading number). Prints on partner-branded BOLs alongside the Oway order number.
|
|
1642
|
+
* @example BOL-2026-04129
|
|
1475
1643
|
*/
|
|
1476
1644
|
refNumber?: string;
|
|
1477
1645
|
/**
|
|
@@ -1486,6 +1654,7 @@ interface components {
|
|
|
1486
1654
|
* @example 2024-12-26T17:00:00Z
|
|
1487
1655
|
*/
|
|
1488
1656
|
requiredDeliveryBy?: string;
|
|
1657
|
+
appointments?: components["schemas"]["AppointmentsBlock"];
|
|
1489
1658
|
};
|
|
1490
1659
|
/** @description Pallet dimensions in inches. All fields optional: if any are omitted the entire dimensions object is treated as missing and the API default of 40 x 48 x 60 in. (length x width x height) is applied. */
|
|
1491
1660
|
Dimensions: {
|
|
@@ -1533,6 +1702,70 @@ interface components {
|
|
|
1533
1702
|
*/
|
|
1534
1703
|
palletDimensions?: number[];
|
|
1535
1704
|
dimensions?: components["schemas"]["Dimensions"];
|
|
1705
|
+
/**
|
|
1706
|
+
* @description Per-component freight description (e.g. NMFC item name)
|
|
1707
|
+
* @example Stone NOI
|
|
1708
|
+
*/
|
|
1709
|
+
description?: string;
|
|
1710
|
+
/**
|
|
1711
|
+
* @description NMFC commodity code for this component
|
|
1712
|
+
* @example 90500-04
|
|
1713
|
+
*/
|
|
1714
|
+
nmfcCode?: string;
|
|
1715
|
+
/**
|
|
1716
|
+
* @description Packaging type for this component (e.g. Pallets, Boxes, Crates)
|
|
1717
|
+
* @example Pallets
|
|
1718
|
+
*/
|
|
1719
|
+
packagingType?: string;
|
|
1720
|
+
/**
|
|
1721
|
+
* Format: int32
|
|
1722
|
+
* @description Number of pieces (loose items) in this component, distinct from pallet count
|
|
1723
|
+
* @example 0
|
|
1724
|
+
*/
|
|
1725
|
+
pieceCount?: number;
|
|
1726
|
+
};
|
|
1727
|
+
/** @description Metadata for an uploaded appointment supporting document. */
|
|
1728
|
+
AppointmentDocumentResponse: {
|
|
1729
|
+
/**
|
|
1730
|
+
* @description Document ID
|
|
1731
|
+
* @example 65f1a2b3c4d5e6f7a8b9c0d1
|
|
1732
|
+
*/
|
|
1733
|
+
id?: string;
|
|
1734
|
+
/**
|
|
1735
|
+
* @description Stop the document is attached to
|
|
1736
|
+
* @example DELIVERY
|
|
1737
|
+
* @enum {string}
|
|
1738
|
+
*/
|
|
1739
|
+
stop?: "PICKUP" | "DELIVERY";
|
|
1740
|
+
/**
|
|
1741
|
+
* @description Document type
|
|
1742
|
+
* @example PACKING_SLIP
|
|
1743
|
+
* @enum {string}
|
|
1744
|
+
*/
|
|
1745
|
+
type?: "PACKING_SLIP" | "CUSTOMER_BOL" | "APPOINTMENT_DOCUMENT";
|
|
1746
|
+
/**
|
|
1747
|
+
* @description Original filename (renamed to .pdf if needed)
|
|
1748
|
+
* @example packing-slip.pdf
|
|
1749
|
+
*/
|
|
1750
|
+
filename?: string;
|
|
1751
|
+
/**
|
|
1752
|
+
* Format: int64
|
|
1753
|
+
* @description Size in bytes after storage (images converted to PDF)
|
|
1754
|
+
* @example 1245678
|
|
1755
|
+
*/
|
|
1756
|
+
sizeBytes?: number;
|
|
1757
|
+
/**
|
|
1758
|
+
* @description Stored content type (always application/pdf)
|
|
1759
|
+
* @example application/pdf
|
|
1760
|
+
*/
|
|
1761
|
+
contentType?: string;
|
|
1762
|
+
/**
|
|
1763
|
+
* Format: date-time
|
|
1764
|
+
* @description Upload timestamp
|
|
1765
|
+
*/
|
|
1766
|
+
uploadedAt?: string;
|
|
1767
|
+
/** @description User ID that performed the upload */
|
|
1768
|
+
uploadedBy?: string;
|
|
1536
1769
|
};
|
|
1537
1770
|
/** @description Request to generate a shipping quote. Quotes are valid for 2 days from creation. */
|
|
1538
1771
|
QuoteRequest: {
|
|
@@ -1807,19 +2040,6 @@ interface components {
|
|
|
1807
2040
|
*/
|
|
1808
2041
|
clientSecret: string;
|
|
1809
2042
|
};
|
|
1810
|
-
/** @description Error response for token requests */
|
|
1811
|
-
TokenErrorResponse: {
|
|
1812
|
-
/**
|
|
1813
|
-
* @description Error code
|
|
1814
|
-
* @example invalid_client
|
|
1815
|
-
*/
|
|
1816
|
-
error?: string;
|
|
1817
|
-
/**
|
|
1818
|
-
* @description Human-readable error description
|
|
1819
|
-
* @example Invalid client credentials
|
|
1820
|
-
*/
|
|
1821
|
-
errorDescription?: string;
|
|
1822
|
-
};
|
|
1823
2043
|
/** @description Successful token response */
|
|
1824
2044
|
TokenResponse: {
|
|
1825
2045
|
/**
|
|
@@ -1839,6 +2059,19 @@ interface components {
|
|
|
1839
2059
|
*/
|
|
1840
2060
|
expiresIn?: number;
|
|
1841
2061
|
};
|
|
2062
|
+
/** @description Error response for token requests */
|
|
2063
|
+
TokenErrorResponse: {
|
|
2064
|
+
/**
|
|
2065
|
+
* @description Error code
|
|
2066
|
+
* @example invalid_client
|
|
2067
|
+
*/
|
|
2068
|
+
error?: string;
|
|
2069
|
+
/**
|
|
2070
|
+
* @description Human-readable error description
|
|
2071
|
+
* @example Invalid client credentials
|
|
2072
|
+
*/
|
|
2073
|
+
errorDescription?: string;
|
|
2074
|
+
};
|
|
1842
2075
|
/** @description Shipment tracking information */
|
|
1843
2076
|
Tracking: {
|
|
1844
2077
|
/**
|
|
@@ -2232,6 +2465,102 @@ interface operations {
|
|
|
2232
2465
|
};
|
|
2233
2466
|
};
|
|
2234
2467
|
};
|
|
2468
|
+
getAppointment: {
|
|
2469
|
+
parameters: {
|
|
2470
|
+
query?: never;
|
|
2471
|
+
header?: never;
|
|
2472
|
+
path: {
|
|
2473
|
+
/**
|
|
2474
|
+
* @description Order number (PRO)
|
|
2475
|
+
* @example ZKYQ5
|
|
2476
|
+
*/
|
|
2477
|
+
orderNumber: string;
|
|
2478
|
+
/** @description pickup | delivery */
|
|
2479
|
+
stop: "PICKUP" | "DELIVERY";
|
|
2480
|
+
};
|
|
2481
|
+
cookie?: never;
|
|
2482
|
+
};
|
|
2483
|
+
requestBody?: never;
|
|
2484
|
+
responses: {
|
|
2485
|
+
/** @description Merged appointment requirement. Fields are null when neither place nor order has data for that field; `_merged` is always present and shows source of each field. */
|
|
2486
|
+
200: {
|
|
2487
|
+
headers: {
|
|
2488
|
+
[name: string]: unknown;
|
|
2489
|
+
};
|
|
2490
|
+
content: {
|
|
2491
|
+
"application/json": components["schemas"]["AppointmentRequirementResponse"];
|
|
2492
|
+
};
|
|
2493
|
+
};
|
|
2494
|
+
/** @description Order does not exist or does not belong to your company. */
|
|
2495
|
+
404: {
|
|
2496
|
+
headers: {
|
|
2497
|
+
[name: string]: unknown;
|
|
2498
|
+
};
|
|
2499
|
+
content: {
|
|
2500
|
+
"application/json": components["schemas"]["ProblemDetail"];
|
|
2501
|
+
};
|
|
2502
|
+
};
|
|
2503
|
+
};
|
|
2504
|
+
};
|
|
2505
|
+
upsertAppointment: {
|
|
2506
|
+
parameters: {
|
|
2507
|
+
query?: never;
|
|
2508
|
+
header?: never;
|
|
2509
|
+
path: {
|
|
2510
|
+
/**
|
|
2511
|
+
* @description Order number (PRO)
|
|
2512
|
+
* @example ZKYQ5
|
|
2513
|
+
*/
|
|
2514
|
+
orderNumber: string;
|
|
2515
|
+
/** @description pickup | delivery */
|
|
2516
|
+
stop: "PICKUP" | "DELIVERY";
|
|
2517
|
+
};
|
|
2518
|
+
cookie?: never;
|
|
2519
|
+
};
|
|
2520
|
+
requestBody: {
|
|
2521
|
+
content: {
|
|
2522
|
+
"application/json": components["schemas"]["AppointmentRequirementRequest"];
|
|
2523
|
+
};
|
|
2524
|
+
};
|
|
2525
|
+
responses: {
|
|
2526
|
+
/** @description Appointment requirement upserted; body is the merged effective requirement. */
|
|
2527
|
+
200: {
|
|
2528
|
+
headers: {
|
|
2529
|
+
[name: string]: unknown;
|
|
2530
|
+
};
|
|
2531
|
+
content: {
|
|
2532
|
+
"application/json": components["schemas"]["AppointmentRequirementResponse"];
|
|
2533
|
+
};
|
|
2534
|
+
};
|
|
2535
|
+
/** @description Validation failure. Response body's `violations[]` lists field paths and reasons. */
|
|
2536
|
+
400: {
|
|
2537
|
+
headers: {
|
|
2538
|
+
[name: string]: unknown;
|
|
2539
|
+
};
|
|
2540
|
+
content: {
|
|
2541
|
+
"application/json": components["schemas"]["ProblemDetail"];
|
|
2542
|
+
};
|
|
2543
|
+
};
|
|
2544
|
+
/** @description Order does not exist or does not belong to your company. */
|
|
2545
|
+
404: {
|
|
2546
|
+
headers: {
|
|
2547
|
+
[name: string]: unknown;
|
|
2548
|
+
};
|
|
2549
|
+
content: {
|
|
2550
|
+
"application/json": components["schemas"]["ProblemDetail"];
|
|
2551
|
+
};
|
|
2552
|
+
};
|
|
2553
|
+
/** @description Order has reached ACCEPTED; appointment data is locked. Contact help@oway.io for changes. */
|
|
2554
|
+
409: {
|
|
2555
|
+
headers: {
|
|
2556
|
+
[name: string]: unknown;
|
|
2557
|
+
};
|
|
2558
|
+
content: {
|
|
2559
|
+
"application/json": components["schemas"]["ProblemDetail"];
|
|
2560
|
+
};
|
|
2561
|
+
};
|
|
2562
|
+
};
|
|
2563
|
+
};
|
|
2235
2564
|
confirmPickup: {
|
|
2236
2565
|
parameters: {
|
|
2237
2566
|
query?: never;
|
|
@@ -2717,7 +3046,10 @@ interface operations {
|
|
|
2717
3046
|
createShipment: {
|
|
2718
3047
|
parameters: {
|
|
2719
3048
|
query?: never;
|
|
2720
|
-
header?:
|
|
3049
|
+
header?: {
|
|
3050
|
+
/** @description Optional idempotency key. Retrying the same request with the same key within 24h returns the original response without creating a second shipment. Reusing the key with a different body returns 409 idempotency_key_conflict. */
|
|
3051
|
+
"Idempotency-Key"?: string;
|
|
3052
|
+
};
|
|
2721
3053
|
path?: never;
|
|
2722
3054
|
cookie?: never;
|
|
2723
3055
|
};
|
|
@@ -2789,6 +3121,128 @@ interface operations {
|
|
|
2789
3121
|
};
|
|
2790
3122
|
};
|
|
2791
3123
|
};
|
|
3124
|
+
uploadDocument: {
|
|
3125
|
+
parameters: {
|
|
3126
|
+
query?: never;
|
|
3127
|
+
header?: never;
|
|
3128
|
+
path: {
|
|
3129
|
+
/**
|
|
3130
|
+
* @description Order number (PRO)
|
|
3131
|
+
* @example ZKYQ5
|
|
3132
|
+
*/
|
|
3133
|
+
orderNumber: string;
|
|
3134
|
+
/** @description pickup | delivery */
|
|
3135
|
+
stop: "PICKUP" | "DELIVERY";
|
|
3136
|
+
/** @description Document type: PACKING_SLIP or CUSTOMER_BOL */
|
|
3137
|
+
documentType: "PACKING_SLIP" | "CUSTOMER_BOL" | "APPOINTMENT_DOCUMENT";
|
|
3138
|
+
};
|
|
3139
|
+
cookie?: never;
|
|
3140
|
+
};
|
|
3141
|
+
requestBody?: {
|
|
3142
|
+
content: {
|
|
3143
|
+
"multipart/form-data": {
|
|
3144
|
+
/** Format: binary */
|
|
3145
|
+
file: string;
|
|
3146
|
+
};
|
|
3147
|
+
};
|
|
3148
|
+
};
|
|
3149
|
+
responses: {
|
|
3150
|
+
/** @description Document uploaded; body is the persisted document metadata. */
|
|
3151
|
+
200: {
|
|
3152
|
+
headers: {
|
|
3153
|
+
[name: string]: unknown;
|
|
3154
|
+
};
|
|
3155
|
+
content: {
|
|
3156
|
+
"application/json": components["schemas"]["AppointmentDocumentResponse"];
|
|
3157
|
+
};
|
|
3158
|
+
};
|
|
3159
|
+
/** @description Bad request. Includes attempts to upload APPOINTMENT_DOCUMENT (reason: appointment_document_not_user_uploadable). */
|
|
3160
|
+
400: {
|
|
3161
|
+
headers: {
|
|
3162
|
+
[name: string]: unknown;
|
|
3163
|
+
};
|
|
3164
|
+
content: {
|
|
3165
|
+
"application/json": components["schemas"]["ProblemDetail"];
|
|
3166
|
+
};
|
|
3167
|
+
};
|
|
3168
|
+
/** @description Order does not exist or does not belong to your company. */
|
|
3169
|
+
404: {
|
|
3170
|
+
headers: {
|
|
3171
|
+
[name: string]: unknown;
|
|
3172
|
+
};
|
|
3173
|
+
content: {
|
|
3174
|
+
"application/json": components["schemas"]["ProblemDetail"];
|
|
3175
|
+
};
|
|
3176
|
+
};
|
|
3177
|
+
/** @description Order is past ACCEPTED; appointment data is locked. */
|
|
3178
|
+
409: {
|
|
3179
|
+
headers: {
|
|
3180
|
+
[name: string]: unknown;
|
|
3181
|
+
};
|
|
3182
|
+
content: {
|
|
3183
|
+
"application/json": components["schemas"]["ProblemDetail"];
|
|
3184
|
+
};
|
|
3185
|
+
};
|
|
3186
|
+
/** @description File exceeds the 10 MB upload limit. */
|
|
3187
|
+
413: {
|
|
3188
|
+
headers: {
|
|
3189
|
+
[name: string]: unknown;
|
|
3190
|
+
};
|
|
3191
|
+
content: {
|
|
3192
|
+
"application/json": components["schemas"]["ProblemDetail"];
|
|
3193
|
+
};
|
|
3194
|
+
};
|
|
3195
|
+
/** @description Unsupported content type. Allowed: application/pdf, image/jpeg, image/png. */
|
|
3196
|
+
415: {
|
|
3197
|
+
headers: {
|
|
3198
|
+
[name: string]: unknown;
|
|
3199
|
+
};
|
|
3200
|
+
content: {
|
|
3201
|
+
"application/json": components["schemas"]["ProblemDetail"];
|
|
3202
|
+
};
|
|
3203
|
+
};
|
|
3204
|
+
};
|
|
3205
|
+
};
|
|
3206
|
+
deleteDocument: {
|
|
3207
|
+
parameters: {
|
|
3208
|
+
query?: never;
|
|
3209
|
+
header?: never;
|
|
3210
|
+
path: {
|
|
3211
|
+
orderNumber: string;
|
|
3212
|
+
stop: "PICKUP" | "DELIVERY";
|
|
3213
|
+
documentType: "PACKING_SLIP" | "CUSTOMER_BOL" | "APPOINTMENT_DOCUMENT";
|
|
3214
|
+
};
|
|
3215
|
+
cookie?: never;
|
|
3216
|
+
};
|
|
3217
|
+
requestBody?: never;
|
|
3218
|
+
responses: {
|
|
3219
|
+
/** @description Deleted (or no-op when absent). */
|
|
3220
|
+
204: {
|
|
3221
|
+
headers: {
|
|
3222
|
+
[name: string]: unknown;
|
|
3223
|
+
};
|
|
3224
|
+
content?: never;
|
|
3225
|
+
};
|
|
3226
|
+
/** @description Order does not exist or does not belong to your company. */
|
|
3227
|
+
404: {
|
|
3228
|
+
headers: {
|
|
3229
|
+
[name: string]: unknown;
|
|
3230
|
+
};
|
|
3231
|
+
content: {
|
|
3232
|
+
"*/*": components["schemas"]["ProblemDetail"];
|
|
3233
|
+
};
|
|
3234
|
+
};
|
|
3235
|
+
/** @description Order is past ACCEPTED; appointment data is locked. */
|
|
3236
|
+
409: {
|
|
3237
|
+
headers: {
|
|
3238
|
+
[name: string]: unknown;
|
|
3239
|
+
};
|
|
3240
|
+
content: {
|
|
3241
|
+
"*/*": components["schemas"]["ProblemDetail"];
|
|
3242
|
+
};
|
|
3243
|
+
};
|
|
3244
|
+
};
|
|
3245
|
+
};
|
|
2792
3246
|
requestQuote: {
|
|
2793
3247
|
parameters: {
|
|
2794
3248
|
query?: never;
|
|
@@ -3477,6 +3931,30 @@ interface operations {
|
|
|
3477
3931
|
};
|
|
3478
3932
|
};
|
|
3479
3933
|
};
|
|
3934
|
+
getAppointmentPdf: {
|
|
3935
|
+
parameters: {
|
|
3936
|
+
query?: never;
|
|
3937
|
+
header?: never;
|
|
3938
|
+
path: {
|
|
3939
|
+
orderNumber: string;
|
|
3940
|
+
stop: "PICKUP" | "DELIVERY";
|
|
3941
|
+
};
|
|
3942
|
+
cookie?: never;
|
|
3943
|
+
};
|
|
3944
|
+
requestBody?: never;
|
|
3945
|
+
responses: {
|
|
3946
|
+
/** @description PDF not generated. Phase 1 always returns this; Phase 2 will return the PDF when available. */
|
|
3947
|
+
404: {
|
|
3948
|
+
headers: {
|
|
3949
|
+
[name: string]: unknown;
|
|
3950
|
+
};
|
|
3951
|
+
content: {
|
|
3952
|
+
"application/pdf": components["schemas"]["ProblemDetail"];
|
|
3953
|
+
"application/json": components["schemas"]["ProblemDetail"];
|
|
3954
|
+
};
|
|
3955
|
+
};
|
|
3956
|
+
};
|
|
3957
|
+
};
|
|
3480
3958
|
getQuote: {
|
|
3481
3959
|
parameters: {
|
|
3482
3960
|
query?: never;
|