Updated sync api with pagination and proper unirest, lodash, and moment functions