{"_id":"@akshay4362/shiprocket-plugin","_rev":"6-961e2f855aeebf2a7e28f9137784096b","name":"@akshay4362/shiprocket-plugin","dist-tags":{"latest":"4.0.2"},"versions":{"1.0.0":{"name":"@akshay4362/shiprocket-plugin","version":"1.0.0","license":"GPL-3.0-or-later","_id":"@akshay4362/shiprocket-plugin@1.0.0","maintainers":[{"name":"akshay4362","email":"akshay.t@softobotics.com"}],"homepage":"https://www.vendure.io/","dist":{"shasum":"1439937266bc5cdb2e91a2a5571be41634637360","tarball":"https://registry.npmjs.org/@akshay4362/shiprocket-plugin/-/shiprocket-plugin-1.0.0.tgz","fileCount":29,"integrity":"sha512-Ikwq/sgeixYxvGSyDEXDYoV2wQAlMiox7aTTBh7qBagCcid321Jap5QdGJKDEXDIp14BFD3XLa62VxnkfN7b7A==","signatures":[{"sig":"MEQCIAviDbHqR6BTO2tUyypiVO//KkST72JQCP0dCeRGoO5AAiAPoPO3+otTs8Y4F82KZBPdDCsMDlpH2z+HE+sa3ChFZw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":53611},"main":"lib/index.js","types":"lib/index.d.ts","funding":"https://github.com/sponsors/michaelbromley","gitHead":"9179ea205b5b905b627457f2f60e59d172a88f6a","private":false,"scripts":{"ci":"npm run build","e2e":"cross-env PACKAGE=shiprocket-plugin vitest --config ../../e2e-common/vitest.config.mts --run","lint":"eslint .","build":"rimraf lib && tsc -p ./tsconfig.build.json","watch":"tsc -p ./tsconfig.build.json --watch","e2e:watch":"cross-env PACKAGE=shiprocket-plugin vitest --config ../../e2e-common/vitest.config.mts","dev-server":"npm run build && DB=sqlite node -r ts-node/register e2e/shiprocket-dev-server.ts"},"_npmUser":{"name":"akshay4362","email":"akshay.t@softobotics.com"},"_npmVersion":"10.9.8","description":"Plugin to enable shipping rate calculation and order fulfillment through [Shiprocket](https://www.shiprocket.in/).","directories":{},"_nodeVersion":"22.23.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nock":"^13.1.4","rimraf":"^5.0.5","node-fetch":"^2.7.0","typescript":"5.8.2","@vendure/core":"3.6.0-minor-202603280303","@vendure/common":"3.6.0-minor-202603280303","@vendure/testing":"3.6.0-minor-202603280303","@types/node-fetch":"^2.6.4"},"peerDependencies":{"@vendure/core":"^3.6.0-0","@vendure/common":"^3.6.0-0"},"_npmOperationalInternal":{"tmp":"tmp/shiprocket-plugin_1.0.0_1788264394750_0.25534379376687166","host":"s3://npm-registry-packages-npm-production"}},"2.0.0":{"name":"@akshay4362/shiprocket-plugin","version":"2.0.0","license":"GPL-3.0-or-later","_id":"@akshay4362/shiprocket-plugin@2.0.0","maintainers":[{"name":"akshay4362","email":"akshay.t@softobotics.com"}],"homepage":"https://www.vendure.io/","dist":{"shasum":"564bb44344a831bdcbd5a820569e5fcbb0ae8120","tarball":"https://registry.npmjs.org/@akshay4362/shiprocket-plugin/-/shiprocket-plugin-2.0.0.tgz","fileCount":29,"integrity":"sha512-oiwMWAD80VyHhvmwsPx9unXrWSWpNzSWJoSh/9LZjx49SnuvrahTWlmppRrJwyu/k9YrnhFS53cmSMau3xp8yg==","signatures":[{"sig":"MEYCIQDVCdTkGtTmu4ukgT4klZwVSvsU1F72ADU5tbYtgbZv3wIhAPzTixCI78T9f31jr2lFI/j1KNuX86Vmv9Zx5ks/Y07s","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":63247},"main":"lib/index.js","types":"lib/index.d.ts","funding":"https://github.com/sponsors/michaelbromley","gitHead":"9179ea205b5b905b627457f2f60e59d172a88f6a","private":false,"scripts":{"ci":"npm run build","e2e":"cross-env PACKAGE=shiprocket-plugin vitest --config ../../e2e-common/vitest.config.mts --run","lint":"eslint .","build":"rimraf lib && tsc -p ./tsconfig.build.json","watch":"tsc -p ./tsconfig.build.json --watch","e2e:watch":"cross-env PACKAGE=shiprocket-plugin vitest --config ../../e2e-common/vitest.config.mts","dev-server":"npm run build && DB=sqlite node -r ts-node/register e2e/shiprocket-dev-server.ts"},"_npmUser":{"name":"akshay4362","email":"akshay.t@softobotics.com"},"_npmVersion":"10.9.8","description":"Plugin to enable shipping rate calculation and order fulfillment through [Shiprocket](https://www.shiprocket.in/).","directories":{},"_nodeVersion":"22.23.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nock":"^13.1.4","rimraf":"^5.0.5","node-fetch":"^2.7.0","typescript":"5.8.2","@vendure/core":"3.6.0-minor-202603280303","@vendure/common":"3.6.0-minor-202603280303","@vendure/testing":"3.6.0-minor-202603280303","@types/node-fetch":"^2.6.4"},"peerDependencies":{"@vendure/core":"^3.6.0-0","@vendure/common":"^3.6.0-0"},"_npmOperationalInternal":{"tmp":"tmp/shiprocket-plugin_2.0.0_1788269116210_0.13695829752525102","host":"s3://npm-registry-packages-npm-production"}},"3.0.0":{"name":"@akshay4362/shiprocket-plugin","version":"3.0.0","license":"GPL-3.0-or-later","_id":"@akshay4362/shiprocket-plugin@3.0.0","maintainers":[{"name":"akshay4362","email":"akshay.t@softobotics.com"}],"homepage":"https://www.vendure.io/","dist":{"shasum":"7f740bc4abf2005daa9d5bc6e09656dba0098e0f","tarball":"https://registry.npmjs.org/@akshay4362/shiprocket-plugin/-/shiprocket-plugin-3.0.0.tgz","fileCount":29,"integrity":"sha512-7yCRRLO9Lpi2IMZvqjD8jpbI3+3sRCcSRz447Y5dWawgx5/FRr6KFL7/pEDjhM11aI378XlA+tJAeGMTDasHaQ==","signatures":[{"sig":"MEUCIQCugZL8duqc74DnKMThJt4Hqo5tEr4pjBpSrJPclSGl4AIgDATbKOGcm1IhNsusj1KWZ0D4lVrB72SuvelAbSB7vKA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":63247},"main":"lib/index.js","types":"lib/index.d.ts","funding":"https://github.com/sponsors/michaelbromley","gitHead":"9179ea205b5b905b627457f2f60e59d172a88f6a","private":false,"scripts":{"ci":"npm run build","e2e":"cross-env PACKAGE=shiprocket-plugin vitest --config ../../e2e-common/vitest.config.mts --run","lint":"eslint .","build":"rimraf lib && tsc -p ./tsconfig.build.json","watch":"tsc -p ./tsconfig.build.json --watch","e2e:watch":"cross-env PACKAGE=shiprocket-plugin vitest --config ../../e2e-common/vitest.config.mts","dev-server":"npm run build && DB=sqlite node -r ts-node/register e2e/shiprocket-dev-server.ts"},"_npmUser":{"name":"akshay4362","email":"akshay.t@softobotics.com"},"_npmVersion":"10.9.8","description":"Plugin to enable shipping rate calculation and order fulfillment through [Shiprocket](https://www.shiprocket.in/).","directories":{},"_nodeVersion":"22.23.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nock":"^13.1.4","rimraf":"^5.0.5","node-fetch":"^2.7.0","typescript":"5.8.2","@vendure/core":"3.6.0-minor-202603280303","@vendure/common":"3.6.0-minor-202603280303","@vendure/testing":"3.6.0-minor-202603280303","@types/node-fetch":"^2.6.4"},"peerDependencies":{"@vendure/core":"^3.6.0-0","@vendure/common":"^3.6.0-0"},"_npmOperationalInternal":{"tmp":"tmp/shiprocket-plugin_3.0.0_1788269333986_0.5809883558661564","host":"s3://npm-registry-packages-npm-production"}},"4.0.0":{"name":"@akshay4362/shiprocket-plugin","version":"4.0.0","license":"GPL-3.0-or-later","_id":"@akshay4362/shiprocket-plugin@4.0.0","maintainers":[{"name":"akshay4362","email":"akshay.t@softobotics.com"}],"homepage":"https://www.vendure.io/","dist":{"shasum":"33190b6bbc25f07ad63296ac1320ef6edf671644","tarball":"https://registry.npmjs.org/@akshay4362/shiprocket-plugin/-/shiprocket-plugin-4.0.0.tgz","fileCount":29,"integrity":"sha512-cPBErVafTiQ6XpLgt9yWshwu+tw/nYR1m1PGdDAOdHyit5VM7cWyrA8ymMJEYd5JGcbE6BAZVoxjpilCaxKYEg==","signatures":[{"sig":"MEQCIHJo//KvRmgGF6euqsLtvyXRedQusHqV1NriAoTTSZqtAiAi1oMl2/2eDWwZkrdCoWKzbiZTuijmgrIR4CxhsBsNzg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":64443},"main":"lib/index.js","types":"lib/index.d.ts","funding":"https://github.com/sponsors/michaelbromley","gitHead":"dad53f85006165e64c4d1088b289843647a6d41c","private":false,"scripts":{"ci":"npm run build","e2e":"cross-env PACKAGE=shiprocket-plugin vitest --config ../../e2e-common/vitest.config.mts --run","lint":"eslint .","build":"rimraf lib && tsc -p ./tsconfig.build.json","watch":"tsc -p ./tsconfig.build.json --watch","e2e:watch":"cross-env PACKAGE=shiprocket-plugin vitest --config ../../e2e-common/vitest.config.mts","dev-server":"npm run build && DB=sqlite node -r ts-node/register e2e/shiprocket-dev-server.ts"},"_npmUser":{"name":"akshay4362","email":"akshay.t@softobotics.com"},"_npmVersion":"10.9.8","description":"Plugin to enable shipping rate calculation and order fulfillment through [Shiprocket](https://www.shiprocket.in/).","directories":{},"_nodeVersion":"22.23.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nock":"^13.1.4","rimraf":"^5.0.5","node-fetch":"^2.7.0","typescript":"5.8.2","@vendure/core":"3.6.0-minor-202603280303","@vendure/common":"3.6.0-minor-202603280303","@vendure/testing":"3.6.0-minor-202603280303","@types/node-fetch":"^2.6.4"},"peerDependencies":{"@vendure/core":"^3.6.0-0","@vendure/common":"^3.6.0-0"},"_npmOperationalInternal":{"tmp":"tmp/shiprocket-plugin_4.0.0_1788280462669_0.3094994496901988","host":"s3://npm-registry-packages-npm-production"}},"4.0.1":{"name":"@akshay4362/shiprocket-plugin","version":"4.0.1","license":"GPL-3.0-or-later","_id":"@akshay4362/shiprocket-plugin@4.0.1","maintainers":[{"name":"akshay4362","email":"akshay.t@softobotics.com"}],"homepage":"https://www.vendure.io/","dist":{"shasum":"8af8c9fe1f5fa36f9301439f1249d887b8f7b017","tarball":"https://registry.npmjs.org/@akshay4362/shiprocket-plugin/-/shiprocket-plugin-4.0.1.tgz","fileCount":29,"integrity":"sha512-d/21G41vKX66uV2fGXE1FGHFtopG2ctFiBJzooKO0XIQe5nXPtMDMMpTn4XTH8PdqNNuKxY1+xJm+0HkTbeLFA==","signatures":[{"sig":"MEYCIQCFCR7KAQVcp7ncCXRFPv0FKVFijwE4kTSftP+aws8IvgIhALeXj7wMPtZl3bYFrGn0ENkWBw2+st0tkyWZuCd/h2Gs","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":66174},"main":"lib/index.js","types":"lib/index.d.ts","funding":"https://github.com/sponsors/michaelbromley","gitHead":"dad53f85006165e64c4d1088b289843647a6d41c","private":false,"scripts":{"ci":"npm run build","e2e":"cross-env PACKAGE=shiprocket-plugin vitest --config ../../e2e-common/vitest.config.mts --run","lint":"eslint .","build":"rimraf lib && tsc -p ./tsconfig.build.json","watch":"tsc -p ./tsconfig.build.json --watch","e2e:watch":"cross-env PACKAGE=shiprocket-plugin vitest --config ../../e2e-common/vitest.config.mts","dev-server":"npm run build && DB=sqlite node -r ts-node/register e2e/shiprocket-dev-server.ts"},"_npmUser":{"name":"akshay4362","email":"akshay.t@softobotics.com"},"_npmVersion":"10.9.8","description":"Plugin to enable shipping rate calculation and order fulfillment through [Shiprocket](https://www.shiprocket.in/).","directories":{},"_nodeVersion":"22.23.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nock":"^13.1.4","rimraf":"^5.0.5","node-fetch":"^2.7.0","typescript":"5.8.2","@vendure/core":"3.6.0-minor-202603280303","@vendure/common":"3.6.0-minor-202603280303","@vendure/testing":"3.6.0-minor-202603280303","@types/node-fetch":"^2.6.4"},"peerDependencies":{"@vendure/core":"^3.6.0-0","@vendure/common":"^3.6.0-0"},"_npmOperationalInternal":{"tmp":"tmp/shiprocket-plugin_4.0.1_1788349087833_0.8405704867591559","host":"s3://npm-registry-packages-npm-production"}},"4.0.2":{"name":"@akshay4362/shiprocket-plugin","version":"4.0.2","license":"GPL-3.0-or-later","main":"lib/index.js","types":"lib/index.d.ts","private":false,"scripts":{"watch":"tsc -p ./tsconfig.build.json --watch","build":"rimraf lib && tsc -p ./tsconfig.build.json","e2e":"cross-env PACKAGE=shiprocket-plugin vitest --config ../../e2e-common/vitest.config.mts --run","e2e:watch":"cross-env PACKAGE=shiprocket-plugin vitest --config ../../e2e-common/vitest.config.mts","lint":"eslint .","ci":"npm run build","dev-server":"npm run build && DB=sqlite node -r ts-node/register e2e/shiprocket-dev-server.ts"},"homepage":"https://www.vendure.io/","funding":"https://github.com/sponsors/michaelbromley","publishConfig":{"access":"public"},"peerDependencies":{"@vendure/core":"^3.6.0-0","@vendure/common":"^3.6.0-0"},"devDependencies":{"@vendure/common":"3.6.0-minor-202603280303","@vendure/core":"3.6.0-minor-202603280303","@vendure/testing":"3.6.0-minor-202603280303","@types/node-fetch":"^2.6.4","nock":"^13.1.4","node-fetch":"^2.7.0","rimraf":"^5.0.5","typescript":"5.8.2"},"_id":"@akshay4362/shiprocket-plugin@4.0.2","gitHead":"802fb7e60a3609c3b248c70764d5b609774cfddc","description":"Plugin to enable shipping rate calculation and order fulfillment through [Shiprocket](https://www.shiprocket.in/).","_nodeVersion":"22.23.2","_npmVersion":"10.9.8","dist":{"integrity":"sha512-4WnBRw8kVxQS5qhhDGAgMPpwoo9c6Zj+zy9fuM/bn9mS2zvpA0RHXBzOfYw8VrueFlKvNBk0K9KH7tVGrHxcRw==","shasum":"62c8b4312fe011d219dcb2f036c70a3ba2d62b31","tarball":"https://registry.npmjs.org/@akshay4362/shiprocket-plugin/-/shiprocket-plugin-4.0.2.tgz","fileCount":29,"unpackedSize":68329,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCvWIqAkNkWmo4dwjUWi/YKgz3axCRCmvVZETR/6BgT0QIhAPwZNa6Rd2MJ/nG7phlXv4mn8AFKl/oM0ygL6EUPhDmR"}]},"_npmUser":{"name":"akshay4362","email":"akshay.t@softobotics.com"},"directories":{},"maintainers":[{"name":"akshay4362","email":"akshay.t@softobotics.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/shiprocket-plugin_4.0.2_1788352767229_0.8847434572502562"},"_hasShrinkwrap":false}},"time":{"created":"2026-09-01T12:06:34.497Z","modified":"2026-09-02T12:39:27.628Z","1.0.0":"2026-09-01T12:06:34.909Z","2.0.0":"2026-09-01T13:25:16.350Z","3.0.0":"2026-09-01T13:28:54.156Z","4.0.0":"2026-09-01T16:34:22.818Z","4.0.1":"2026-09-02T11:38:07.974Z","4.0.2":"2026-09-02T12:39:27.421Z"},"license":"GPL-3.0-or-later","homepage":"https://www.vendure.io/","description":"Plugin to enable shipping rate calculation and order fulfillment through [Shiprocket](https://www.shiprocket.in/).","maintainers":[{"name":"akshay4362","email":"akshay.t@softobotics.com"}],"readme":"# Shiprocket Shipping & Fulfillment Plugin\n\nPlugin to enable shipping rate calculation and order fulfillment through [Shiprocket](https://www.shiprocket.in/).\n\n## Requirements\n\n1. A Shiprocket account with API access enabled (email/password login).\n2. A pickup address configured in your Shiprocket account (Settings > Pickup Addresses) - note its\n   nickname (`pickupLocation`) and postcode (`pickupPostcode`).\n3. A sales channel ID for this integration, from Settings > API > Channel options (`channelId`).\n4. A `hsnCode` custom field on `ProductVariant`, added in your `VendureConfig`:\n    ```ts\n    customFields: {\n      ProductVariant: [{ name: 'hsnCode', type: 'string', nullable: true }],\n    }\n    ```\n   Shiprocket requires an HSN code per order item - shipment creation throws if a variant being\n   shipped has no `hsnCode` set. Fill this in per variant in the Admin UI (Catalog > Product Variants).\n5. Install the plugin:\n\n    ```shell\n    npm install @vendure-community/shiprocket-plugin\n    ```\n\n## Setup\n\n1. Add the plugin to your VendureConfig `plugins` array:\n    ```ts\n    import { ShiprocketPlugin } from '@vendure-community/shiprocket-plugin';\n\n    // ...\n\n    plugins: [\n      ShiprocketPlugin.init({\n        pollIntervalMinutes: 15, // how often to check Shiprocket for status changes\n      }),\n    ]\n    ```\n    For all the plugin options, see the `ShiprocketPluginOptions` type.\n2. Create a new ShippingMethod in the Admin UI:\n   - Calculator: \"Shiprocket live shipping rate\" (`shiprocket-live-rate`) - fill in its arguments\n     with the Shiprocket account to use for this method: `email`, `password`, `pickupLocation`,\n     `channelId`, `pickupPostcode`, and optionally `defaultCourierId`, plus `flatRateFallback` and\n     `taxRate`. Since these credentials live on the ShippingMethod (which is assignable to specific\n     channels), different ShippingMethods - and therefore different channels - can point at\n     different Shiprocket accounts.\n   - Fulfillment handler: \"Ship via Shiprocket\" (`shiprocket`)\n\n## Storefront Usage\n\nThis plugin only adds a shipping calculator and fulfillment handler - the storefront uses Vendure's\nstandard shipping-method APIs, no Shiprocket-specific queries or mutations are required.\n\n1. Once the order has a shipping address, call `eligibleShippingMethods` to get the quoted price:\n   ```graphql\n   query {\n     eligibleShippingMethods {\n       id\n       name\n       price\n       priceWithTax\n     }\n   }\n   ```\n   For the ShippingMethod using the \"Shiprocket live shipping rate\" calculator, `price`/`priceWithTax`\n   reflects a live rate from Shiprocket's serviceability API for the order's destination postcode. If\n   that lookup fails or returns no serviceable couriers, the calculator falls back to the flat rate\n   configured on the ShippingMethod (its `flatRateFallback` argument) - checkout is never blocked by a\n   Shiprocket outage.\n2. Set the chosen method on the order as usual:\n   ```graphql\n   mutation {\n     setOrderShippingMethod(shippingMethodId: \"<id>\") {\n       ... on Order {\n         id\n         shippingWithTax\n       }\n     }\n   }\n   ```\n\n## Admin Usage\n\nWhen an order is fulfilled via the \"Ship via Shiprocket\" handler, the plugin:\n\n1. Creates the shipment in Shiprocket, sending each order item's `hsnCode` custom field as its HSN.\n   Fulfillment creation throws if any shipped variant is missing an `hsnCode`.\n2. Assigns a courier and generates an AWB code, restricted to `defaultCourierId` if one is\n   configured, or Shiprocket's recommended courier otherwise. This step is required to succeed -\n   fulfillment creation fails if no courier can be assigned, so a shipment is never left stuck\n   without an AWB.\n3. Requests pickup for the shipment. This step is best-effort: if it fails or doesn't confirm\n   immediately, a warning is logged and the pickup can be scheduled manually from the Shiprocket\n   dashboard - it does not fail the fulfillment, since the shipment and AWB already exist.\n\nThe resulting `shiprocketShipmentId`, `shiprocketAwbCode`, and `shiprocketCourierName` are stored as\nFulfillment custom fields.\n\n## Status Sync\n\nShiprocket webhook delivery must be configured per-channel in their dashboard and is not\nprovisionable via API, so this plugin polls the Track/Shipment-status API instead, via a recurring\nVendure job queue task (`shiprocket-status-sync`, visible in the Admin UI under Job Queue). By\ndefault this runs every 15 minutes; configure via `pollIntervalMinutes`. Fulfillments transition\n`Pending -> Shipped -> Delivered`, or to `Cancelled` on RTO/cancellation, based on the tracked\nstatus. Failures are logged and retried on the next cycle.\n\n## Local Development\n\nSet `SHIPROCKET_EMAIL`, `SHIPROCKET_PASSWORD`, `SHIPROCKET_PICKUP_LOCATION`, `SHIPROCKET_CHANNEL_ID`,\nand `SHIPROCKET_PICKUP_POSTCODE` in a `.env` file in this package (these seed the calculator\narguments of a ShippingMethod created automatically by the dev server), then run:\n\n```shell\nnpm run dev-server\n```\n","readmeFilename":"README.md"}