Best Practices

Overview

The following are recommended best practices. If you encounter a problem with the Shipping APIs, please see Troubleshooting.

Use an SDK

Use an SDK to help avoid coding errors. See Client SDKs.

All Request Body Fields Should Have Specified Values

When issuing an API request, only pass in parameters that contain specified values. If an optional parameter has no value, exclude it from the request body completely.

Test on Sandbox Before Deploying to Production

To see how your application will run on production, test it first on the sandbox test environment. The sandbox environment uses the same hardware and code as the production environment and is intended specifically to show you how your application will run on production.

If you plan to run performance, penetration, or security tests, first contact Client Services Tech Support at ClientServicesTechSupport@pb.com with the dates and times, to avoid your tests being blacklisted.

Optimize Parameters if using Multithreading

If you use multithreading in your application, optimize the following on sandbox before deploying to production:

  • Number of threads
  • Number of sockets per process
  • Memory
  • Multithread vs. multi-process

Keep the Connection Open During Periods of High Volume

If you print multiple labels in a short period of time, leave the connection to Pitney Bowes open instead of opening it separately for each label request.

Configure Your Network With Failover Options

As with any network application, prepare for network and server failures by configuring your network to automatically transfer workload to secondary components should primary components become unavailable.