Skip to content

A basic API written in Rust using Rocket web framework, used to validate a Romanian Company Identification Number (CUI).

License

Notifications You must be signed in to change notification settings

cristian-swf/cui-validator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CUI Validator

A basic API written in Rust using Rocket web framework version 5 RC 3, used to validate a Romanian Company Identification Number (CUI).

It provides 3 routes:

  • GET /about - returns details about the API
  • GET /uptime - returns the uptime in seconds
  • GET /validate/cui - validate CUI number

In Romania, a Company Identification Number (CUI), known as "Cod Unic de Înregistrare" in Romanian, is a unique identification number assigned to legal entities, including companies, registered in the country. The CUI is used for tax and legal purposes and is issued by the Romanian tax authorities.

The CUI is a combination of digits, and its format may change over time due to regulatory updates. At the moment of writing this API, the CUI consists of 7 to 10 digits. This unique number helps the government and other relevant authorities track and identify businesses for tax, legal, and administrative purposes.

Example of CUI: 33034700

To run:

cargo run

Build for production:

cargo build -r

To run tests:

cargo test

Load testing using autocannon:

autocannon -c 100 -d 5 -p 10 http://127.0.0.1:8000/validate/33034700

About

A basic API written in Rust using Rocket web framework, used to validate a Romanian Company Identification Number (CUI).

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages