medusa-shiprocket-fulfillment-plugin 0.3.2 â 0.3.3
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 +25 -4
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -37,6 +37,7 @@ Streamline your shipping operations by automating rate calculations, order creat
|
|
|
37
37
|
| Feature | Description |
|
|
38
38
|
| :--- | :--- |
|
|
39
39
|
| **đĩ Automated Rates** | Fetch real-time shipping rates at checkout based on pickup and delivery pin codes. |
|
|
40
|
+
| **đ Delivery Estimates** | **[NEW]** Public API to check estimated delivery dates and fastest courier for any pincode. |
|
|
40
41
|
| **đĻ Seamless Fulfillment** | Automatically create shipments in Shiprocket when you fulfill an order in Medusa. |
|
|
41
42
|
| **đ Document Generation** | Generate and retrieve **Shipping Labels**, **Manifests**, and **Invoices** directly. |
|
|
42
43
|
| **âŠī¸ Returns Management** | Handle return requests and generate reverse pickup shipments effortlessly. |
|
|
@@ -80,11 +81,15 @@ SHIPROCKET_PICKUP_LOCATION="Primary"
|
|
|
80
81
|
|
|
81
82
|
### 2. Medusa Config
|
|
82
83
|
|
|
83
|
-
|
|
84
|
+
For the plugin to work correctly, you must register it in **TWO places** in `medusa-config.ts`:
|
|
85
|
+
1. In `modules`: To enable the fulfillment provider.
|
|
86
|
+
2. In `plugins`: To enable the API routes (like delivery estimates).
|
|
84
87
|
|
|
85
|
-
```
|
|
88
|
+
```typescript
|
|
86
89
|
module.exports = defineConfig({
|
|
87
90
|
// ... other config
|
|
91
|
+
|
|
92
|
+
// 1. Register as a Fulfillment Module
|
|
88
93
|
modules: [
|
|
89
94
|
{
|
|
90
95
|
resolve: "@medusajs/medusa/fulfillment",
|
|
@@ -108,6 +113,14 @@ module.exports = defineConfig({
|
|
|
108
113
|
},
|
|
109
114
|
},
|
|
110
115
|
],
|
|
116
|
+
|
|
117
|
+
// 2. Register in Plugins array (REQUIRED for API routes)
|
|
118
|
+
plugins: [
|
|
119
|
+
{
|
|
120
|
+
resolve: "medusa-shiprocket-fulfillment-plugin",
|
|
121
|
+
options: {},
|
|
122
|
+
},
|
|
123
|
+
],
|
|
111
124
|
});
|
|
112
125
|
```
|
|
113
126
|
|
|
@@ -120,7 +133,9 @@ Check serviceability and get estimated delivery dates for any pincode without cr
|
|
|
120
133
|
**Endpoint:** `GET /store/shiprocket/delivery-estimate`
|
|
121
134
|
|
|
122
135
|
> [!NOTE]
|
|
123
|
-
> This endpoint is public â no API key required.
|
|
136
|
+
> This endpoint is public â no API key required.
|
|
137
|
+
> * **Rate Limit:** 30 requests/min per IP.
|
|
138
|
+
> * **Caching:** Results cached for 10 minutes.
|
|
124
139
|
|
|
125
140
|
**Query Parameters:**
|
|
126
141
|
| Parameter | Required | Description |
|
|
@@ -147,7 +162,13 @@ curl "https://your-store.com/store/shiprocket/delivery-estimate?delivery_pincode
|
|
|
147
162
|
"rate": 45,
|
|
148
163
|
"is_surface": true
|
|
149
164
|
},
|
|
150
|
-
"all_options": [
|
|
165
|
+
"all_options": [
|
|
166
|
+
{
|
|
167
|
+
"courier_name": "Delhivery Surface",
|
|
168
|
+
// ... details
|
|
169
|
+
},
|
|
170
|
+
// ... other couriers
|
|
171
|
+
]
|
|
151
172
|
}
|
|
152
173
|
```
|
|
153
174
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "medusa-shiprocket-fulfillment-plugin",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3",
|
|
4
4
|
"description": "Shiprocket Fulfillment Provider Plugin for MedusaJS 2",
|
|
5
5
|
"author": "SAM-AEL",
|
|
6
6
|
"homepage": "https://github.com/SAM-AEL",
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
"./.medusa/server/src/modules/*": "./.medusa/server/src/modules/*/index.js",
|
|
18
18
|
"./modules/*": "./.medusa/server/src/modules/*/index.js",
|
|
19
19
|
"./providers/*": "./.medusa/server/src/providers/*/index.js",
|
|
20
|
+
"./api/*": "./.medusa/server/src/api/*.js",
|
|
20
21
|
"./*": "./.medusa/server/src/*.js"
|
|
21
22
|
},
|
|
22
23
|
"keywords": [
|