Skip to content
P4 Software P4 Software / BarcoderX English

Add these docs to Claude

Ask Claude questions about these docs. Claude reads the published pages and links you back to them. Copy this address:

https://p4-software.opendocs.page/mcp

In claude.ai or Claude Desktop: open Settings, then Connectors, choose Add custom connector and paste the address.

In Claude Code, run:

claude mcp add --transport http docs https://p4-software.opendocs.page/mcp

Postal barcodes

Postal barcodes: FIM and the Intelligent Mail barcode

Applies to: BarcoderX Basic and Ultimate

Status: Built, not yet released. The encoders for these two symbologies exist inside the engine that is still being built, and they are tested. There is no released package, there is no public interface that you can call to encode a barcode directly, and the licensed engine will be the only public way to produce output. In the symbology registry, which the web API is planned to list, the two symbologies still have the status Planned, because that status changes only when their evidence is complete. The symbology list for the editor marks a symbology implemented when an encoder exists, and an encoder exists for both. See What the statuses mean. Everything marked "planned" is not usable yet.

The USPS Facing Identification Mark (FIM) and the USPS Intelligent Mail barcode are two postal symbologies of the United States Postal Service (USPS). They belong to the second group of symbologies (family 2), and postal symbologies are in the Basic edition. See Barcodes and Editions and licensing. This page describes what BarcoderX does with them.

SymbologyId in a templateWhat it carries
USPS Facing Identification MarkfimOne letter, A to E. The letter is the whole of the data.
USPS Intelligent Mail barcode (also listed in the registry as USPS OneCode 4CB)usps-imbA tracking code of 20 digits, with or without a routing code after it.

In a template, a barcode names its symbology and gives its content. See The label template format.

Both are built from the publisher's own text. The FIM follows USPS Publication 25, Designing Letter and Reply Mail, November 2018, chapter 10, checked against the Domestic Mail Manual. The Intelligent Mail barcode follows USPS-B-3200, Intelligent Mail Barcode 4-State Specification, Rev H, 20 April 2015.

FIM

The FIM is a pattern of bars that the USPS prints on the upper right of a letter-size reply piece so that its machines can face and cancel it. It has no digits and no check character. The letter that you choose is the whole of the data. Which letter your mail needs is decided by the postal rules for your mail, not by BarcoderX.

  • Content. Give exactly one letter, A to E. A lowercase letter, a to e, is read as the uppercase one, so a and A give the same symbol. This is a convenience of BarcoderX, not a rule of the postal text. No other character is turned into a letter: a letter with an accent, a full-width letter and a space are all refused.
  • Example. The content A gives the FIM A. The content a gives the same symbol.
  • What is refused, and what to do.
What you gaveWhat BarcoderX saysWhat to do
Nothing, or more than one character, or a letter with a space next to it, such as AB or AThe data has the wrong length (BX4002).Give exactly one letter.
One character that is not A to E, such as F, a digit or a spaceA character cannot be encoded (BX4001), at position 1.Use one of A, B, C, D or E.
Any optionThe option cannot be used for this barcode type (BX4015).Remove the option. The FIM has no option.
  • The text under the bars. The FIM has no human-readable text, and BarcoderX produces none.
  • Quiet zone. BarcoderX states no quiet zone for the symbol. The clear zone around a FIM belongs to the mail piece and its design.

USPS Intelligent Mail barcode

The Intelligent Mail barcode is a four-state barcode. It is made of 65 bars, and each bar is one of four kinds: a full bar, a bar that reaches up, a bar that reaches down, and a short bar in the middle. The bars are worked out from the digits, and a check value is built into the symbol. You do not type it.

  • Content. Give digits only. The first 20 digits are the tracking code. After them, a routing code of 5, 9 or 11 digits may follow, or none. So the length is exactly 20, 25, 29 or 31 digits. Only the plain digits 0 to 9 are accepted, with no spaces, hyphens or other characters.
  • The second digit. The first two digits are the barcode identifier. Its second digit must be 0 to 4.
  • Examples. The tracking code 01234567094987654321 has 20 digits and no routing code. Followed by the routing code 01234, it is 0123456709498765432101234 (25 digits). Followed by a routing code of 9 digits, 012345678, it is 29 digits. Followed by a routing code of 11 digits, 01234567891, it is 0123456709498765432101234567891 (31 digits). These are the tracking code and the routing codes of the worked examples of USPS-B-3200, Appendix C, which the tests of the encoder use.
  • What is refused, and what to do.
What you gaveWhat BarcoderX saysWhat to do
A length that is not 20, 25, 29 or 31, an empty content includedThe data length is not one of the accepted lengths (BX4023). The message gives the length that you gave and lists the accepted lengths.Shorten or complete the data to one of the lengths in the message.
A character that is not a digit, such as a space, a hyphen or a letterA character cannot be encoded (BX4001), with the position of the character.Remove the character, or replace it with a digit.
A second digit of 5 to 9A character cannot be encoded (BX4001), at position 2.Use a barcode identifier whose second digit is 0 to 4.
Any optionThe option cannot be used for this barcode type (BX4015).Remove the option. This barcode has no option.
  • What is not checked. BarcoderX checks the length and the digits, and nothing more. It does not check the meaning of the fields of the tracking code, such as the service type and the mailer ID, or the routing code. A number can be accepted and still be wrong for the postal service. Check the fields against the USPS rules before you print.
  • The text under the bars. This barcode has no human-readable text, and BarcoderX produces none.
  • No decoder. BarcoderX has no decoder for this symbology, so nothing reads a symbol back after it is made.

What is the same for both

  • The check of the length comes before the check of a character, so a very long content is refused for its length alone and costs nothing.
  • An option is refused before the content is looked at. Neither barcode has an option.
  • Bad data gives a diagnostic code, not a crash. The texts of the codes, in English and Spanish, are in Diagnostic codes: BX4001, BX4002, BX4015 and BX4023.
  • The label engine finds an encoder in the same table as for every other symbology, so the registry status does not stop it. The tests in tests/BarcoderX.Engine.Tests/PostalBarcodeTests.cs draw both symbols through the label engine and show this:
    • Each of the five FIM letters, and an Intelligent Mail barcode of each of the four lengths, is drawn without a refusal and without an error.
    • The bars sit on whole printer dots where the symbol plotter puts them, and in these tests, which draw as a licensed engine does, the ink on the label is exactly those bars. Without a valid license the label also carries the evaluation mark (see Evaluation mark and license keys).
    • In an Intelligent Mail barcode, each of the 65 bars shows the state that the encoder chose for it: the short middle part is always dark, the top is dark for a bar that reaches up or is full, and the bottom is dark for a bar that reaches down or is full. The example that the test uses has all four states.
    • Bad data gives the same codes through the engine as from the encoder: a FIM with a character that is not A to E gives BX4001, an Intelligent Mail barcode with a character that is not a digit, or a second digit of 5 to 9, gives BX4001 with the position, and an Intelligent Mail barcode with a length that is not 20, 25, 29 or 31 gives BX4023 with the length and the accepted lengths (and never BX4002). With the default policy the element is left out, nothing of it is drawn, and the rest of the label is still drawn.
  • No test draws these two symbols through the label service. This page does not describe how they look in a label beyond what the list above says.

Not available yet

  • A test that draws these two symbols through the label service.

BarcoderX is a product of P4 Software.

Was this page helpful?