Integration with rails api