Negotiated Rates - alexeybusygin/ShippingRates Wiki

Original URL: https://github.com/alexeybusygin/ShippingRates/wiki/Negotiated-Rates

Service providers need some setup to return negotiated rates.

FedEx

For FedEx you need to set the UseNegotiatedRates flag:

    rateManager.AddProvider(new FedExProvider(
        fedexKey,
        fedexPassword,
        fedexAccountNumber,
        fedexMeterNumber,
        fedexUseProduction)
    {
        UseNegotiatedRates = true
    });

UPS

For UPS you need to provide ShipperNumber in the constructor and set the UseNegotiatedRates flag (default timeout value is 10 and serviceDescription can be an empty string):

    rateManager.AddProvider(new UPSProvider(
        upsLicenseNumber,
        upsUserId,
        upsPassword,
        timeout,
        serviceDescription,
        shipperNumber: "111")
    {
        UseNegotiatedRates = true
    });

DHL

For DHL you need to provide PaymentAccountNumber in the DHLProviderConfiguration:

    var dhlConfiguration = new DHLProviderConfiguration(dhlSiteId, dhlPassword, useProduction: true)
    {
       PaymentAccountNumber = "111"
    };
    rateManager.AddProvider(new DHLProvider(dhlConfiguration));

USPS

USPS doesn't have negotiated rates but you can get the online discounted rates by setting the Service to Services.Online.

    var configuration = new USPSProviderConfiguration(uspsUserId)
    {
        Service = Services.Online
    };
    rateManager.AddProvider(new USPSProvider(configuration));