Carrier Lookup
Listing an Account’s Available Carriers — Non-Visual Shipping API Quick Start Guide
What is Carrier Lookup?
The Carrier Lookup call returns the set of shipping carriers that a specific ShipRush account can use. You POST an empty request, authenticated with that account’s shipping token, and get back a list of carrier codes. Because the response is scoped by the token, it reflects exactly what that account has configured — not a generic master list.
The endpoint is POST /shipmentservice.svc/shipment/lookup/carriers, part of the Non-Visual Shipping API (the XML shipping API). It is the natural first step before looking up services or rating a shipment: get the account’s carriers, then call lookup/services for each carrier to see what shipping services are available.
When to Use This
You need to know which carriers an account has set up before rating or shipping.
You are building a UI that lets the shipper pick a carrier and want to populate the list dynamically.
You want to validate that a required carrier (e.g. FedEx, USPS) is configured on the account.
You want the authoritative, per-account list rather than hard-coding carrier codes — pair this with lookup/services for services.
Prerequisites
An active Descartes ShipRush Web account with at least one carrier configured.
A Shipping Token (X-SHIPRUSH-SHIPPING-TOKEN) for that account.
A Developer Token (X-SHIPRUSH-DEVELOPER-TOKEN) issued to your developer account.
An HTTP client able to POST XML (any language; a C# example is included).
Step 1 — Get Your Tokens
Shipping labels are tied to a shipping account and incur real charges, so token issuance takes a few steps:
Set up a ShipRush Web account with one or more shipping accounts (done by the shipper or an authorized agent).
Enable Two-Factor Authentication: Settings → User Settings → Change Password → enable 2-Step verification.
Request access: Settings → User Settings → Developer Tokens → apply to the Shipping Developer Program. Approval arrives by email, usually within one or two business days.
Retrieve your shipping token: Settings → User Settings → Developer Tokens → Show Token.
Heads up: The shipping token is shown only once and can ship against real shipping accounts — store it securely, like a password. Tokens are system-specific: a sandbox token does not work in production, and vice versa.
Step 2 — Know the Endpoint
Method & path: POST /shipmentservice.svc/shipment/lookup/carriers
Base URL (prepend to the path above):
Production: https://api.my.shiprush.com
Sandbox: https://sandbox.api.my.shiprush.com
Required and optional HTTP headers:
Header |
Required |
Value |
X-SHIPRUSH-SHIPPING-TOKEN |
Yes |
Your account's shipping token (see Step 1). Scopes the response to that account. |
X-SHIPRUSH-DEVELOPER-TOKEN |
Yes |
Your developer/application token, issued to your developer account. |
Content-Type |
Yes |
application/xml (or text/xml) |
Accept-Encoding |
Yes |
gzip, deflate — your client must accept compressed responses. |
User-Agent |
Yes |
Identifies your app clearly, e.g. Acme-OrderSystem. Spaces → hyphen/underscore. |
X-SHIPRUSH-VERSION |
No |
Desired XML response version, e.g. 84114. Omit to use the server default. |
User-Agent-Version |
No |
Full build of your app, e.g. 1.0.0.1234. |
Step 3 — Build and POST the Request
The request body is a GetCarrierTypesRequest element with no content. You do not pass a carrier — the account (via its shipping token) determines which carriers come back.
Request body:
<?xml version="1.0" encoding="utf-8"?>
<GetCarrierTypesRequest />
Step 4 — Read the Response
A valid call returns HTTP 200. The carriers come back inside CarrierTypes as a list of TCarrierType codes. Inspect <IsSuccess> and <Messages> to confirm the operation actually succeeded.
Sample response (an account with FedEx, USPS, and ShipRush USPS configured):
<GetCarrierTypesResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<IsSuccess>true</IsSuccess>
<Messages />
<CarrierTypes>
<TCarrierType>1</TCarrierType> <!-- FedEx -->
<TCarrierType>3</TCarrierType> <!-- USPS -->
<TCarrierType>17</TCarrierType> <!-- ShipRush USPS -->
</CarrierTypes>
</GetCarrierTypesResponse>
Each code maps to a carrier as follows. The account returns only the codes it has configured; the table below is the full master enum for reference.
Code |
Carrier |
Code |
Carrier |
0 |
UPS |
24 |
EasyPost APC |
1 |
FedEx |
25 |
EasyPost RRD |
2 |
DHL |
26 |
EasyPost Asendia |
3 |
USPS |
27 |
EasyPost Globegistics |
4 |
Endicia |
28 |
EasyPost DHL Intl |
5 |
Stamps |
29 |
DHL eC |
6 |
USS Prefership |
30 |
Amazon FBA |
7 |
Unknown |
31 |
Banyan |
8 |
FedEx FIMS |
32 |
FirstMile |
9 |
Direct Link |
33 |
PlainLabel |
10 |
Amazon |
34 |
Canada Post |
11 |
MailView |
35 |
DHL Paket |
12 |
Pitney Bowes |
36 |
LSO |
13 |
WWEX |
37 |
L5 |
14 |
WWEX LTL |
38 |
Canpar |
15 |
Deliv |
39 |
Newgistics |
16 |
OnTrac |
40 |
ChitChats |
17 |
ShipRush USPS |
41 |
Hogwarts Post |
18 |
EasyPost USPS |
42 |
Amazon Shipping |
19 |
MailView v2 |
43 |
TNT Express |
20 |
FIMS2 |
44 |
NZ Couriers |
21 |
Direct Link v2 |
45 |
GLS |
22 |
Project44 |
46 |
Paquet Express |
23 |
EasyPost DHL |
999 |
Parcel Partners |
Note: Codes 7 (Unknown) and 41 (Hogwarts Post) are internal/placeholder values and will not appear for a real account. Treat any code your app doesn’t recognize as “unsupported” rather than failing.
Step 5 — Handle Errors
The Non-Visual Shipping API uses a two-level result model:
HTTP 200 — the call was structurally accepted. Read <IsSuccess> / <Messages> in the body for the real outcome.
HTTP 401 — authentication failed (bad or missing token).
HTTP 500 — a structural or authentication failure. The body is a JSON error object, not the XML response.
C# / .NET Example
Posts the empty request, prints the HTTP status, then parses the carrier codes. Swap in your tokens and switch the base URL to production when ready.
using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Linq;
class ShipRushCarrierLookup
{
// Sandbox base URL. For production use https://api.my.shiprush.com
const string BaseUrl = "https://sandbox.api.my.shiprush.com";
const string ShippingToken = "YOUR-SHIPPING-TOKEN-GUID";
const string DeveloperToken = "YOUR-DEVELOPER-TOKEN";
static async Task Main()
{
// The request body is an empty element - no CarrierType is supplied.
const string requestXml =
"<?xml version=\"1.0\" encoding=\"utf-8\"?><GetCarrierTypesRequest />";
using var client = new HttpClient();
var req = new HttpRequestMessage(
HttpMethod.Post,
$"{BaseUrl}/shipmentservice.svc/shipment/lookup/carriers");
req.Headers.Add("X-SHIPRUSH-SHIPPING-TOKEN", ShippingToken);
req.Headers.Add("X-SHIPRUSH-DEVELOPER-TOKEN", DeveloperToken);
req.Headers.Add("Accept-Encoding", "gzip, deflate");
req.Headers.UserAgent.ParseAdd("Acme-OrderSystem/1.0");
req.Content = new StringContent(requestXml, Encoding.UTF8, "application/xml");
var resp = await client.SendAsync(req);
var body = await resp.Content.ReadAsStringAsync();
Console.WriteLine($"HTTP {(int)resp.StatusCode}");
// HTTP 500 = structural/auth failure. On 200, inspect the body.
var doc = XDocument.Parse(body);
foreach (var c in doc.Descendants("TCarrierType"))
Console.WriteLine($"Carrier code: {c.Value} -> {CarrierName(c.Value)}");
}
static string CarrierName(string code) => code switch
{
"1" => "FedEx",
"3" => "USPS",
"12" => "Pitney Bowes",
"17" => "ShipRush USPS",
_ => "(see carrier code table)"
};
}
Prefer a wrapper? The ShipRush .NET SDK ships proxy assemblies (ShipRush.SDK.Proxies.dll, ShipRush.BusinessLayer.dll) you can reference instead of hand-rolling the HTTP call.
Quick Reference
The Call at a Glance
Endpoint: POST /shipmentservice.svc/shipment/lookup/carriers
Request body: <GetCarrierTypesRequest /> (empty)
Response: <GetCarrierTypesResponse><CarrierTypes>…</CarrierTypes></GetCarrierTypesResponse>
Auth: X-SHIPRUSH-SHIPPING-TOKEN + X-SHIPRUSH-DEVELOPER-TOKEN headers.
Next Steps
For each returned carrier, call POST /shipmentservice.svc/shipment/lookup/services with a <CarrierType> to list that carrier’s services.
Then lookup/packaging (carrier + service) for packaging options, and shipment/rate to price a shipment.