jp_cnIntlIDs

Mock Jutsu HOW-TO | EN

The jp_cn function within the mock-jutsu library is a specialized tool designed to generate authentic Japanese Corporate Numbers, also known as Hojin Bango. As businesses increasingly expand into the Japanese market, developers require high-quality test data to validate systems that handle international business identifiers. This function provides a seamless way to produce 13-digit identifiers that adhere strictly to the official standards set by the National Tax Agency of Japan. By using mock-jutsu, engineers can ensure their databases and applications are prepared for the specific structural requirements of Japanese corporate entities without relying on actual, sensitive business information.

Technically, the jp_cn generator implements a sophisticated MOD-9 check digit algorithm to ensure the validity of the generated mock data. The structure consists of a 1-digit check number followed by a 12-digit base, totaling 13 digits. The check digit is calculated using the specific Modulo 9 remainder method, ensuring that any system performing checksum verification will recognize the string as a valid identifier. This level of precision is critical for testing input validation logic, checksum verification routines, and data ingestion pipelines. Whether you are working in a Python environment using jutsu.generate('jp_cn') or conducting high-load performance testing via the JMeter plugin with the ${__mockjutsu(jp_cn,)} syntax, the library provides consistent and reliable outputs that mimic real-world production data.

Incorporating jp_cn into your testing lifecycle offers significant advantages for QA engineers and backend developers alike. It is particularly beneficial for testing Enterprise Resource Planning (ERP) systems, Know Your Customer (KYC) onboarding flows, and financial reporting software where accurate corporate identification is mandatory. Using the mock-jutsu CLI command "mockjutsu generate jp_cn" allows for rapid prototyping and local development, reducing the friction often associated with sourcing international test data. This capability ensures that edge cases involving corporate ID lengths and mathematical validity are covered early in the development cycle, preventing costly data errors in production.

Ultimately, the mock-jutsu library simplifies the complexities of international data compliance. By automating the creation of valid Japanese Corporate Numbers, the jp_cn function helps teams avoid the pitfalls of using static or improperly formatted dummy data. This focus on algorithmic accuracy ensures that your software remains robust and compliant with Japanese data standards. Whether you are building a global logistics platform or a localized fintech application, utilizing this specialized generator streamlines the path from development to deployment while maintaining the highest standards of data integrity and testing rigor.

CLI Usage
mockjutsu generate jp_cnmockjutsu bulk jp_cn --count 10mockjutsu export jp_cn --count 10 --format jsonmockjutsu export jp_cn --count 10 --format csvmockjutsu export jp_cn --count 10 --format sql# --mask: regulation-compliant output (PCI DSS / GDPR / KVKK)mockjutsu generate jp_cn --maskmockjutsu bulk jp_cn --count 5 --mask
Python API
from mockjutsu import jutsujutsu.generate('jp_cn')jutsu.bulk('jp_cn', count=10)jutsu.template(['jp_cn'], count=5)# mask=True: regulation-compliant outputjutsu.generate('jp_cn', mask=True)jutsu.bulk('jp_cn', count=5, mask=True)
JMeter
${__mockjutsu_intl_ids(jp_cn)}# JMeter Function: __mockjutsu_intl_ids# Parameter 1: jp_cn# Parameter 2: (not required for this function)# Add 'mask' keyword to get a regulation-compliant masked value${__mockjutsu_intl_ids(jp_cn,mask)}
REST API
GET /generate/jp_cn# → {"type":"jp_cn","result":"...","status":"ok"}GET /bulk/jp_cn?count=10POST /template {"types":["jp_cn"],"count":1}# mask=true: regulation-compliant outputGET /generate/jp_cn?mask=trueGET /bulk/jp_cn?count=5&mask=true

Parameters

Parameter Values Description
--mask true | false Return a regulation-compliant masked value (PCI DSS, GDPR, KVKK…)

Other Languages