{"id":18810969,"url":"https://github.com/shipengine/shipengine-js","last_synced_at":"2025-04-09T15:04:18.640Z","repository":{"id":39757447,"uuid":"309795048","full_name":"ShipEngine/shipengine-js","owner":"ShipEngine","description":"The official ShipEngine SDK for Javascript.","archived":false,"fork":false,"pushed_at":"2025-01-09T09:29:52.000Z","size":2277,"stargazers_count":16,"open_issues_count":24,"forks_count":10,"subscribers_count":17,"default_branch":"main","last_synced_at":"2025-04-09T15:02:21.849Z","etag":null,"topics":["address-normalization","address-validation","dhl-api","fedex-api","javascript","package-tracking","rest-api","sdk","shipment-tracking","shipping-api","shipping-cost","shipping-label","shipping-rates","typescript","ups-api","usps-api"],"latest_commit_sha":null,"homepage":"https://www.shipengine.com/docs/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ShipEngine.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-11-03T20:06:21.000Z","updated_at":"2025-03-18T15:03:47.000Z","dependencies_parsed_at":"2024-01-13T01:46:29.084Z","dependency_job_id":"e1a816ab-623b-4d30-8d7e-6e334f1e41e5","html_url":"https://github.com/ShipEngine/shipengine-js","commit_stats":{"total_commits":559,"total_committers":22,"mean_commits":25.40909090909091,"dds":0.4364937388193202,"last_synced_commit":"ddb4f0849b04a03cd422b234506508d16f7d3bdd"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShipEngine%2Fshipengine-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShipEngine%2Fshipengine-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShipEngine%2Fshipengine-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShipEngine%2Fshipengine-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ShipEngine","download_url":"https://codeload.github.com/ShipEngine/shipengine-js/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248055276,"owners_count":21040156,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["address-normalization","address-validation","dhl-api","fedex-api","javascript","package-tracking","rest-api","sdk","shipment-tracking","shipping-api","shipping-cost","shipping-label","shipping-rates","typescript","ups-api","usps-api"],"created_at":"2024-11-07T23:23:36.148Z","updated_at":"2025-04-09T15:04:18.608Z","avatar_url":"https://github.com/ShipEngine.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![ShipEngine](https://shipengine.github.io/img/shipengine-logo-wide.png)](https://www.shipengine.com/)\n\nShipEngine JavaScript SDK\n=====================================================\n### The official ShipEngine JavaScript SDK for Node.js\n\n[![npm](https://img.shields.io/npm/v/shipengine.svg)](https://www.npmjs.com/package/shipengine)\n[![License](https://img.shields.io/npm/l/shipengine.svg)](LICENSE)\n\n[![Build Status](https://github.com/ShipEngine/shipengine-js/workflows/CI-CD/badge.svg)](https://github.com/ShipEngine/shipengine-js/actions)\n[![Coverage Status](https://coveralls.io/repos/github/ShipEngine/shipengine-js/badge.svg?branch=main)](https://coveralls.io/github/ShipEngine/shipengine-js?branch=main)\n[![Dependencies](https://david-dm.org/ShipEngine/shipengine-js.svg)](https://david-dm.org/ShipEngine/shipengine-js)\n\n[![OS Compatibility](https://shipengine.github.io/img/badges/os-badges.svg)](https://github.com/ShipEngine/shipengine-js/actions)\n\nQuick Start\n--------------------------\nInstall ShipEngine JavaScript SDK via [npm](https://docs.npmjs.com/about-npm/).\n\n```bash\nnpm install shipengine\n```\n\nThe only configuration requirement is an [API key](https://www.shipengine.com/docs/auth/#api-keys).\n\n```javascript\nconst ShipEngine = require(\"shipengine\");\n\nconst shipengine = new ShipEngine(\"___YOUR_API_KEY_HERE__\");\n\n```\n\nConfiguring the ShipEngine SDK\n-------------------------------\n* Be sure to configure the SDK if you would like to update things like `retries`, `timeouts`, and `page sizes` using the [`ShipEngine Config`](./src/config.ts) interface. Alternatively, you can simply pass in your ShipEngine API Key and use the default configuration.\n\n```TypeScript\nexport interface ShipEngineConfig {\n  /**\n   * Your ShipEngine API key.\n   *\n   * This can be a production or sandbox key. Sandbox keys start with \"TEST_\".\n   */\n  apiKey: string;\n\n  /**\n   * ShipEngine child account API key (partner API)\n   *\n   * This can be a production or sandbox key. Sandbox keys start with \"TEST_\".\n   */\n  onBehalfOf?: string;\n\n  /**\n   * The URL of the ShipEngine API. You can usually leave this unset and it will\n   * default to our public API.\n   */\n  baseURL?: string | URL;\n\n  /**\n   * Some ShipEngine API endpoints return paged data. This lets you control the\n   * number of items returned per request. Larger numbers will use more memory\n   * but will require fewer HTTP requests.\n   *\n   * Defaults to 50.\n   */\n  pageSize?: number;\n\n  /**\n   * If the ShipEngine client receives a rate limit error it can automatically\n   * retry the request after a few seconds. This setting lets you control how\n   * many times it will retry before giving up.\n   *\n   * Defaults to 1, which means up to 2 attempts will be made (the original\n   * attempt, plus one retry).\n   */\n  retries?: number;\n\n  /**\n   * The maximum amount of time (in milliseconds) to wait for a response from\n   * the ShipEngine server.\n   *\n   * Defaults to 60000 (60 seconds).\n   */\n  timeout?: number;\n}\n```\n\nMethods\n-------------------------------\n* [`createLabelFromRate`](./docs/create-label-from-rate.md) - When retrieving rates for shipments using the `getRatesWithShipmentDetails` method, the returned information contains a `rateId` property that can be used to purchase a label without having to refill in the shipment information repeatedly.\n* [`createLabelFromShipmentDetails`](./docs/create-label-from-shipment-details.md) - Purchase and print a label for shipment.\n* [`getRatesWithShipmentDetails`](./docs/get-rates-with-shipment-details.md) - Given some shipment details and rate options, this method returns a list of rate quotes.\n* [`listCarriers`](./docs/list-carriers.md) - Returns a list of carrier accounts that have been connected through\nthe [ShipEngine dashboard](https://www.shipengine.com/docs/carriers/setup/).\n* [`trackUsingLabelId`](./docs/track-using-label-id.md) - Track a package by its associated label ID.\n* [`trackUsingCarrierCodeAndTrackingNumber`](./docs/track-using-carrier-code-and-tracking-number.md) - Track a package for a given carrier and tracking number.\n* [`validateAddresses`](./docs/validate-addresses.md) - Indicates whether the provided addresses are valid. If the addresses are valid, the method returns a normalized version based on the standards of the country in which the address resides. If an address cannot be normalized, an error is returned.\n* [`voidLabelWithLabelId`](./docs/void-label-with-label-id.md) - Void a label with its Label ID.\n\nContributing\n--------------------------\nContributions, enhancements, and bug-fixes are welcome!  [Open an issue](https://github.com/ShipEngine/shipengine-js/issues) on GitHub and [submit a pull request](https://github.com/ShipEngine/shipengine-js/pulls).\n\n#### Building\nTo build the project locally on your computer:\n\n1. __Clone this repo__\u003cbr\u003e\n`git clone https://github.com/ShipEngine/shipengine-js.git`\n\n2. __Install dependencies__\u003cbr\u003e\n`npm install`\n\n3. __Build the code__\u003cbr\u003e\n`npm run build`\u003cbr\u003e\u003cbr\u003e\nOr you can use `npm run watch` to automatically re-build whenever source files change.\n\n4. __Lint the code__\u003cbr\u003e\n`npm run lint`\u003cbr\u003e\u003cbr\u003e\nOr you can use `npm run lint:fix` to automatically fix most linting errors.\n\n5. __Run the tests__\u003cbr\u003e\n`npm test`\u003cbr\u003e\u003cbr\u003e\nThis runs tests in both Node.js and web browsers. Use `npm run test:node` to only run Node.js tests, or `npm run test:browser` to only run browser tests.\n\nCommitting\n-------------------------\nThis project adheres to the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification.\n\nPublishing\n-------------------------\nPublishing new versions of the SDK to [NPM](https://www.npmjs.com/package/shipengine) is handled on GitHub via the [Release Please](https://github.com/googleapis/release-please) GitHub Actions workflow. Learn more about about Release PRs, updating the changelog, and commit messages [here](https://github.com/googleapis/release-please#how-should-i-write-my-commits).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshipengine%2Fshipengine-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshipengine%2Fshipengine-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshipengine%2Fshipengine-js/lists"}