Updated the snippet to accept the FIELDS parameter