API and data model