shippingapiv2 1.5.3
See the version list below for details.
dotnet add package shippingapiv2 --version 1.5.3
NuGet\Install-Package shippingapiv2 -Version 1.5.3
<PackageReference Include="shippingapiv2" Version="1.5.3" />
paket add shippingapiv2 --version 1.5.3
#r "nuget: shippingapiv2, 1.5.3"
// Install shippingapiv2 as a Cake Addin #addin nuget:?package=shippingapiv2&version=1.5.3 // Install shippingapiv2 as a Cake Tool #tool nuget:?package=shippingapiv2&version=1.5.3
shippingapi - the C# library for the Shipping API
Shipping API Sample.
This C# SDK is automatically generated by the OpenAPI Generator project:
- API version: 1.0.0
- SDK version: 2.0.0
- Build package: org.openapitools.codegen.languages.CSharpClientCodegen
Frameworks supported
- .NET 4.0 or later
- Windows Phone 7.1 (Mango)
Dependencies
- RestSharp - 105.1.0 or later
- Json.NET - 7.0.0 or later
- JsonSubTypes - 1.2.0 or later
The DLLs included in the package may not be the latest version. We recommend using NuGet to obtain the latest version of the packages:
Install-Package RestSharp
Install-Package Newtonsoft.Json
Install-Package JsonSubTypes
NOTE: RestSharp versions greater than 105.1.0 have a bug which causes file uploads to fail. See RestSharp#742
Installation
Run the following command to generate the DLL
- [Mac/Linux]
/bin/sh build.sh
- [Windows]
build.bat
Then include the DLL (under the bin
folder) in the C# project, and use the namespaces:
using shippingapi.Api;
using shippingapi.Client;
using shippingapi.Model;
Packaging
A .nuspec
is included with the project. You can follow the Nuget quickstart to create and publish packages.
This .nuspec
uses placeholders from the .csproj
, so build the .csproj
directly:
nuget pack -Build -OutputDirectory out shippingapi.csproj
Then, publish to a local feed or other host and consume the new package via Nuget as usual.
Getting Started
using System.Collections.Generic;
using System.Diagnostics;
using shippingapi.Api;
using shippingapi.Client;
using shippingapi.Model;
namespace Example
{
public class Example
{
public static void Main()
{
Configuration.Default.BasePath = "https://shipping-api-sandbox.pitneybowes.com/shippingservices";
// Configure OAuth2 access token for authorization: oAuth2ClientCredentials
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new AddressValidationApi(Configuration.Default);
var address = new Address(); // Address | Address object that needs to be validated.
var xPBUnifiedErrorStructure = true; // bool? | Set this to true to use the standard [error object](https://shipping.pitneybowes.com/reference/error-object.html#standard-error-object) if an error occurs. (optional) (default to true)
var minimalAddressValidation = true; // bool? | When set to true, the complete address (delivery line and last line) is validated but only the last line (city, state, and postal code) would be changed by the validation check. (optional)
try
{
// Address validation
Address result = apiInstance.VerifyAddress(address, xPBUnifiedErrorStructure, minimalAddressValidation);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling AddressValidationApi.VerifyAddress: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Documentation for API Endpoints
All URIs are relative to https://shipping-api-sandbox.pitneybowes.com/shippingservices
Class | Method | HTTP request | Description |
---|---|---|---|
AddressValidationApi | VerifyAddress | POST /v1/addresses/verify | Address validation |
AddressValidationApi | VerifyAndSuggestAddress | POST /v1/addresses/verify-suggest | Address Suggestion |
CarrierInfoApi | GetCarrierFacilities | POST /v1/carrier-facility | Find Carrier Facilities |
CarrierInfoApi | GetCarrierLicenseAgreement | GET /v1/carrier/license-agreements | This operation retrieves a carrier's license agreement. |
CarrierInfoApi | GetCarrierServiceRules | GET /v1/information/rules/rating-services | Retrieves the rules governing the carrier's services. |
CarrierInfoApi | GetCarrierSupportedDestination | GET /v1/countries | This operation returns a list of supported destination countries to which the carrier offers international shipping services. |
ContainerApi | GetContainerizedParcelsLabels | POST /v1/container-manifest | Create Container Manifest Label |
CrossBorderQuotesApi | GetCrossBorderQuotes | POST /v1/crossborder/checkout/quotes | Cross-Border Quotes |
CrossBorderQuotesApi | PredictedHSCode | POST /v1/crossborder/hs-classification/items | Predicts the HS Code for a parcel |
ManifestsApi | CreateManifest | POST /v1/manifests | This operation creates an end-of-day manifest |
ManifestsApi | ReprintManifest | GET /v1/manifests/{manifestId} | reprintManifest |
ManifestsApi | RetryManifest | GET /v1/manifests | retryManifest |
ParcelProtectionApi | CancelParcelProtection | POST /v1/parcel-protection/void | Parcel Protection Coverage |
ParcelProtectionApi | GetParcelProtectionCoverage | POST /v1/parcel-protection/create | Parcel Protection Coverage |
ParcelProtectionApi | GetParcelProtectionQuote | POST /v1/parcel-protection/quote | Parcel Protection Quote |
ParcelProtectionApi | GetParcelProtectionReports | GET /v1/parcel-protection/{developerId}/policies | Parcel Protection Reports |
PickupApi | CancelPickup | POST /v1/pickups/{pickupId}/cancel | Cancel Pickup |
PickupApi | GetPickupschedule | POST /v1/pickups/schedule | Address validation |
RateParcelsApi | RateParcel | POST /v1/rates | Use this operation to rate a parcel before you print and purchase a shipment label. You can rate a parcel for multiple services and multiple parcel types with a single API request. |
ShipmentApi | CancelShipment | DELETE /v1/shipments/{shipmentId} | cancelShipment |
ShipmentApi | CreateShipmentLabel | POST /v1/shipments | This operation creates a shipment and purchases a shipment label. |
ShipmentApi | ReprintShipment | GET /v1/shipments/{shipmentId} | reprintShipment |
ShipmentApi | RetryShipment | GET /v1/shipments | retryShipment |
TrackingApi | AddTrackingEvents | POST /v2/track/events | getTrackingDetails |
TrackingApi | GetTrackingDetails | GET /v1/tracking/{trackingNumber} | getTrackingDetails |
TransactionReportsApi | GetTransactionReport | GET /v4/ledger/developers/{developerId}/transactions/reports | This operation retrieves all transactions for a specified period of time. |
Documentation for Models
- Model.AddTrackingEvents
- Model.AddTrackingEventsEvents
- Model.AddTrackingEventsReferences
- Model.AdditionalAddress
- Model.Address
- Model.AddressSuggestionResponse
- Model.AddressSuggestionResponseSuggestions
- Model.AddressVerifySuggest
- Model.BatteryDetails
- Model.CancelShipment
- Model.Carrier
- Model.CarrierFacilityRequest
- Model.CarrierFacilityRequestAddress
- Model.CarrierFacilityResponse
- Model.CarrierFacilityResponseCarrierFacilityOptions
- Model.CarrierFacilityResponseCarrierFacilitySuggestions
- Model.CarrierFacilityResponseFacilityHours
- Model.CarrierFacilityResponseFacilityTimings
- Model.CarrierPayment
- Model.CarrierRule
- Model.CommodityInfo
- Model.ContainerDetails
- Model.ContainerManifestResponse
- Model.ContainerManifestResponseData
- Model.CrossBorderQuotesErrors
- Model.CrossBorderQuotesErrorsErrors
- Model.CrossBorderQuotesErrorsErrorsErrors
- Model.CrossBorderQuotesErrorsQuote
- Model.CrossBorderQuotesErrorsQuoteLines
- Model.CrossBorderQuotesErrorsUnitErrors
- Model.CrossBorderQuotesRequest
- Model.CrossBorderQuotesRequestAttributes
- Model.CrossBorderQuotesRequestBasketItems
- Model.CrossBorderQuotesRequestCategories
- Model.CrossBorderQuotesRequestDescriptions
- Model.CrossBorderQuotesRequestIdentifiers
- Model.CrossBorderQuotesRequestItemDimension
- Model.CrossBorderQuotesRequestPricing
- Model.CrossBorderQuotesRequestPricingCodPrice
- Model.CrossBorderQuotesRequestRates
- Model.CrossBorderQuotesRequestUnitWeight
- Model.CrossBorderQuotesResponse
- Model.CrossBorderQuotesResponseLineRates
- Model.CrossBorderQuotesResponseQuote
- Model.CrossBorderQuotesResponseQuoteLines
- Model.CrossBorderQuotesResponseTotalRates
- Model.CrossBorderQuotesResponseUnitRates
- Model.CrossBorderQuotesResponseUnitRatesDeliveryCommitment
- Model.Customs
- Model.CustomsInfo
- Model.CustomsItem
- Model.DeliveryCommitment
- Model.DimensionRules
- Model.DimensionRulesMaxParcelDimensions
- Model.DimensionRulesMinParcelDimensions
- Model.Discount
- Model.DocTabItem
- Model.Document
- Model.DocumentPage
- Model.Errors
- Model.HazmatDetails
- Model.ISOCountryCode
- Model.InfectiousSubstanceContact
- Model.InlineResponse200
- Model.InlineResponse2001
- Model.InlineResponse2002
- Model.Manifest
- Model.PageRealTransactionDetailReport
- Model.Parameter
- Model.Parcel
- Model.ParcelDimension
- Model.ParcelProtectionCreateRequest
- Model.ParcelProtectionCreateRequestShipmentInfo
- Model.ParcelProtectionCreateRequestShipmentInfoConsigneeInfo
- Model.ParcelProtectionCreateRequestShipmentInfoParcelInfo
- Model.ParcelProtectionCreateRequestShipmentInfoParcelInfoCommodityList
- Model.ParcelProtectionCreateRequestShipmentInfoShipperInfo
- Model.ParcelProtectionCreateRequestShipmentInfoShipperInfoAddress
- Model.ParcelProtectionCreateResponse
- Model.ParcelProtectionCreateResponseParcelProtectionFeesBreakup
- Model.ParcelProtectionPolicyResponse
- Model.ParcelProtectionPolicyResponseContent
- Model.ParcelProtectionPolicyResponsePolicyDetails
- Model.ParcelProtectionPolicyResponseShipmentDetails
- Model.ParcelProtectionPolicyResponseShipperInfo
- Model.ParcelProtectionPolicyResponseShipperInfoAddress
- Model.ParcelProtectionPolicyResponseSort
- Model.ParcelProtectionQuoteRequest
- Model.ParcelProtectionQuoteRequestShipmentInfo
- Model.ParcelProtectionQuoteRequestShipmentInfoConsigneeInfo
- Model.ParcelProtectionQuoteRequestShipmentInfoParcelInfo
- Model.ParcelProtectionQuoteRequestShipmentInfoParcelInfoCommodityList
- Model.ParcelProtectionQuoteRequestShipmentInfoShipperInfo
- Model.ParcelProtectionQuoteRequestShipmentInfoShipperInfoAddress
- Model.ParcelProtectionQuoteResponse
- Model.ParcelProtectionQuoteResponseParcelProtectionFeesBreakup
- Model.ParcelType
- Model.ParcelTypeRules
- Model.ParcelWeight
- Model.PrerequisiteRules
- Model.RadioActiveParcelDimension
- Model.RadioActivityDetail
- Model.RadioNuclideDetail
- Model.Rate
- Model.RealTransactionDetailReport
- Model.SchedulePickup
- Model.SchedulePickupPickupSummary
- Model.SchedulePickupResponse
- Model.SchedulePickupTotalWeight
- Model.SearchCriteria
- Model.Services
- Model.ServicesParameterRule
- Model.Shipment
- Model.Signatory
- Model.SpecialService
- Model.SpecialServiceCodes
- Model.SpecialServicesRule
- Model.Surcharge
- Model.Tax
- Model.Trackable
- Model.TrackingAddress
- Model.TrackingResponse
- Model.TrackingResponseScanDetailsList
- Model.UnitOfDimension
- Model.UnitOfWeight
- Model.VoidParcelProtectionRequest
- Model.VoidParcelProtectionResponse
- Model.WeightRules
Documentation for Authorization
oAuth2ClientCredentials
- Type: OAuth
- Flow: application
- Authorization URL:
- Scopes: N/A
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net45 is compatible. net451 was computed. net452 was computed. net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
-
- JsonSubTypes (>= 1.6.0)
- NewtonSoft.Json (>= 12.0.3)
- NUnit (>= 3.11.0)
- RestSharp (>= 105.1.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated | |
---|---|---|---|
1.6.14 | 128 | 5/6/2024 | |
1.6.13 | 113 | 4/10/2024 | |
1.6.12 | 106 | 3/22/2024 | |
1.6.11 | 246 | 10/27/2023 | |
1.6.10 | 147 | 9/20/2023 | |
1.6.9 | 170 | 7/18/2023 | |
1.6.8 | 184 | 6/30/2023 | |
1.6.7 | 186 | 6/27/2023 | |
1.6.6 | 193 | 6/21/2023 | |
1.6.5 | 185 | 6/14/2023 | |
1.6.4 | 169 | 6/13/2023 | |
1.6.3 | 513 | 7/20/2022 | |
1.6.2 | 483 | 7/20/2022 | |
1.6.1 | 568 | 1/19/2022 | |
1.6.0 | 442 | 1/19/2022 | |
1.5.3 | 314 | 12/22/2021 | |
1.5.2 | 344 | 10/12/2021 | |
1.5.1 | 317 | 10/11/2021 | |
1.5.0 | 393 | 3/25/2021 | |
1.4.0 | 347 | 3/22/2021 | |
1.3.0 | 398 | 3/15/2021 | |
1.2.0 | 484 | 3/10/2021 | |
1.1.0 | 395 | 1/13/2021 |