sort api for service calls