Install ShipEngine .NET SDK via the .NET CLI.
dotnet add package ShipEngine
The only configuration requirement is an API key.
using ShipEngineSDK;
var shipengine = new ShipEngine("___YOUR_API_KEY_HERE__");
This C# SDK is automatically generated by the OpenAPI Generator project:
- API version: 1.1.202501091801
- SDK version: 3.0.0
- Generator version: 7.7.0
- Build package: org.openapitools.codegen.languages.CSharpClientCodegen For more information, please visit https://www.shipengine.com/contact/
- .NET Standard >=2.0
- .NET Core >=2.0
- .NET Framework >=4.6.2
API | Method | Description |
---|---|---|
Account | CreateAccountImage | Create an Account Image |
Account | DeleteAccountImageById | Delete Account Image By Id |
Account | GetAccountSettingsImagesById | Get Account Image By ID |
Account | ListAccountImages | List Account Images |
Account | ListAccountSettings | List Account Settings |
Account | UpdateAccountSettingsImagesById | Update Account Image By ID |
Addresses | ParseAddress | Parse an address |
Addresses | ValidateAddress | Validate An Address |
Batches | AddToBatch | Add to a Batch |
Batches | CreateBatch | Create A Batch |
Batches | DeleteBatch | Delete Batch By Id |
Batches | GetBatchByExternalId | Get Batch By External ID |
Batches | GetBatchById | Get Batch By ID |
Batches | ListBatchErrors | Get Batch Errors |
Batches | ListBatches | List Batches |
Batches | ProcessBatch | Process Batch ID Labels |
Batches | RemoveFromBatch | Remove From Batch |
Batches | UpdateBatch | Update Batch By Id |
CarrierAccounts | ConnectCarrier | Connect a carrier account |
CarrierAccounts | DisconnectCarrier | Disconnect a carrier |
CarrierAccounts | GetCarrierSettings | Get carrier settings |
CarrierAccounts | UpdateCarrierSettings | Update carrier settings |
Carriers | AddFundsToCarrier | Add Funds To Carrier |
Carriers | DisconnectCarrierById | Disconnect Carrier by ID |
Carriers | GetCarrierById | Get Carrier By ID |
Carriers | GetCarrierOptions | Get Carrier Options |
Carriers | ListCarrierPackageTypes | List Carrier Package Types |
Carriers | ListCarrierServices | List Carrier Services |
Carriers | ListCarriers | List Carriers |
Downloads | DownloadFile | Download File |
Insurance | AddFundsToInsurance | Add Funds To Insurance |
Insurance | ConnectInsurer | Connect a Shipsurance Account |
Insurance | DisconnectInsurer | Disconnect a Shipsurance Account |
Insurance | GetInsuranceBalance | Get Insurance Funds Balance |
Labels | CreateLabel | Purchase Label |
Labels | CreateLabelFromRate | Purchase Label with Rate ID |
Labels | CreateLabelFromShipment | Purchase Label with Shipment ID |
Labels | CreateReturnLabel | Create a return label |
Labels | GetLabelByExternalShipmentId | Get Label By External Shipment ID |
Labels | GetLabelById | Get Label By ID |
Labels | GetTrackingLogFromLabel | Get Label Tracking Information |
Labels | ListLabels | List labels |
Labels | VoidLabel | Void a Label By ID |
Manifests | CreateManifest | Create Manifest |
Manifests | GetManifestById | Get Manifest By Id |
Manifests | GetManifestRequestById | Get Manifest Request By Id |
Manifests | ListManifests | List Manifests |
PackagePickups | DeleteScheduledPickup | Delete a Scheduled Pickup |
PackagePickups | GetPickupById | Get Pickup By ID |
PackagePickups | ListScheduledPickups | List Scheduled Pickups |
PackagePickups | SchedulePickup | Schedule a Pickup |
PackageTypes | CreatePackageType | Create Custom Package Type |
PackageTypes | DeletePackageType | Delete A Custom Package By ID |
PackageTypes | GetPackageTypeById | Get Custom Package Type By ID |
PackageTypes | ListPackageTypes | List Custom Package Types |
PackageTypes | UpdatePackageType | Update Custom Package Type By ID |
Rates | CalculateRates | Get Shipping Rates |
Rates | CompareBulkRates | Get Bulk Rates |
Rates | EstimateRates | Estimate Rates |
Rates | GetRateById | Get Rate By ID |
ServicePoints | ServicePointsGetById | Get Service Point By ID |
ServicePoints | ServicePointsList | List Service Points |
Shipments | CancelShipments | Cancel a Shipment |
Shipments | CreateShipments | Create Shipments |
Shipments | GetShipmentByExternalId | Get Shipment By External ID |
Shipments | GetShipmentById | Get Shipment By ID |
Shipments | ListShipmentRates | Get Shipment Rates |
Shipments | ListShipments | List Shipments |
Shipments | ParseShipment | Parse shipping info |
Shipments | ShipmentsListTags | Get Shipment Tags |
Shipments | ShipmentsUpdateTags | Update Shipments Tags |
Shipments | TagShipment | Add Tag to Shipment |
Shipments | UntagShipment | Remove Tag from Shipment |
Shipments | UpdateShipment | Update Shipment By ID |
Tags | CreateTag | Create a New Tag |
Tags | DeleteTag | Delete Tag |
Tags | ListTags | Get Tags |
Tags | RenameTag | Update Tag Name |
Tokens | TokensGetEphemeralToken | Get Ephemeral Token |
Tracking | GetTrackingLog | Get Tracking Information |
Tracking | StartTracking | Start Tracking a Package |
Tracking | StopTracking | Stop Tracking a Package |
Warehouses | CreateWarehouse | Create Warehouse |
Warehouses | DeleteWarehouse | Delete Warehouse By ID |
Warehouses | GetWarehouseById | Get Warehouse By Id |
Warehouses | ListWarehouses | List Warehouses |
Warehouses | UpdateWarehouse | Update Warehouse By Id |
Warehouses | UpdateWarehouseSettings | Update Warehouse Settings |
Webhooks | CreateWebhook | Create a Webhook |
Webhooks | DeleteWebhook | Delete Webhook By ID |
Webhooks | GetWebhookById | Get Webhook By ID |
Webhooks | ListWebhooks | List Webhooks |
Webhooks | UpdateWebhook | Update a Webhook |
These methods have been deprecated in favor of the methods listed above, but are still in the SDK.
CreateLabelFromRate
- When retrieving rates for shipments using theGetRatesWithShipmentDetails
method, the returned information contains aRateId
property that can be used to purchase a label without having to refill in the shipment information repeatedly.CreateLabelFromShipmentDetails
- Purchase and print a label for shipment.GetRatesWithShipmentDetails
- Given some shipment details and rate options, this method returns a list of rate quotes.ListCarriers
- Returns a list of carrier accounts that have been connected through the ShipEngine dashboard.TrackUsingLabelId
- Track a package by its associated label ID.TrackUsingCarrierCodeAndTrackingNumber
- Track a package for a given carrier and tracking number.ValidateAddresses
- 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.VoidLabelWithLabelId
- Void a label with its Label ID.CreateManifests
- Create a shipment manifest.
Contributions, enhancements, and bug-fixes are welcome! Open an issue on GitHub and submit a pull request.
To build the project locally on your computer:
-
Clone this repo
git clone https://github.com/ShipEngine/shipengine-dotnet.git
-
Install .NET 8.x
-
Install dependencies
dotnet restore
-
Build the code
dotnet build
-
Format the code
dotnet format
-
Run the tests
dotnet test
By default, the test project targets all supported frameworks, if your environment only supports a subset then you can specify in the CLI.
dotnet test -f net8.0
To regenerate the SDK from the OpenAPI spec, you will first need to get the latest version of the spec. It can be downloaded from the online documentation
and should be saved to ./generation/swagger.json
. Then run npm run generate
from the command line. This will regenerate all the API calls and models, but not docs or tests.
The templates for autogeneration were extracted using the command:
npx @openapitools/openapi-generator-cli author template -g csharp -o generation/templates
Create a fork for your changes.
Update the Changelog with any relevant new features or bug fixes and modify the packageVersion
property in the .openapitools.json
file to match the new version.
In the ShipEngine.csproj
file, update to the desired version (using semantic versioning) and push to your fork.
Run dotnet format
Create a pull request.
Once a member of the ShipEngine team reviews your PR and it's merged to main, the build pipeline will handle all the necessary github tags and nuget packaging and publishing.