@shipengine/connect-fulfillment-provider-api 0.3.1 → 0.5.1
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/lib/app/fulfillment-provider-app-definition.d.ts +3 -3
- package/lib/app/fulfillment-provider-app-metadata.d.ts +8 -6
- package/lib/app/fulfillment-provider-app-metadata.js.map +1 -1
- package/lib/app/fulfillment-provider-app.js +2 -2
- package/lib/app/fulfillment-provider-app.js.map +1 -1
- package/lib/models/index.d.ts +1 -1
- package/lib/models/index.js +1 -1
- package/lib/models/index.js.map +1 -1
- package/lib/models/sales-order-fulfillments.d.ts +19 -0
- package/lib/{requests/get-fulfillment-request.js → models/sales-order-fulfillments.js} +1 -1
- package/lib/models/sales-order-fulfillments.js.map +1 -0
- package/lib/requests/{get-fulfillment-request.d.ts → get-fulfillments-request.d.ts} +1 -1
- package/lib/{responses/get-fulfillment-response.js → requests/get-fulfillments-request.js} +1 -1
- package/lib/requests/get-fulfillments-request.js.map +1 -0
- package/lib/requests/index.d.ts +1 -1
- package/lib/requests/index.js +1 -1
- package/lib/requests/index.js.map +1 -1
- package/lib/responses/get-fulfillments-response.d.ts +7 -0
- package/lib/{models/sales-order-status-change.js → responses/get-fulfillments-response.js} +1 -1
- package/lib/responses/get-fulfillments-response.js.map +1 -0
- package/lib/responses/get-recent-changes-response.d.ts +2 -2
- package/lib/responses/index.d.ts +1 -1
- package/lib/responses/index.js +1 -1
- package/lib/responses/index.js.map +1 -1
- package/package.json +1 -1
- package/spec.json +2806 -2666
- package/spec.yaml +194 -93
- package/tsconfig.tsbuildinfo +1 -1
- package/lib/models/sales-order-status-change.d.ts +0 -22
- package/lib/models/sales-order-status-change.js.map +0 -1
- package/lib/requests/get-fulfillment-request.js.map +0 -1
- package/lib/responses/get-fulfillment-response.d.ts +0 -8
- package/lib/responses/get-fulfillment-response.js.map +0 -1
package/spec.yaml
CHANGED
|
@@ -32,7 +32,8 @@ paths:
|
|
|
32
32
|
auth:
|
|
33
33
|
$ref: '#/components/schemas/Auth'
|
|
34
34
|
description: Contains form data for connecting to the app
|
|
35
|
-
|
|
35
|
+
description: Verify credentials are valid for a new connection to a fulfillment provider
|
|
36
|
+
/delegate_fulfillment:
|
|
36
37
|
post:
|
|
37
38
|
summary: Delegate Fulfillment
|
|
38
39
|
operationId: post-fulfillment-delegation
|
|
@@ -44,9 +45,9 @@ paths:
|
|
|
44
45
|
schema:
|
|
45
46
|
type: object
|
|
46
47
|
properties:
|
|
47
|
-
|
|
48
|
+
fulfillment_provider_order_id:
|
|
48
49
|
type: string
|
|
49
|
-
description: '
|
|
50
|
+
description: Delegate a sales order to a fulfillment provider. The fulfillment provider will attempt to fulfill the shipment of all line items. Returns the identifier used by the fulfillment provider for subsequent status updates for the order and it's fulfillments. Often this is the same as the order_id.
|
|
50
51
|
requestBody:
|
|
51
52
|
content:
|
|
52
53
|
application/json:
|
|
@@ -305,9 +306,9 @@ paths:
|
|
|
305
306
|
in: header
|
|
306
307
|
name: tenant-id
|
|
307
308
|
parameters: []
|
|
308
|
-
/
|
|
309
|
+
/get_fulfillments:
|
|
309
310
|
post:
|
|
310
|
-
summary: Get
|
|
311
|
+
summary: Get Fulfillments
|
|
311
312
|
operationId: post-fulfillment-status
|
|
312
313
|
responses:
|
|
313
314
|
'200':
|
|
@@ -317,18 +318,121 @@ paths:
|
|
|
317
318
|
schema:
|
|
318
319
|
type: object
|
|
319
320
|
properties:
|
|
321
|
+
fulfillment_provider_order_id:
|
|
322
|
+
type: string
|
|
320
323
|
status:
|
|
321
|
-
|
|
324
|
+
type: string
|
|
325
|
+
fulfillments:
|
|
326
|
+
type: array
|
|
327
|
+
items:
|
|
328
|
+
$ref: '#/components/schemas/SalesOrderFulfillment'
|
|
329
|
+
shipments:
|
|
330
|
+
type: array
|
|
331
|
+
items:
|
|
332
|
+
$ref: '#/components/schemas/ShipmentNotification'
|
|
322
333
|
polling:
|
|
323
334
|
type: object
|
|
324
335
|
properties:
|
|
325
336
|
is_final_update_state:
|
|
326
337
|
type: boolean
|
|
327
|
-
enum:
|
|
328
|
-
- once
|
|
329
|
-
- changes_since
|
|
330
338
|
max_age_seconds:
|
|
331
339
|
type: number
|
|
340
|
+
required:
|
|
341
|
+
- fulfillment_provider_order_id
|
|
342
|
+
examples:
|
|
343
|
+
example-1:
|
|
344
|
+
value:
|
|
345
|
+
fulfillment_provider_order_id: string
|
|
346
|
+
status: string
|
|
347
|
+
fulfillments:
|
|
348
|
+
- status: Processing
|
|
349
|
+
reason: string
|
|
350
|
+
explanation: string
|
|
351
|
+
line_items:
|
|
352
|
+
- line_item_id: string
|
|
353
|
+
sku: string
|
|
354
|
+
quantity: 0
|
|
355
|
+
shipments:
|
|
356
|
+
- carrier_code: string
|
|
357
|
+
carrier_service_code: string
|
|
358
|
+
currency: 'USD,EUR,NZD'
|
|
359
|
+
ext_location_id: string
|
|
360
|
+
fulfillment_cost: 0
|
|
361
|
+
insurance_cost: 0
|
|
362
|
+
integration_context: {}
|
|
363
|
+
items:
|
|
364
|
+
- description: string
|
|
365
|
+
line_item_id: string
|
|
366
|
+
product_id: string
|
|
367
|
+
quantity: 0
|
|
368
|
+
sku: string
|
|
369
|
+
notes:
|
|
370
|
+
- text: string
|
|
371
|
+
type: BackOrderMessage
|
|
372
|
+
notification_id: string
|
|
373
|
+
notify_buyer: true
|
|
374
|
+
order_id: string
|
|
375
|
+
order_number: string
|
|
376
|
+
return_address:
|
|
377
|
+
address_line_1: string
|
|
378
|
+
address_line_2: string
|
|
379
|
+
address_line_3: string
|
|
380
|
+
city: string
|
|
381
|
+
company: string
|
|
382
|
+
country_code: 'US,MX,CA'
|
|
383
|
+
is_verified: true
|
|
384
|
+
name: string
|
|
385
|
+
first_name: string
|
|
386
|
+
last_name: string
|
|
387
|
+
phone: string
|
|
388
|
+
pickup_location:
|
|
389
|
+
carrier_id: string
|
|
390
|
+
relay_id: string
|
|
391
|
+
postal_code: string
|
|
392
|
+
residential_indicator: R
|
|
393
|
+
state_province: string
|
|
394
|
+
ship_date: '2021-03-31T18:21:14.858Z'
|
|
395
|
+
ship_from:
|
|
396
|
+
address_line_1: string
|
|
397
|
+
address_line_2: string
|
|
398
|
+
address_line_3: string
|
|
399
|
+
city: string
|
|
400
|
+
company: string
|
|
401
|
+
country_code: 'US,MX,CA'
|
|
402
|
+
is_verified: true
|
|
403
|
+
name: string
|
|
404
|
+
first_name: string
|
|
405
|
+
last_name: string
|
|
406
|
+
phone: string
|
|
407
|
+
pickup_location:
|
|
408
|
+
carrier_id: string
|
|
409
|
+
relay_id: string
|
|
410
|
+
postal_code: string
|
|
411
|
+
residential_indicator: R
|
|
412
|
+
state_province: string
|
|
413
|
+
ship_to:
|
|
414
|
+
address_line_1: string
|
|
415
|
+
address_line_2: string
|
|
416
|
+
address_line_3: string
|
|
417
|
+
city: string
|
|
418
|
+
company: string
|
|
419
|
+
country_code: 'US,MX,CA'
|
|
420
|
+
is_verified: true
|
|
421
|
+
name: string
|
|
422
|
+
first_name: string
|
|
423
|
+
last_name: string
|
|
424
|
+
phone: string
|
|
425
|
+
pickup_location:
|
|
426
|
+
carrier_id: string
|
|
427
|
+
relay_id: string
|
|
428
|
+
postal_code: string
|
|
429
|
+
residential_indicator: R
|
|
430
|
+
state_province: string
|
|
431
|
+
tracking_number: string
|
|
432
|
+
tracking_url: string
|
|
433
|
+
polling:
|
|
434
|
+
is_final_update_state: true
|
|
435
|
+
max_age_seconds: 0
|
|
332
436
|
requestBody:
|
|
333
437
|
content:
|
|
334
438
|
application/json:
|
|
@@ -337,38 +441,26 @@ paths:
|
|
|
337
441
|
properties:
|
|
338
442
|
auth:
|
|
339
443
|
$ref: '#/components/schemas/Auth'
|
|
340
|
-
|
|
444
|
+
fulfillment_provider_order_id:
|
|
341
445
|
type: string
|
|
342
446
|
required:
|
|
343
447
|
- auth
|
|
344
|
-
-
|
|
448
|
+
- fulfillment_provider_order_id
|
|
345
449
|
description: |-
|
|
346
|
-
|
|
347
|
-
It should return matching fulfillment quantity updates for all line items of the original fulfillment delegations.
|
|
348
|
-
It should return quantities for rejected, cancelled, and shipped per line item.
|
|
349
|
-
Rejected means the partner cannot fulfill that item.
|
|
350
|
-
Cancelled means the client has requested an item not be fulfilled and the partner was able to stop fulfillment.
|
|
351
|
-
Shipped means the item has left for delivery.
|
|
352
|
-
|
|
353
|
-
The original fulfillment will be marked shipped when all line items are either rejected/cancelled/shipped and at least one is shipped.
|
|
450
|
+
Returns a list of fulfillments that the fulfillment provider has decided to use to fulfill an order. It may return only a root level status, which indicates a single status for all line items on an order. It may also return a list of fulfillments, their status, and the line items included in that fulfillment. Fulfillments may or may not match a list of shipments, this is completely up to the fulfillment provider.
|
|
354
451
|
|
|
355
|
-
|
|
356
|
-
The polling interval is once every 30 minutes.
|
|
357
|
-
The maximum number of ids per request is 50.
|
|
358
|
-
When there are more than 50 ids to request they are sequentially sent in batches of 50.
|
|
452
|
+
To communicate that the results for an order will no longer change the polling fields is_final_update_state should be set to true.
|
|
359
453
|
|
|
360
|
-
|
|
361
|
-
The polling.max_age_seconds property overrides the 30 minute interval.
|
|
362
|
-
The polling.per_request_limit property overrides the 50 ids sent per request.
|
|
454
|
+
The polling fields max_age_seconds refers to the expected cachable time of this result.
|
|
363
455
|
|
|
364
|
-
|
|
456
|
+
To instead return a list of changes on a periodic basis, refer to the /get_recent_changes path instead.
|
|
365
457
|
parameters:
|
|
366
458
|
- schema:
|
|
367
459
|
type: string
|
|
368
460
|
in: header
|
|
369
461
|
name: tenant-id
|
|
370
462
|
parameters: []
|
|
371
|
-
/
|
|
463
|
+
/cancel_fulfillment:
|
|
372
464
|
post:
|
|
373
465
|
summary: Request Fulfillment Cancellation
|
|
374
466
|
operationId: post-fulfillment-cancellation
|
|
@@ -379,9 +471,6 @@ paths:
|
|
|
379
471
|
application/json:
|
|
380
472
|
schema:
|
|
381
473
|
type: object
|
|
382
|
-
properties:
|
|
383
|
-
reason:
|
|
384
|
-
type: string
|
|
385
474
|
parameters:
|
|
386
475
|
- schema:
|
|
387
476
|
type: string
|
|
@@ -395,16 +484,17 @@ paths:
|
|
|
395
484
|
properties:
|
|
396
485
|
auth:
|
|
397
486
|
$ref: '#/components/schemas/Auth'
|
|
398
|
-
|
|
487
|
+
fulfillment_provider_order_id:
|
|
399
488
|
type: string
|
|
400
489
|
reason:
|
|
401
490
|
type: string
|
|
402
491
|
required:
|
|
403
492
|
- auth
|
|
404
|
-
-
|
|
493
|
+
- fulfillment_provider_order_id
|
|
405
494
|
- reason
|
|
495
|
+
description: Request the cancellation of a requested fulfillment send using the /delegate_fulfillment path. This will likely only start the cancellation process. Status updates via /get_fulfillments and /get_recent_changes will return the cancellation status when it is completed.
|
|
406
496
|
parameters: []
|
|
407
|
-
/
|
|
497
|
+
/get_rates:
|
|
408
498
|
post:
|
|
409
499
|
summary: Get Estimated Rates
|
|
410
500
|
operationId: post-rates
|
|
@@ -476,10 +566,10 @@ paths:
|
|
|
476
566
|
in: header
|
|
477
567
|
name: tenant-id
|
|
478
568
|
parameters: []
|
|
479
|
-
/
|
|
569
|
+
/get_recent_changes:
|
|
480
570
|
parameters: []
|
|
481
571
|
post:
|
|
482
|
-
summary: Get
|
|
572
|
+
summary: Get Recent Changes
|
|
483
573
|
operationId: post-fulfillment-get-recent-changes
|
|
484
574
|
responses:
|
|
485
575
|
'200':
|
|
@@ -492,26 +582,15 @@ paths:
|
|
|
492
582
|
changes:
|
|
493
583
|
type: array
|
|
494
584
|
items:
|
|
495
|
-
$ref: '#/components/schemas/
|
|
585
|
+
$ref: '#/components/schemas/SalesOrderFulfillment'
|
|
496
586
|
next_request:
|
|
497
587
|
type: string
|
|
498
|
-
since:
|
|
499
|
-
type: string
|
|
500
|
-
'':
|
|
501
|
-
content:
|
|
502
|
-
application/json:
|
|
503
|
-
schema:
|
|
504
|
-
type: object
|
|
505
|
-
properties:
|
|
506
|
-
changes:
|
|
507
|
-
type: string
|
|
508
|
-
next_request:
|
|
509
|
-
type:
|
|
510
|
-
- object
|
|
511
|
-
- string
|
|
512
588
|
description: |-
|
|
513
|
-
Receives a timestamp
|
|
514
|
-
|
|
589
|
+
Receives a timestamp of the last time requested changes was made, automatically buffered to include duplicate results to prevent skipping time.
|
|
590
|
+
|
|
591
|
+
Returns a list of changes. These changes include fulfillments that the fulfillment provider has decided to use to fulfill an order. It may return only an order level status, which indicates a single status for all line items on an order. It may also return a list of fulfillments, their status, and the line items included in that fulfillment. Fulfillments may or may not match a list of shipments, this is completely up to the fulfillment provider.
|
|
592
|
+
|
|
593
|
+
To instead return status on single orders at a time , refer to the /get_fulfillments path instead.
|
|
515
594
|
requestBody:
|
|
516
595
|
content:
|
|
517
596
|
application/json:
|
|
@@ -526,14 +605,15 @@ paths:
|
|
|
526
605
|
- string
|
|
527
606
|
since:
|
|
528
607
|
type: string
|
|
608
|
+
examples: {}
|
|
529
609
|
parameters:
|
|
530
610
|
- schema:
|
|
531
611
|
type: string
|
|
532
612
|
in: header
|
|
533
613
|
name: tenant-id
|
|
534
|
-
/
|
|
614
|
+
/get_inventory:
|
|
535
615
|
post:
|
|
536
|
-
summary: Get
|
|
616
|
+
summary: Get Inventory
|
|
537
617
|
operationId: post-get-inventory
|
|
538
618
|
responses:
|
|
539
619
|
'200':
|
|
@@ -560,6 +640,16 @@ paths:
|
|
|
560
640
|
type:
|
|
561
641
|
- string
|
|
562
642
|
- object
|
|
643
|
+
examples:
|
|
644
|
+
example-1:
|
|
645
|
+
value:
|
|
646
|
+
inventory:
|
|
647
|
+
sku: string
|
|
648
|
+
warehouse_id: string
|
|
649
|
+
available_quantity: string
|
|
650
|
+
committed_quantity: string
|
|
651
|
+
on_hand_quantity: string
|
|
652
|
+
next_request: string
|
|
563
653
|
requestBody:
|
|
564
654
|
content:
|
|
565
655
|
application/json:
|
|
@@ -574,6 +664,8 @@ paths:
|
|
|
574
664
|
- string
|
|
575
665
|
required:
|
|
576
666
|
- auth
|
|
667
|
+
description: Return the inventory that a fulfillment provider currently has for this merchant. Pagination is supplied via the next_request field. Pagination requests will be made until next_request is set to null. This is an optional path only for fulfillment providers who support inventory and are added as inventory provider integrations.
|
|
668
|
+
parameters: []
|
|
577
669
|
components:
|
|
578
670
|
schemas:
|
|
579
671
|
Address:
|
|
@@ -644,7 +736,7 @@ components:
|
|
|
644
736
|
connection_context:
|
|
645
737
|
type: string
|
|
646
738
|
description: Custom Value 3
|
|
647
|
-
|
|
739
|
+
fulfillment_provider_api_code:
|
|
648
740
|
type: string
|
|
649
741
|
password:
|
|
650
742
|
type: string
|
|
@@ -653,7 +745,7 @@ components:
|
|
|
653
745
|
username:
|
|
654
746
|
type: string
|
|
655
747
|
required:
|
|
656
|
-
-
|
|
748
|
+
- fulfillment_provider_api_code
|
|
657
749
|
BillingCategory:
|
|
658
750
|
type: string
|
|
659
751
|
title: BillingCategory
|
|
@@ -1371,29 +1463,6 @@ components:
|
|
|
1371
1463
|
type: string
|
|
1372
1464
|
required:
|
|
1373
1465
|
- rates
|
|
1374
|
-
LineItemQuantityStatus:
|
|
1375
|
-
title: LineItemQuantityStatus
|
|
1376
|
-
type: object
|
|
1377
|
-
properties:
|
|
1378
|
-
line_item_id:
|
|
1379
|
-
type: string
|
|
1380
|
-
sku:
|
|
1381
|
-
type: string
|
|
1382
|
-
quantity:
|
|
1383
|
-
type: number
|
|
1384
|
-
shipped_quantity:
|
|
1385
|
-
type: number
|
|
1386
|
-
cancelled_quantity:
|
|
1387
|
-
$ref: '#/components/schemas/QuantityWithReason'
|
|
1388
|
-
rejected_quantity:
|
|
1389
|
-
$ref: '#/components/schemas/QuantityWithReason'
|
|
1390
|
-
unknown_quantity:
|
|
1391
|
-
$ref: '#/components/schemas/QuantityWithReason'
|
|
1392
|
-
required:
|
|
1393
|
-
- line_item_id
|
|
1394
|
-
- sku
|
|
1395
|
-
- quantity
|
|
1396
|
-
description: Sales order line item quantity fulfillment statuses
|
|
1397
1466
|
Note:
|
|
1398
1467
|
title: Note
|
|
1399
1468
|
type: object
|
|
@@ -1760,31 +1829,29 @@ components:
|
|
|
1760
1829
|
required:
|
|
1761
1830
|
- description
|
|
1762
1831
|
- quantity
|
|
1763
|
-
|
|
1832
|
+
SalesOrderFulfillmentStatus:
|
|
1764
1833
|
type: string
|
|
1765
|
-
title:
|
|
1834
|
+
title: SalesOrderFulfillmentStatus
|
|
1766
1835
|
enum:
|
|
1767
1836
|
- Processing
|
|
1768
1837
|
- Cancelled
|
|
1769
1838
|
- Rejected
|
|
1770
|
-
- Unknown
|
|
1771
|
-
- PartiallyShipped
|
|
1772
1839
|
- Shipped
|
|
1773
|
-
|
|
1774
|
-
title:
|
|
1840
|
+
SalesOrderFulfillment:
|
|
1841
|
+
title: SalesOrderFulfillment
|
|
1775
1842
|
type: object
|
|
1776
1843
|
description: Represents a status change update for a sales order
|
|
1777
1844
|
properties:
|
|
1778
|
-
order_id:
|
|
1779
|
-
type: string
|
|
1780
1845
|
status:
|
|
1781
|
-
$ref: '#/components/schemas/
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1846
|
+
$ref: '#/components/schemas/SalesOrderFulfillmentStatus'
|
|
1847
|
+
reason:
|
|
1848
|
+
type: string
|
|
1849
|
+
explanation:
|
|
1850
|
+
type: string
|
|
1851
|
+
line_items:
|
|
1785
1852
|
type: array
|
|
1786
1853
|
items:
|
|
1787
|
-
$ref: '#/components/schemas/
|
|
1854
|
+
$ref: '#/components/schemas/FulfillmentLineItem'
|
|
1788
1855
|
ShipmentNotification:
|
|
1789
1856
|
title: ShipmentNotification
|
|
1790
1857
|
type: object
|
|
@@ -2082,4 +2149,38 @@ components:
|
|
|
2082
2149
|
- weight_in_grams
|
|
2083
2150
|
- source_weight
|
|
2084
2151
|
- source_weight_unit
|
|
2152
|
+
FulfillmentLineItem:
|
|
2153
|
+
title: FulfillmentLineItem
|
|
2154
|
+
x-stoplight:
|
|
2155
|
+
id: 0wglkamy8lqi5
|
|
2156
|
+
type: object
|
|
2157
|
+
properties:
|
|
2158
|
+
line_item_id:
|
|
2159
|
+
type: string
|
|
2160
|
+
sku:
|
|
2161
|
+
type: string
|
|
2162
|
+
quantity:
|
|
2163
|
+
type: number
|
|
2164
|
+
required:
|
|
2165
|
+
- quantity
|
|
2166
|
+
SalesOrderFulfillments:
|
|
2167
|
+
title: SalesOrderFulfillments
|
|
2168
|
+
x-stoplight:
|
|
2169
|
+
id: 0mccgdffw5fq2
|
|
2170
|
+
type: object
|
|
2171
|
+
properties:
|
|
2172
|
+
fulfillment_provider_order_id:
|
|
2173
|
+
type: string
|
|
2174
|
+
status:
|
|
2175
|
+
$ref: '#/components/schemas/SalesOrderFulfillmentStatus'
|
|
2176
|
+
fulfillments:
|
|
2177
|
+
type: array
|
|
2178
|
+
items:
|
|
2179
|
+
$ref: '#/components/schemas/SalesOrderFulfillment'
|
|
2180
|
+
shipments:
|
|
2181
|
+
type: array
|
|
2182
|
+
items:
|
|
2183
|
+
$ref: '#/components/schemas/ShipmentNotification'
|
|
2184
|
+
required:
|
|
2185
|
+
- fulfillment_provider_order_id
|
|
2085
2186
|
requestBodies: {}
|