{"id":48381900,"url":"https://github.com/alexeybusygin/shippingrates","last_synced_at":"2026-04-05T21:01:32.947Z","repository":{"id":42136658,"uuid":"240738325","full_name":"alexeybusygin/ShippingRates","owner":"alexeybusygin","description":".NET wrapper for UPS, FedEx, USPS and DHL shipping rate APIs","archived":false,"fork":false,"pushed_at":"2026-04-05T19:32:48.000Z","size":900,"stargazers_count":62,"open_issues_count":4,"forks_count":17,"subscribers_count":7,"default_branch":"master","last_synced_at":"2026-04-05T20:33:48.527Z","etag":null,"topics":["dhl","dhl-ecommerce","dotnet","dotnet-standard","fedex","shipping","shipping-rates","ups","usps"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alexeybusygin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"license.md","code_of_conduct":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-02-15T15:34:06.000Z","updated_at":"2026-04-05T19:32:25.000Z","dependencies_parsed_at":"2024-07-07T20:29:41.181Z","dependency_job_id":"e33c9df2-c5f7-4fee-961a-d40d7d6809bf","html_url":"https://github.com/alexeybusygin/ShippingRates","commit_stats":null,"previous_names":["alexeybusygin/shipping.rates"],"tags_count":36,"template":false,"template_full_name":null,"purl":"pkg:github/alexeybusygin/ShippingRates","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexeybusygin%2FShippingRates","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexeybusygin%2FShippingRates/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexeybusygin%2FShippingRates/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexeybusygin%2FShippingRates/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alexeybusygin","download_url":"https://codeload.github.com/alexeybusygin/ShippingRates/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexeybusygin%2FShippingRates/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31449836,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-05T15:22:31.103Z","status":"ssl_error","status_checked_at":"2026-04-05T15:22:00.205Z","response_time":75,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["dhl","dhl-ecommerce","dotnet","dotnet-standard","fedex","shipping","shipping-rates","ups","usps"],"created_at":"2026-04-05T21:00:50.929Z","updated_at":"2026-04-05T21:01:32.941Z","avatar_url":"https://github.com/alexeybusygin.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ShippingRates\n\n[![Build](https://github.com/alexeybusygin/ShippingRates/actions/workflows/build.yml/badge.svg)](https://github.com/alexeybusygin/ShippingRates/actions/workflows/build.yml)\n[![NuGet Version](https://img.shields.io/nuget/v/ShippingRates.svg?style=flat-square)](https://www.nuget.org/packages/ShippingRates)\n\nShippingRates is a .NET library for retrieving shipping rates from UPS, FedEx, USPS, and DHL APIs.\n\n## Why Use It\n\n- Query multiple carriers through one `RateManager`\n- Work with sync or async APIs\n- Support multiple packages in a single shipment\n- Apply shipment-level options such as Saturday delivery\n- Extend returned prices with custom rate adjusters\n\n## Supported Platforms\n\n- .NET 6+\n- .NET Standard 2.0\n- .NET Framework 4.6.1+\n\n## Install\n\nAvailable on [NuGet](https://www.nuget.org/packages/ShippingRates):\n\n```powershell\ndotnet add package ShippingRates\n```\n\n## Choose Your Path\n\n- New integration: start with [Quick Start](#quick-start), then open the carrier-specific page you need in [Carrier Setup](#carrier-setup).\n- Upgrading from an older version: start with [Breaking changes](docs/Breaking-Changes.md).\n- Tuning shared shipment behavior: see [Shipment Options](#shipment-options).\n- Looking for deeper docs: open [docs/README.md](docs/README.md).\n\n## Upgrade Notes\n\nShippingRates `4.x` includes FedEx breaking changes and uses the modern FedEx REST API with OAuth 2.0.\n\nIf you are upgrading an existing integration, start with [Breaking changes](docs/Breaking-Changes.md).\n\n## Quick Start\n\n```csharp\nusing System.Collections.Generic;\nusing System.Net.Http;\nusing ShippingRates;\nusing ShippingRates.ShippingProviders.FedEx;\nusing ShippingRates.ShippingProviders;\nusing ShippingRates.ShippingProviders.Usps;\n\nusing var httpClient = new HttpClient();\n\nvar rateManager = new RateManager();\n\nvar upsConfiguration = new UPSProviderConfiguration\n{\n    ClientId = upsClientId,\n    ClientSecret = upsClientSecret,\n    AccountNumber = upsAccountNumber,\n    UseProduction = false\n};\nrateManager.AddProvider(new UPSProvider(upsConfiguration, httpClient));\n\nvar fedExConfiguration = new FedExProviderConfiguration\n{\n    ClientId = fedexClientId,\n    ClientSecret = fedexClientSecret,\n    AccountNumber = fedexAccountNumber,\n    HubId = fedexHubId,\n    UseProduction = false\n};\nrateManager.AddProvider(new FedExProvider(fedExConfiguration, httpClient));\n\nvar uspsConfiguration = new UspsProviderConfiguration\n{\n    ClientId = uspsClientId,\n    ClientSecret = uspsClientSecret,\n    UseProduction = false\n};\nrateManager.AddProvider(new UspsProvider(uspsConfiguration, httpClient));\n\nvar dhlConfiguration = new DHLProviderConfiguration(dhlSiteId, dhlPassword, useProduction: false);\nrateManager.AddProvider(new DHLProvider(dhlConfiguration, httpClient));\n\nvar packages = new List\u003cPackage\u003e\n{\n    new Package(12, 12, 12, 35, 150),\n    new PackageKgCm(4, 4, 6, 15, 250)\n};\n\nvar origin = new Address(\"\", \"CT\", \"06405\", \"US\");\nvar destination = new Address(\"\", \"\", \"20852\", \"US\");\n\nShipment shipment = await rateManager.GetRatesAsync(origin, destination, packages);\n\nforeach (Rate rate in shipment.Rates)\n{\n    Console.WriteLine(rate);\n}\n```\n\nThe sample app in [SampleApp/Program.cs](SampleApp/Program.cs) shows a fuller end-to-end setup.\n\n## Carrier Setup\n\nUse the carrier-specific setup pages for constructor overloads, configuration options, and examples:\n\n- [UPS provider](docs/UPS.md)\n- [FedEx provider](docs/FedEx.md)\n- [USPS provider](docs/USPS.md)\n- [DHL provider](docs/DHL.md)\n\n## Shipment Options\n\nPass shipment-level options through `ShipmentOptions`:\n\n```csharp\nvar shipment = await rateManager.GetRatesAsync(\n    origin,\n    destination,\n    packages,\n    new ShipmentOptions\n    {\n        SaturdayDelivery = true,\n        ShippingDate = new DateTime(2020, 7, 15),\n        PreferredCurrencyCode = \"EUR\",\n        FedExOneRate = true,\n        FedExPackagingTypeOverride = FedExPackagingType.FedExEnvelope\n    });\n```\n\n| Name | Default | Meaning |\n| --- | --- | --- |\n| `SaturdayDelivery` | `false` | Request Saturday delivery rates when available. |\n| `ShippingDate` | `null` | Pickup date. Uses the current date and time when omitted. |\n| `PreferredCurrencyCode` | `USD` | Preferred ISO currency code for FedEx rates. |\n| `FedExOneRate` | `false` | Enable FedEx One Rate pricing. |\n| `FedExPackagingTypeOverride` | `null` | Override the FedEx packaging type for the shipment. |\n| `FedExOneRatePackageOverride` | `null` | Legacy FedEx One Rate override. Prefer `FedExPackagingTypeOverride`. |\n\nIf `ShipmentOptions.SaturdayDelivery` is enabled, inspect `Rate.Options.SaturdayDelivery` on returned rates:\n\n```csharp\nvar anySaturdayDeliveryMethods = shipment.Rates.Any(r =\u003e r.Options.SaturdayDelivery);\n```\n\n## Error Handling\n\n`RateManager.GetRates` and `RateManager.GetRatesAsync` aggregate provider responses into:\n\n- `shipment.Errors` for carrier/API errors that are generally safe to surface to end users\n- `shipment.InternalErrors` for internal processing failures and diagnostics\n\n```csharp\nforeach (var error in shipment.Errors)\n{\n    Console.WriteLine(error.Number);\n    Console.WriteLine(error.Source);\n    Console.WriteLine(error.Description);\n}\n\nforeach (var error in shipment.InternalErrors)\n{\n    Console.WriteLine(error);\n}\n```\n\n## Documentation\n\n- [Documentation index](docs/README.md)\n- [UPS provider](docs/UPS.md)\n- [FedEx provider](docs/FedEx.md)\n- [USPS provider](docs/USPS.md)\n- [DHL provider](docs/DHL.md)\n- [Breaking changes](docs/Breaking-Changes.md)\n- [Release notes](docs/Release-Notes.md)\n- [HttpClient lifecycle](docs/HttpClient-lifecycle.md)\n- [Logging](docs/Logging.md)\n- [Rate adjusters](docs/Rate-Adjusters.md)\n- [Custom shipping providers](docs/Custom-Shipping-Providers.md)\n- [3rd party docs](docs/3rd-Party-Docs.md)\n\n## Credits\n\nOriginally forked from [DotNetShipping](https://github.com/kylewest/DotNetShipping) by [@kylewest](https://github.com/kylewest). Package icon by [Fredy Sujono](https://www.iconfinder.com/freud).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexeybusygin%2Fshippingrates","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexeybusygin%2Fshippingrates","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexeybusygin%2Fshippingrates/lists"}