We’re pleased to have launched the first phase of the OnAPI which exposes all of On’s product information as a RESTful JSON API.
Recognising the long-term ambitions of the business to provide up-to-date product information across many channels, and the need to provide a stable and versioned API for a number of existing services, we developed a fully machine discoverable API that exposes the current state of On’s product range, right down to the number of each shoe in each warehouse.
The OnAPI sources much of its data from Salesforce, exposing the data in a much more client-friendly and lightweight format. In addition, we see further stability gains in decoupling end-clients from directly interfacing with Salesforce with the business making regular changes to their data structures and with the Salesforce API on the receiving end of large changesets every quarter.
The first client for the OnAPI, the eCommerce website that we relaunched just over a year ago has been re-architected to pull product data from the API, rather than interfacing directly with Salesforce, as was previously the case.
We’re excited to be exploring further opportunities for the OnAPI, both in applications within the business and with third parties interested in leveraging live product data from On. In addition, we’re looking to expose more than just product information to the API over the coming year; with stockist data, order functionality and fulfilment all high on the list.
From an implementation perspective, we’d heartily recommend the RSpec API Documentation Gem for other Rubyists looking to generate API documentation. Key for us was that documentation needed to be kept close to the code to ensure it doesn’t go stale. This gem takes a great approach to repurposing your specs to drive your docs.