Skip to content

raindrop-ua/pesel-api

Repository files navigation

PESEL Generator API

Java Spring Boot Build License

PESEL Generator API — a lightweight REST service built with Spring Boot that generates valid Polish PESEL numbers.
It supports random generation as well as custom parameters (birthdate, sex, quantity).
All generated numbers within a single request are guaranteed to be unique


Features

  • Generate one or multiple PESEL numbers
  • Supported parameters:
    • sex — gender (male / female)
    • dob — birthdate (dd.MM.yyyy)
    • quantity — amount of PESELs to generate (default: 1)
  • Input validation and clean JSON error responses
  • Clean and simple architecture: controller, service, exceptions, utils
  • Ready for Docker & CI/CD

Running

Maven

mvn spring-boot:run
mvn clean package
java -jar target/pesel-*.jar

Service will be available at: http://localhost:8090/generator

Single random PESEL

curl "http://localhost:8090/generator"

Female PESEL

curl "http://localhost:8090/generator?sex=female"

10 random PESELs

curl "http://localhost:8090/generator?quantity=10"

Specific date of birth

curl "http://localhost:8090/generator?dob=03.09.1983"

Combined parameters

curl "http://localhost:8090/generator?dob=26.06.1989&sex=female&quantity=5"

Live Demo

🔗 Try it on api.pesel.dev/generator


Made with ❤️ by Anton Sizov

About

PESEL Numbers Generator

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors