Changelog

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 PafAddress to UspsAddress
  • 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::ApiError with the HTTP status and the API's error code and message. A failed connection raises TransportError
  • Upgrading from 2.x: Version 3 is a new client. Module methods such as IdealPostcodes::Postcode.lookup give way to methods on a client object
  • Agent skill: npx skills add ideal-postcodes/skills gives coding agents the ideal-postcodes-ruby-sdk skill

Install with gem install ideal_postcodes, then start with the Ruby SDK documentation.