api with swipe finction