Specify Carrier Service and Method

Limit the set of carrier methods available when choosing a carrier and method for a shipment.

❗️

You should probably not use this option!

This variable and mechanism should only ever be used as an option of last resort. You are potentially choosing from amongst a more limited set of options than are available to you for shipping and this could have an impact on delivery performance or cost.

Likewise, limiting the list of carrier service methods make it more likely that you will get no eligible carrier errors.

If you do want to limit the set of carrier methods available when choosing a carrier and method during a call to carrier selection (whether getting a label or not), you can optionally provide a carrierServiceMethodAllowList in the API call.

The carrierServiceMethodAllowList takes one or more of the carrierServiceMethodId values from the Supported Carriers document provided in an array as its value. Based on that value, it chooses the best carrier and ship method from that list that meets the other criteria specified in the API call.

Example

This example shows a sample of using carrierServiceMethodAllowList in an example in which we want to limit the carrier methods to only USPS First Class Package Service or UPS Ground.

The following can be added to the top-level body of the message when creating a shipment with ShipmentParameters or to the megamethod request. Please note that this is not part of the "shipmentParameters", but exists at the same level.

{
  ...
  "shipmentParameters": {
    ...
  },
  ...
  "carrierServiceMethodAllowList": [
    "usps-ground-advantage-service-method",
    "ups-ground-service-method"
  ],
  ...
}

You can find the full list of carrierServiceMethod values that are supported here: Supported Carriers.

Resources

Your Shipium team member is available to help along the way. However, you might find these resources helpful:


What’s Next