Skip to content

USPS International Rates

Alexey Busygin edited this page Jul 24, 2024 · 1 revision

USPS requires a separate API call to retrieve rates for international services. The call works the same way, but use USPSInternationalProvider instead. Your current USPS credentials will work with this and will return the available services between the origin and destination addresses:

    using var httpClient = new HttpClient();
    var rateManager = new RateManager();
    var upsConfiguration = new USPSProviderConfiguration(uspsUserId);
    rateManager.AddProvider(new USPSInternationalProvider(upsConfiguration, httpClient));

NOTE: This behavior will be changed in the future in favor of using a single USPSProvider.

Clone this wiki locally