Understanding the measureUnit vs customsMeasureUnit conflict in the URA API.
You’ve implemented your AES encryption, signed your payload, and sent your first invoice to URA. But instead of a success message, you get this:
{
"returnCode": "2197",
"returnMessage": "The measure unit of the goods is inconsistent with the configuration."
}
This is one of the most frustrating errors in EFRIS because the error message is technically correct but practically useless. It tells you what is wrong (units), but not why.
The Root Cause: Dual Unit Systems
URA EFRIS actually uses two different unit systems simultaneously, and they must map to each other perfectly for certain goods codes (UNSPSC).
- Commercial Units (
measureUnit): This is what you sell in. (e.g., “Box”, “Pack”, “Bottle”). - Customs Units (
customsMeasureUnit): This is what URA tracks for tax purposes. (e.g., “Kilogram”, “Litre”).
For many goods (like Cement or Sugar), URA strictly requires you to report in specific Customs Units. If you sell sugar in “Packs” but URA expects “Kilograms”, and you don’t provide the conversion factor, you get Error 2197.
The Fix: Scaling Factor
You must tell URA how your Commercial Unit relates to their Customs Unit
using the unitPrice and pack fields effectively, or by ensuring your
measureUnit matches the customsMeasureUnit if no conversion is needed.
Bad Payload (Fails)
Selling 1 Bag of Cement.
{
"goodsCode": "1001", // Cement
"measureUnit": "BAG",
"quantity": "1",
"unitPrice": "50000"
}
URA looks up code 1001, sees it requires ‘KG’, sees ‘BAG’, and rejects it.
Good Payload (Succeeds)
Selling 1 Bag (which is 50kg) of Cement.
{
"goodsCode": "1001",
"measureUnit": "KG", // Use the Customs Unit
"quantity": "50", // 50 KGs
"unitPrice": "1000" // Price per KG (50,000 / 50)
}
The TaxBridge Way
Doing this math manually for every invoice is a recipe for disaster. What if the bag size changes? What if URA changes the requirement from KG to Tonne?
Our Smart Catalog feature handles this mapping automatically. You define your product once:
// TaxBridge Product Definition
{
"externalRef": "CEMENT-50KG",
"name": "Simba Cement 50kg",
"uraCode": "1001",
"packaging": {
"unit": "BAG",
"contentUnit": "KG",
"netWeight": 50
}
}
When you sell 1 x CEMENT-50KG, our API automatically transforms the
invoice line item into the format URA expects (50 units of KG) before
signing and transmitting.
Stop fighting with Error 2197. Read the Smart Registry docs or get your API keys today.