[API] flattens json for list; expands for individual item