Introduction

Welcome to 4D Shipping SDK, the most comprehensive suite of components for shipping, tracking, label creation, rate calculation, and address verification! The included components allow for easy integration with shipping services of major international carriers including FedEx, UPS, USPS, and Canada Post.

Once the 4D Shipping SDK components are integrated into your application, you can communicate with the servers over a secure SSL connection.

Before using these components, the user must contact the specified provider to obtain access to that provider's OnLine Tools.

Each request requires specific processing based on the type; therefore, each component has a unique URL for connection purposes.

Note: FedEx and the FedEx logo are registered service marks. All rights reserved.

Note: UPS, the UPS Shield trademark, the UPS Ready mark, the UPS OnLine Tools mark and the Color Brown are trademarks of United Parcel Service of America, Inc. All Rights Reserved.

Note: United States Postal Service, Postal Service, Post Office, StampsOnline, Express Mail, Priority Mail, Delivery Confirmation, First-Class Mail, Global Priority Mail, Parcel Post, Global Express Guaranteed, ZIP Code, the Eagle Logo and Fly Like An Eagle are trademarks of the United States Postal Service. This list is not intended to be exhaustive. For a more complete listing of many USPS trademarks, visit the U.S. Patent and Trademark Office Web site at the link below. http://www.usps.com/homearea/docs/termsofuse.htm?from=home_footer&page=termsofuse

Note: Endicia, A Newell Rubbermaid Company. All rights reserved.

Note: Certain Canada Post trademarks, trade-names, images, logos and pictures are proprietary to Canada Post Corporation or other entities. All rights reserved.

Included Modules

CanadaPostAddressEasily find nearby Canada Post locations.
CanadaPostRatesProvides access to pre-ship rate information for a single package per your established Canada Post account rates.
CanadaPostShipAllows you to generate domestic labels using Canada Post.
CanadaPostShipIntlAllows you to generate international labels using Canada Post.
CanadaPostTrackProvides tracking information and SPOD for a given tracking number or other shipment identifier.
CertMgrThe CertMgr component is used to create, read, and manage certificates.
EzAddressChecks U.S. shipping addresses.
EzRatesProvides domestic or international rates based on weight, service, and origin/destination information.
EzShipAllows you to generate a shipping label for any domestic services complete with addresses and barcode.
EzTrackRetrieves tracking data for any package shipped from origin to delivery.
FedExAddressAllows you to validate or complete recipient addresses.
FedExFreightRatesProvides access to pre-ship rate information for a freight shipment per your established FedEx account rates.
FedExFreightShipAllows you to generate a FedEx shipping label for any of FedEx freight services complete with addresses and barcode, or cancel a shipment.
FedExMgrProvides a way to subscribe a provider with FedEx Web Services and to register a CSP user with FedEx.
FedExRatesProvides access to pre-ship rate information for a single package per your established FedEx account rates.
FedExShipAllows you to generate a FedEx shipping label for any of FedEx domestic services complete with addresses and barcode, cancel a shipment or close out the FedEx Ground shipments.
FedExShipIntlAllows you to generate a FedEx shipping label for any of FedEx international services complete with addresses and barcode, cancel a shipment, or close out the FedEx Ground shipments.
FedExTrackProvides tracking information, SPOD, and notification for a given tracking number or other shipment identifier.
OAuthThe OAuth component is used to authorize a client and provide an authorization string used in future requests.
ShipRequestAllows you to create, send, and parse a custom request.
UPSAddressChecks either a general validation of a city, state, and zip code, or a validation and classification of a specific, street-level address, and suggests alternates if an error is discovered.
UPSFreightRatesProvides UPS Freight Rates service.
UPSFreightShipProvides UPS Freight Shipment service.
UPSRatesProvides domestic or international rates based on weight, service, and origin/destination information.
UPSShipAllows you to generate a UPS shipping label for any of UPS domestic services complete with addresses and barcode, or cancel shipments.
UPSShipIntlAllows you to generate a UPS shipping label for any of UPS international services complete with addresses and barcode, cancel shipments.
UPSTrackProvides up-to-the-minute status reports of shipments, domestic and international, from origin to delivery.
USPSAddressProvides address standardization, zip code lookup and city/state lookup.
USPSMgrProvides a way to perform account management operations.
USPSRatesDetermines domestic and international postage rates based on weight, size, class of mail, and origin/destination information.
USPSShipAllows you to generate a USPS shipping label for any of USPS domestic services complete with addresses and barcode, or manage pickups. To get a label with USPS, postage must be paid. To get a label with postage you must use ppNone , ppEndicia , or ppStamps as your PostageProvider . Note that when PostageProvider is set to ppNone the GetPackageLabel method will generate an eVS label. The eVS (or Electronic Verification System) Label API allows high-volume package mailers and package consolidators to document and pay postage, including special service fees, using electronic manifest files.
USPSShipIntlAllows you to generate a USPS shipping label for any of USPS international services complete with addresses and barcode. Note that when PostageProvider is set to ppNone the GetPackageLabel method will generate an eVS label. The eVS International Label API lets customers generate eVS labels with integrated customs declaration forms.
USPSTrackRetrieves tracking data for any package shipped with Delivery or Signature confirmation.

Additional Information

You will always find the latest information about 4D Shipping SDK at our web site: www.4dpayments.com. We offer free, fully-functional 30-day trials for all of our products, and our technical support staff are happy to answer any questions you may have during your evaluation.

Please direct all technical questions to support@4dpayments.com. To help support technicians assist you as quickly as possible, please provide an detailed and accurate description of your problem, the results you expected, and the results that you received while using our product. For questions about licensing and pricing, and all other general inquiries, please contact sales@4dpayments.com.

Thank You!

Thank you for choosing 4D Shipping SDK for your development needs. We realize that you have a choice among development tools, and that by choosing us you are counting on us to be a key component in your business. We work around the clock to provide you with ongoing enhancements, support, and innovative products; and we will always do our best to exceed your expectations!

Getting Started

This section provides step-by-step instructions for creating and configuring accounts needed for the different shipping providers.

FedEx

Before starting to use this class, all developers must first register for these services with FedEx by visiting Developer Solution Center (DSC) at http://www.fedex.com/us/developer/product/resources.html and following the instructions. At the time of registration, a Developer Key, Password, Test Account Number, and a Test Meter Number are provided to you by FedEx. If you experience any problems during the registration process, you can send an email to websupport@fedex.com.

When obtaining an account from FedEx, the account should be for the Web Services XML based API. FedEx offers both an XML and SOAP based Web Services API. The component supports the XML based Web Services API.

FedEx supplies a complete online operating environment with which to test your applications against live FedEx servers. In order to execute test interactions, you must first include all credentials mentioned above in your code. This way, you can access FedEx Web Services and engage in real-time online testing in the FedEx hosted test environment by using this class. These credentials are your security elements and are not to be shared with anybody.

Once the 4D Shipping SDK components are integrated, your server communicates with the FedEx server over a secure SSL connection. You can connect directly to the FedEx back end systems using your own communications protocol.

When any of the 4D Shipping SDK components return a response, it will either return a successful response document or an error document.

Before moving to the production environment, you will have to go through the certification process with FedEx for the Ship services only (which is considered an advanced service by FedEx).

You do not need to go through the certificate process to use the standard services (Rates, Track, Locator). However, when using these services in the production environment, you will have to use the production credentials in all your requests.

Our class ensures a smooth transition during this process. It ensures that your implementation meets a number of requirements for safe, secure, and effective operation of your solution in the FedEx production environment. However, based on your needs, please note that the certification requirements differ based on whether you are a corporate or commercial developer, and whether you are implementing using the advanced or standard services.

The full version of 4D Shipping SDK gives you access to a certification package that makes this process very easy. The certification package is available by request. It includes all test scenarios required by FedEx for FedEx Express and Ground (international and domestic), and Home Delivery. Through the application included in the certification package, you can generate all shipping labels for selected scenarios applicable to your shipping needs with a click of a button.

Note to existing customers: If your current account is for the FedEx ShipManager Direct service, you will need to follow these same steps to register for the new version of the FedEx Web Services, as well as complete certification for Labels again.

UPS

The UPS components allow you access to the UPS on-line services, providing easy access to address validation, tracking, shipping, rates, time in transit, and pickup APIs.

Once the 4D Shipping SDK components are integrated into your application, you can communicate with the UPS server over a secure SSL connection.

Before using these components, the user must contact UPS to obtain access to UPS OnLine Tools. For this, please visit https://developer.ups.com/get-started?loc=en_US.

To begin your integration, you will need the following to sign into the UPS Developer Portal and obtain API credentials:

  • UPS username - if you do not already have one you can create it at https://wwwapps.ups.com/doapp/signup?loc=en_US.
  • UPS shipper account (six digit number) that is linked to your UPS ID.
Next, you'l need to obtain your OAuth Credentials.

Once you have a UPS username and a shipper account, you can obtain your credentials by creating an application on the UPS portal. During this process you will link your shipper account and email address to the application you create and obtain your "Client ID" and "Client Secret". Note: The UPS username used to sign-in when creating the credentials will be explicitly tied to the OAuth credentials. Only shipper accounts associated to that username will be valid when used in API requests such as Ship and Rate.

Once you have obtained the "Client ID" and "Client Secret" you can then use the OAuth class to obtain an access token, which is passed as a bearer token in the request and serves to authorize that request.

Each request requires specific processing based on the type; therefore, each component has a unique URL for connection purposes.

The following URLs may be used for testing:

class Test URL
UPSAddress https://wwwcie.ups.com/api/addressvalidation/
UPSFreightRate https://wwwcie.ups.com/api/freight/
UPSFreightShip https://wwwcie.ups.com/api/freight/
UPSRates https://wwwcie.ups.com/api/rating/
UPSRates (ShippingTime) https://wwwcie.ups.com/api/shipments/
UPSShip https://wwwcie.ups.com/api/shipments/
UPSShip (Schedule Pickup) https://wwwcie.ups.com/api/pickupcreation/
UPSShipIntl https://wwwcie.ups.com/api/shipments/
UPSTrack https://wwwcie.ups.com/api/track/
All (Void) https://wwwcie.ups.com/api/shipments/

USPS

The USPS components allow you access to the on-line services of the United States Postal Service (USPS). These provide easy access to shipping and tracking information.

Once the 4D Shipping SDK components are integrated, your server communicates through the USPS server over HTTP using XML.

Before using these components, the user must contact USPS to obtain credentials necessary to use USPS's online tools. To gain these credentials, please visit https://secure.shippingapis.com/registration/. Also, more information regarding USPS's online tools can be found here: https://www.usps.com/business/web-tools-apis/welcome.htm.

Endicia

When using the Endicia postage provider for the USPS components, you do not need credentials to test as Endicia's test servers do not check the credentials that you pass. You will however need to certify your labels with Endicia before getting production access. More information regarding Endicia can be found at http://www.endicia.com/Developers/LabelServer/.

To sign up for an account visit http://www.endicia.com/developer-resources/endicia-label-server-apis.

Canada Post

The Canada Post classs allow you to access the on-line services of Canada Post. these provide easy access to rating, shipping, and tracking information.

Once you have integrated with the 4D Shipping SDK components, your server communicates directly with the Canada Post servers over HTTP using XML.

Before using the components, the user must contact Canada Post to obtain the necessary credentials to use Canada Post's APIs. To gain these credentials, please got to https://www.canadapost.ca/cpotools/apps/developers/home and click the Join button near the top of the page.