FedEx API

Multiple-Piece Shipping (MPS) A multiple-piece shipment (MPS) consists of two or more packages shipped to the same recipient addresses. The first package in the shipment request is considered the master package.

To create a multiple-piece shipment:

Include the shipment level information such as serviceType, packagingType, totalWeight, totalPackageCount, and requestedPackageLineItems details for the master package. [Note: The sequenceNumber for master package must be equal to 1.] For printing label per package, include Master tracking details in element masterTrackingId for all subsequent packages. Following are the Multiple-Piece Shipping Processing options available with this API:

Print Package Label One At A Time

This processing option allows you to process the MPS shipments and get labels one at a time. This is an optimal method, in case the packages to be processed sequentially and labels to be generated per package.

When you need this capability for your shipments, In the shipment request provide element oneLabelAtATime as true as true along with all necessary MPS elements.

The output of the first request should generate label and tracking number which is master tracking number. Provide this master tracking number in the element masterTrackingId to process subsequent ship request and generate labels with tracking numbers (child tracking numbers) for the defined total package count (groupPackageCount).

Note:

The maximum packages allowed in this processing option are 200. The final shipment documents/reports will be generated if sequenceNumber is equal to groupPackageCount. Print All Package Labels At Once

This processing option allows you to process the MPS shipments and get labels in single shot. When this option is selected, your shipments will either be processed synchronously or asynchronously depending on the number of packages or package level commodities in your shipment.

Synchronous Shipment Processing

Synchronous processing is one of the optimal processing method, which is used internally when a shipment has either 40 or less packages (groupPackagecount<=40) with limited commodities in the shipment and oneLabelAtATime as false.

Shipment request with 40 or less packages will be processed synchronously and the labels and other shipment documents/reports will be generated instantaneously. This process is optimal for shippers, if there is a time constraint and if the labels must be printed immediately.

Note: The maximum 40 package limit is indicative and is not a fixed limit. The limit is also dependent on the combination of packages and commodities in the shipment. For more information, contact your FedEx support team

Example: Your shipment request consists of 10 packages, when submitted will be processed synchronously. In the response, 10 labels will be created, and either label URLs or encoded labels as requested is provided in the response.

The following high-level workflow demonstrates synchronous shipment processing:

Use endpoint Create Shipment to create shipment with 1-40 packages. Successful request should generate labels and the output response will have either label URLs or encoded labels as requested. If the shipment has errors, the error details will be provided in the response. After correcting the errors, recreate and submit the shipment for successful response. Note:

In this method, if you need to add more packages to an existing shipment, you can add only up to total 40 packages. In synchronous processing request, the default value for element processingOptionType is SYNCHRONOUS_ONLY and shipment will be processed synchronously even if the above element is not provided or value passed is either SYNCHRONOUS_ONLY or ALLOW_ASYNCHRONOUS in the request. Asynchronous Shipment Processing

Use Asynchronous processing option when the shipment packages exceeds 40 (totalPackageCount>40). This is a very convenient method, when your package volume is large, and you want to submit the bulk shipments periodically. This bulk shipment submission uses various expensive FedEx resources & operations, when submitted at once. With this processing option, FedEx internally ensures that these bulk shipments are processed, and you can get the label data periodically.

When the transaction is asynchronously processed, the reply to this request only confirms that the request is queued successfully but the shipment itself might not be successfully processed and also returns jobId to retrieve the result later.

Note: This process requires some time for the shipment to be processed successfully before you retrieve the result.

For retrieving the asynchronous shipment result, use endpoint Retrieve Async Ship and provide jobId and accountNumber details in the request. The response to this request will either return shipment result data with label details or the shipment error details.

Example: Your shipment consists of 45 packages, when submitted will be processed asynchronously. In the response, a jobId will be returned. You should then use endpoint Retrieve Async Ship to retrieve the shipment result to get the label data.

The following high-level workflow demonstrates asynchronous shipping processings:

Use endpoint Create Shipment to create shipment with more than 40 packages. Specify all necessary shipment details along with element processingOptionType as ALLOW_ASYNCHRONOUS and Specify element labelResponseOptions as LABEL. The successful submission will provide jobId. Use the jobId and accountNumber to retrieve the output results using Retrieve Async Ship endpoint. The successful output will provide the resultant data and label details. If the result has errors, the error details will be provided in the response. After correcting the errors, recreate and submit the shipment for successful response. Note:

In this method, in a single request the maximum total allowed packages are 300.or up to 999 commodities. In this method, once the request is submitted, you can not add new, modify or delete the packages in the original request. If there are errors in the asynchronous shipment response, you cannot reconfirm or fix it in the same shipment request. You must modify or fix the errors and submit a new shipment request