shipbob-node-sdk 0.0.3 → 0.0.4
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 +85 -58
- package/dist/index.d.ts +444 -230
- package/dist/index.js +155 -70
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/docs/Product Catalog API Examples.pdf +0 -0
package/README.md
CHANGED
|
@@ -5,13 +5,21 @@ These is just a starting point for anybody looking to integrate ShipBob into a N
|
|
|
5
5
|
|
|
6
6
|
It uses the built-in node.js fetch.
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
Not really sure anybody will ever need this as most common platforms probably have integrations. There are a couple of other community SDKs. They do not have 2.0 endpoints:
|
|
9
|
+
- [shipbob-sdk-python](https://github.com/community-phone-company/shipbob-sdk-python)
|
|
10
|
+
- [shipbob-go](https://github.com/stryd/shipbob-go) - generated from Open API
|
|
9
11
|
|
|
10
12
|
NOTE: I did not notice until all this code was written that ShipBob had published an Open API spec :facepunch:. You may have better luck generating your own client.
|
|
11
13
|
```bash
|
|
12
14
|
$ yarn generate:client
|
|
13
15
|
```
|
|
14
|
-
The included script using OpenAPI
|
|
16
|
+
The included script using OpenAPI can generate clients in various languages.
|
|
17
|
+
|
|
18
|
+
This SDK exposes some endpoints not available in the OpenAPI including:
|
|
19
|
+
- `/2.0/receiving-extended`
|
|
20
|
+
- `/2.0/product`
|
|
21
|
+
- `/experimental/product` :skull:
|
|
22
|
+
- `/experimental/receiving` :skull:
|
|
15
23
|
|
|
16
24
|
Have a look in the `/test` folder. You might like more something like PostMan, but you can run and debug these "tests" in VS Code. You need a `.env` file with a Personal Access Token:
|
|
17
25
|
```
|
|
@@ -21,75 +29,89 @@ SHIPBOB_API_TOKEN=<redacted>
|
|
|
21
29
|
# API implementation progress
|
|
22
30
|
|
|
23
31
|
## Legend
|
|
24
|
-
|
|
32
|
+
:x: = I haven't needed this
|
|
25
33
|
|
|
26
|
-
|
|
34
|
+
:heavy_check_mark: = implemented
|
|
27
35
|
|
|
28
|
-
|
|
36
|
+
- [ ] = intend to add
|
|
29
37
|
|
|
30
|
-
|
|
38
|
+
:question: = might add support soon - under investigation
|
|
31
39
|
|
|
32
40
|
## Orders
|
|
33
|
-
-
|
|
34
|
-
-
|
|
35
|
-
-
|
|
36
|
-
-
|
|
37
|
-
-
|
|
38
|
-
-
|
|
39
|
-
-
|
|
40
|
-
-
|
|
41
|
-
-
|
|
42
|
-
-
|
|
43
|
-
-
|
|
44
|
-
-
|
|
41
|
+
- :x: Estimate Fulfillment Cost For Order
|
|
42
|
+
- :question: Get Order
|
|
43
|
+
- :question: Get Orders
|
|
44
|
+
- :heavy_check_mark: Create Order: api.placeOrder(...)
|
|
45
|
+
- :heavy_check_mark: Cancel single Order by Order ID: api.cancelSingleOrderByOrderId()
|
|
46
|
+
- :x: Get Order Store Json
|
|
47
|
+
- :x: Save the Store Order Json (The JSON that represent the order on the Third Party Source)
|
|
48
|
+
- :x: Get one Shipment by Order Id and Shipment Id
|
|
49
|
+
- :x: Cancel one Shipment by Order Id and Shipment Id
|
|
50
|
+
- :x: Get one Shipment's status timeline by Order Id and Shipment Id
|
|
51
|
+
- :question: Get all Shipments for Order
|
|
52
|
+
- :x: Get logs for one Shipment by Order Id and Shipment Id
|
|
53
|
+
- :x: Get one Shipment by Shipment Id
|
|
54
|
+
- :x: Update a Shipment
|
|
55
|
+
- :x: Cancel one Shipment by Shipment Id
|
|
56
|
+
- :x: Cancel multiple Shipments by Shipment Id
|
|
57
|
+
- :x: Get one Shipment's status timeline by Shipment Id
|
|
58
|
+
- :x: Get logs for one Shipment by Shipment Id
|
|
59
|
+
- :heavy_check_mark: Get shipping methods: api.getShippingMethods()
|
|
45
60
|
|
|
46
61
|
## Shipments
|
|
47
|
-
-
|
|
48
|
-
-
|
|
49
|
-
-
|
|
50
|
-
-
|
|
51
|
-
-
|
|
52
|
-
-
|
|
53
|
-
-
|
|
62
|
+
- :question: Get one Shipment by Shipment Id (webhooks are enough?)
|
|
63
|
+
- :question: Update a Shipment (marked with tracking information uploaded to a third-party system where the order originated)
|
|
64
|
+
- :question: Cancel one Shipment by Shipment Id
|
|
65
|
+
- :x: Cancel multiple Shipments by Shipment Id
|
|
66
|
+
- :x: Get one Shipment's status timeline by Shipment Id
|
|
67
|
+
- :x: Get logs for one Shipment by Shipment Id
|
|
68
|
+
- :question: Get shipping methods (hard-code shipping methods?)
|
|
54
69
|
|
|
55
70
|
## Products 1.0
|
|
56
|
-
-
|
|
57
|
-
-
|
|
58
|
-
-
|
|
59
|
-
-
|
|
71
|
+
- :heavy_check_mark: Get multiple products: api.getProducts1_0(...)
|
|
72
|
+
- :heavy_check_mark: Add a single product to the store: api.createProduct1_0(...)
|
|
73
|
+
- :x: Modify a single product (using 2.0 for additional properties)
|
|
74
|
+
- :x: Add multiple products to the store
|
|
60
75
|
|
|
61
76
|
## Products 2.0
|
|
62
|
-
These are not documented on the site yet
|
|
63
|
-
-
|
|
64
|
-
-
|
|
65
|
-
-
|
|
66
|
-
-
|
|
77
|
+
These are not documented on the site yet:
|
|
78
|
+
- :heavy_check_mark: Get multiple products: api.getProducts2_0(...)
|
|
79
|
+
- :heavy_check_mark: Add a single product to the store: api.createProduct2_0(...)
|
|
80
|
+
- :heavy_check_mark: Modify a single product: api.updateProducts2_0(...)
|
|
81
|
+
- :x: Add multiple products to the store
|
|
82
|
+
|
|
83
|
+
## Products Experimental
|
|
84
|
+
Kindly note as it's experimental subject to change/removal :skull:
|
|
85
|
+
- :heavy_check_mark: Get multiple products: api.getProductsExperimental(...)
|
|
86
|
+
- :heavy_check_mark: Add a single product to the store: api.createProductExperimental(...)
|
|
87
|
+
- :heavy_check_mark: Modify a single product: api.updateProductsExperimental(...)
|
|
88
|
+
- :x: Add multiple products to the store
|
|
67
89
|
|
|
68
90
|
## Inventory
|
|
69
91
|
- [ ] Get an inventory item
|
|
70
|
-
-
|
|
71
|
-
-
|
|
92
|
+
- :heavy_check_mark: List inventory items: api.listInventory(...)
|
|
93
|
+
- :x: Get a list of inventory items by product id (we don't know product_id)
|
|
72
94
|
|
|
73
95
|
## Channels
|
|
74
|
-
-
|
|
96
|
+
- :heavy_check_mark: Get user-authorized channel info: not in api, but used on init
|
|
75
97
|
|
|
76
98
|
## Returns
|
|
77
|
-
-
|
|
78
|
-
-
|
|
79
|
-
-
|
|
80
|
-
-
|
|
81
|
-
-
|
|
82
|
-
-
|
|
99
|
+
- :question: Get Return Order
|
|
100
|
+
- :question: Modify Return Order
|
|
101
|
+
- :question: Get Return Orders
|
|
102
|
+
- :question: Create Return Order
|
|
103
|
+
- :question: Cancel Return Order
|
|
104
|
+
- :question: Get One Return's status history
|
|
83
105
|
|
|
84
106
|
## Receiving
|
|
85
|
-
-
|
|
86
|
-
-
|
|
87
|
-
-
|
|
88
|
-
- [ ] Get Multiple Warehouse Receiving Orders (we
|
|
89
|
-
-
|
|
90
|
-
-
|
|
91
|
-
-
|
|
92
|
-
-
|
|
107
|
+
- :heavy_check_mark: Get Fulfillment Centers: api.getFulfillmentCenters()
|
|
108
|
+
- :heavy_check_mark: Get Warehouse Receiving Order
|
|
109
|
+
- :heavy_check_mark: Get Warehouse Receiving Order Boxes
|
|
110
|
+
- [ ] Get Multiple Warehouse Receiving Orders (we will need this to filter by statuses - will include this in a recipe that uses SetExternalSync)
|
|
111
|
+
- :heavy_check_mark: Create Warehouse Receiving Order: api.createWarehouseReceivingOrder(...)
|
|
112
|
+
- :x: Get Warehouse Receiving Order Box Labels
|
|
113
|
+
- :x: Cancel Warehouse Receiving Order (could be done manually, if needed?)
|
|
114
|
+
- :x: 5 x DEPRECATED '/1.0/receiving
|
|
93
115
|
- Get Warehouse Receiving Order
|
|
94
116
|
- Get a Warehouse Receiving Order by Purchase Order Number
|
|
95
117
|
- Create Warehouse Receiving Order
|
|
@@ -97,15 +119,20 @@ These are not documented on the site yet.
|
|
|
97
119
|
- Cancel Warehouse Receiving Order
|
|
98
120
|
|
|
99
121
|
## Receiving-Extended (not in API docs)
|
|
100
|
-
-
|
|
122
|
+
- :heavy_check_mark: Get Receiving Extended: api.getReceivingExtended(...)
|
|
123
|
+
|
|
124
|
+
## Receiving Experimental
|
|
125
|
+
Kindly note as it's experimental subject to change/removal :skull:
|
|
101
126
|
|
|
102
|
-
|
|
103
|
-
-
|
|
127
|
+
I'll try to share a recipe for using this for marking completed WROs.
|
|
128
|
+
- :heavy_check_mark: Receiving Set External Sync: api.experimentalReceivingSetExternalSync(...)
|
|
104
129
|
|
|
105
130
|
## Webhooks
|
|
106
|
-
-
|
|
107
|
-
-
|
|
108
|
-
-
|
|
131
|
+
- :heavy_check_mark: Get Webhooks: api.getWebhooks()
|
|
132
|
+
- :heavy_check_mark: Create a new webhook subscription: api.registerWebhookSubscription(...)
|
|
133
|
+
- :heavy_check_mark: Delete an existing webhook subscription: api.unregisterWebhookSubscription(...)
|
|
109
134
|
|
|
110
135
|
## Locations
|
|
111
|
-
-
|
|
136
|
+
- :x: Get locations
|
|
137
|
+
|
|
138
|
+
For making changes locally - use `yarn link` to test out the changes easily.
|