Flatten endpoints