How To Overview |
[This is preliminary documentation and is subject to change.]
The first step in creating a web service request is to generate a proxy/wrapper/client class from the WSDL file. This class will typically have a set of objects representing web service methods, the associated Request and Response objects, and the data objects used to create Requests and Responses.
Typically, this will need to be completed once and only updated if our web service changes, but for some languages/frameworks this may need to be completed once each time the application starts.
A google search on "consume a web service [programming language]" should return enough useful information to get started.
Courier includes shipping individual parcels using Purolator Courier, Canada Post, or UPS; for shipping pallets or containers see the LTL section.
There are two basic workflows for creating courier orders:
Create an order after all order information is available and the packages are ready to ship. Create the shipment with AddOrder(OrderRequestV3). See walkthrough.
Create an order after the consignee and item information is known, but before packages have been created. Create the shipment with AddOrder(OrderRequestV3) and update the shipment with package information AddPackage(AddPackageRequestV3), or add items using AddItem(AddItemRequestV3). See walkthrough.
The ResponsePackage objects returned in an OrderResponse, AddPackageResponse, or LabelResponse may contain Package label information stored as ZPL byte code in the ZPLCode field, or encoded as a Base64 encoded PNG image in the LabelImage field depending on the LabelType specified in the related request.
When all orders are ready to be shipped, submit a Closeout(CloseoutRequest) to finalize processing. This may create documentation for customs or for the driver. See walkthrough.
Except for adding packages and items, order information cannot be changed with web services. If an order is incorrect a customer can change it manually on the website, or by voiding the order/package with VoidOrders(OrderListRequest) or VoidPackages(PackageListRequest).
A LTL (Less Than Truckload) shipment can consist of one or more pallets or containers being shipped to a consignee. "Packages" are optional and represent containers instead of parcels; if any containers are included, then a label can be printed for each container.
Consolidation combines one or more orders (with the same exact address and with the same assessorials) into a single shipment for billing purposes. There are two options for creating orders and consolidating them into LTL shipments depending on whether you have a single order, or multiple orders:
For a single order, create a single consolidated LTL shipment with AddLTLOrder(LTLOrderRequest). See walkthrough.
For multiple orders, create each LTL order with AddOrder(OrderRequestV3), and then consolidate orders with AddConsolidatedLTLShipment(LTLShipmentRequest). See walkthrough.
Data for printing LTL labels is contained in ResponsePackage or LTLPalletResponse objects. If the related request specified ZPL, ZPL300, ZPLIMAGES, or ZPL300IMAGES in the LabelType field, then the ZPLCode field of any ResponsePackage/LTLPalletResponse object will contain ZPL byte code; if Images was specified in the LabelType field, then the LabelImage field will contain a PNG image encoded in Base64 encoding.
Both AddOrder(OrderRequestV3) and AddLTLOrder(LTLOrderRequest) can return ResponsePackage objects; AddLTLOrder can also return LTLPalletResponse objects.
When all orders are ready to be shipped, submit a CloseoutWithLTL(CloseoutRequestLTL) to finalize processing. An LTL closeout may include Courier packages as well as consolidated LTL shipments. A closeout may create documentation for customs or for the driver. See walkthrough.
Except for adding packages and items, order information cannot be changed with web services. If an order is incorrect a customer can change it manually on the website, or by voiding the order/package with VoidOrders(OrderListRequest) or VoidPackages(PackageListRequest).