Working API with optional parameters