Ruby SDK
ideal_postcodes 3 is our new Ruby SDK for the Ideal Postcodes API. It has one method for every API operation, has no runtime dependencies and runs on Ruby 3.3 or later.
Details
- Every operation: Postcode lookup, address search and autocomplete, UPRN lookup, address cleanse, places, email and phone validation, plus key, licensee and configuration management
- No dependencies: Requests go through Net::HTTP and the standard library's JSON. Pass your own transport to use another HTTP client
- Typed responses: Every response is an object generated from the OpenAPI spec, with one reader per field, and each dataset's native record has its own class, from
PafAddresstoUspsAddress - RBS signatures: The gem ships a signature for every method and reader, for Steep, Ruby LSP and other tools that read RBS
- Clear errors: An HTTP error raises
IdealPostcodes::ApiErrorwith the HTTP status and the API's error code and message. A failed connection raisesTransportError - Upgrading from 2.x: Version 3 is a new client. Module methods such as
IdealPostcodes::Postcode.lookupgive way to methods on a client object - Agent skill:
npx skills add ideal-postcodes/skillsgives coding agents theideal-postcodes-ruby-sdkskill
Install with gem install ideal_postcodes, then start with the Ruby SDK documentation.