-
Notifications
You must be signed in to change notification settings - Fork 16
USPS Special Services
Alexey Busygin edited this page Jul 16, 2022
·
4 revisions
USPS Special Services can be requested using USPSProviderConfiguration.SpecialServices
field:
using ShippingRates.ShippingProviders.USPS;
var configuration = new USPSProviderConfiguration(userId: "xxxx")
{
Service = Services.Library,
SpecialServices = new SpecialServices[] { SpecialServices.SpecialHandlingFragile }
};
rateManager.AddProvider(new USPSProvider(configuration));
Please pay attention that Service
should be specified explicitly and shouldn't be Services.All
, Services.Online
or Services.Plus
. Otherwise, USPS will ignore special services.
The following special services will be applied automatically to the rates request:
- If any of the packages have
SignatureRequiredOnDelivery
set thenSpecialServices.AdultSignatureRequired
will be applied. - If any of the packages have
InsuredValue
set thenSpecialServices.Insurance
,SpecialServices.InsurancePriorityMail
,SpecialServices.InsurancePriorityMailExpress
will be applied.
public enum SpecialServices
{
Insurance = 100,
InsurancePriorityMailExpress = 101,
ReturnReceipt = 102,
CollectOnDelivery = 103,
CertificateOfMailingForm3665 = 104,
CertifiedMail = 105,
USPSTracking = 106,
SignatureConfirmation = 108,
RegisteredMail = 109,
ReturnReceiptElectronic = 110,
RegisteredMailCODCollectionCharge = 112,
ReturnReceiptPriorityMailExpress = 118,
AdultSignatureRequired = 119,
AdultSignatureRestrictedDelivery = 120,
InsurancePriorityMail = 125,
USPSTrackingElectronic = 155,
SignatureConfirmationElectronic = 156,
CertificateOfMailingForm3817 = 160,
CertifiedMailRestrictedDelivery = 170,
CertifiedMailAdultSignatureRequired = 171,
CertifiedMailAdultSignatureRestrictedDelivery = 172,
SignatureConfirmRestrictDelivery = 173,
SignatureConfirmationElectronicRestrictedDelivery = 174,
CollectOnDeliveryRestrictedDelivery = 175,
RegisteredMailRestrictedDelivery = 176,
InsuranceRestrictedDelivery = 177,
InsuranceRestrictDeliveryPriorityMail = 179,
InsuranceRestrictDeliveryPriorityMailExpress = 178,
InsuranceRestrictDeliveryBulkOnly = 180,
ScanRetention = 181,
ScanSignatureRetention = 182,
[Obsolete("Effective July 10, 2022, USPS will eliminate Special Handling - Fragile")]
SpecialHandlingFragile = 190
}