Articles on: Amazon Marketplace (PrestaShop)

How to Fix “External Product ID Is Shorter Than the Minimum Allowed (13 Characters)”

When sending a product to Amazon, you may receive the following error message:

The value of “External Product ID” is shorter than the minimum allowed (13 characters).



What Does This Error Mean?


Amazon requires a valid 13-digit EAN barcode for the affected product or combination. This error occurs when:

  • The barcode entered in PrestaShop contains fewer than 13 digits.
  • A 12-digit UPC code was entered into the EAN-13 field without a leading zero.



Correcting One Product Manually


  1. In PrestaShop, navigate to Catalog > Products.
  2. Open the affected product.
  3. Check the EAN-13 field.
  4. If the error concerns a combination, go to the Combinations tab and check the EAN-13 of that specific combination.
  5. Correct the barcode, click Save, and re-verify the product in the Amazon module.


Handling a 12-Digit UPC Barcode

If the barcode contains exactly 12 digits, confirm that it is a valid UPC code. You can convert a valid 12-digit UPC into an EAN-13 format by prepending a 0 at the beginning.


  • UPC: 123456789012
  • EAN-13 representation: 0123456789012


Warning: Do not add a leading zero to an incomplete, truncated, or invalid barcode.



Correcting Multiple Products Using SQL (Bulk Update)


If you have many products with 12-digit UPC codes stored in the EAN-13 field, you can update them in bulk using SQL queries in phpMyAdmin or your server database manager.


Important Recommendations Before Proceeding:

  • Always create a full database backup before executing any UPDATE queries.
  • Always run the SELECT queries first to verify which rows will be modified.
  • Replace ps_ with your actual database prefix if your store uses a custom prefix (e.g., prestashop_).



Step 1: Preview Affected Products (SELECT Queries)


Run these queries first to verify which products and combinations contain 12-digit barcodes:


Standard Products (Without Combinations):


SELECT id_product, reference, ean13
FROM ps_product
WHERE CHAR_LENGTH(ean13) = 12
AND ean13 REGEXP '^[0-9]{12};


Product Combinations:


SELECT id_product_attribute, id_product, reference, ean13
FROM ps_product_attribute
WHERE CHAR_LENGTH(ean13) = 12
AND ean13 REGEXP '^[0-9]{12}$';



Step 2: Prepend Leading Zero (UPDATE Queries)


After confirming that all returned entries are valid 12-digit UPCs, execute the following queries to add the leading 0 and convert them to 13-digit EANs:


Standard Products (Without Combinations):


UPDATE ps_product
SET ean13 = CONCAT('0', ean13)
WHERE CHAR_LENGTH(ean13) = 12
AND ean13 REGEXP '^[0-9]{12}$';


Product Combinations:


UPDATE ps_product_attribute
SET ean13 = CONCAT('0', ean13)
WHERE CHAR_LENGTH(ean13) = 12
AND ean13 REGEXP '^[0-9]{12}$';



Final Step


Once the SQL updates are complete, clear your PrestaShop cache, and resend the affected products to Amazon.

Updated on: 07/08/2026

Was this article helpful?

Share your feedback

Cancel

Thank you!