Skip to main content
Beta Feature — This guide covers the Infer Number API, currently in beta. The API is stable for production use, but features may expand based on feedback.
Every tracking request requires two things: your tracking number and the shipping line’s (carrier’s) SCAC code. But what if you don’t know the SCAC? That’s where the Infer API comes in.

Already using the Terminal49 Dashboard?

You’ve seen this feature in action — when you enter a number, we auto-suggest the carrier. Now this same intelligence is available via API.

Why SCAC Matters

To track a shipment or container, Terminal49 needs to know which shipping line to ask (also called the vessel-operating common carrier (VOCC)). The SCAC (Standard Carrier Alpha Code) we use here is the shipping line SCAC for tracking — i.e., the carrier operating the move we’re querying for events and shipment data.
You HaveYou NeedThe Challenge
Bill of Lading: MAEU123456789Shipping line SCAC (VOCC SCAC)Many MBOLs do not include a prefix, and even when they do, it may not reliably identify the shipping line you need for tracking.
Container: WHLU1234560Shipping line SCAC (VOCC SCAC)The container owner code / leasing company is not always the carrier moving it, so the prefix alone is not enough.
Booking: 987654321Shipping line SCAC (VOCC SCAC)Booking formats vary widely and often contain no carrier identifier.
Without the correct shipping line SCAC (VOCC SCAC), your tracking request can fail even if the number is valid. The Infer API predicts the shipping line SCAC + number type to increase the likelihood your tracking request succeeds.

How the Infer API Helps

Submit any tracking number, and the API returns:
  • The predicted shipping line (SCAC) — so you don’t have to guess
  • The number type — container, bill of lading, or booking
  • Validation results — catches typos and invalid formats before you submit

You submit a tracking number

Just the number — no need to specify the shipping line or type

We analyze the pattern

Our system uses machine learning and historical data from millions of shipments to predict the shipping line.

You get the SCAC and confidence score

Use high-confidence results automatically, or prompt users to confirm

Create a successful tracking request

With the right SCAC, your tracking request is far more likely to succeed

Examples by Number Type

Container numbers follow the ISO 6346 format. While the first three letters (owner code) often indicate the owner, the container might be moved by a different shipping line (VOCC).Our system analyzes the number against tens of millions of historical records to predict which shipping line is moving the container.Example Input: MSCU1234567
{
  "number": "MSCU1234567"
}
For container numbers, we use historical data to identify the shipping line with high accuracy (9/10 times). Always check the decision field to know if you should ask the user for confirmation.
What to do next:
# Create tracking request with the detected SCAC
POST /tracking_requests
{
  "data": {
    "type": "tracking_request",
    "attributes": {
      "request_number": "MSCU1234567",
      "scac": "MSCU",
      "request_type": "container"
    }
  }
}

Understanding the Response

Decision Types Explained

The decision field tells you how confident the prediction is and what action to take:
DecisionWhen it’s usedWhat to do
auto_selectConfidence ≥ 95%✅ Safe to use automatically without user confirmation
needs_confirmationConfidence 70-95%⚠️ Show suggestion, ask user to confirm
no_predictionConfidence < 70% or unknown❌ User must select carrier manually
For the best user experience, always handle all three decision types. Even when no_prediction is returned, you can still show the list of candidates as suggestions.
The API validates numbers before returning predictions:
FieldDescription
is_validtrue if format is valid, false if invalid, null if unknown
check_digit_passedFor containers: ISO 6346 check digit verification
reasonIf invalid, explains why (e.g., “Invalid check digit”)
Invalid numbers may still return a carrier prediction, but you should validate the format before creating a tracking request.
FieldTypeDescription
number_typestringDetected type: container, bill_of_lading, or booking
shipping_line.decisionstringConfidence level for the prediction
shipping_line.selectedobjectBest match: scac, name, confidence
shipping_line.candidatesarrayAll possible matches, ranked by confidence
See the API Reference for complete schema details.

Integration Guide

For developers implementing this API, here are code examples in different languages:
async function getCarrierForNumber(trackingNumber, apiKey) {
  const response = await fetch(
    "https://api.terminal49.com/v2/tracking_requests/infer_number",
    {
      method: "POST",
      headers: {
        Authorization: `Token ${apiKey}`,
        "Content-Type": "application/json",
      },
      body: JSON.stringify({ number: trackingNumber }),
    }
  );

const { data } = await response.json();
const { decision, selected, candidates } = data.attributes.shipping_line;

return {
scac: selected?.scac,
carrier: selected?.name,
confidence: selected?.confidence,
autoSelect: decision === "auto_select",
needsConfirmation: decision === "needs_confirmation",
candidates: candidates,
};
}

// Usage
const result = await getCarrierForNumber("MSCU1234567", "YOUR_API_KEY");
if (result.autoSelect) {
// Auto-fill carrier dropdown
carrierDropdown.value = result.scac;
} else if (result.needsConfirmation) {
// Show suggestion with confirmation prompt
showCarrierSuggestion(result.carrier, result.candidates);
}

Rate Limits

SettingValue
Requests per minute200
Rate limit headerRetry-After (seconds)
Rate limit errors return HTTP 429 with a Retry-After header. Respect this header to avoid extended throttling.

What’s Next?