--- url: https://docs.youcan.shop/store-admin/metafields/types.md --- # Metafield Types Metafield types let you specify which value you're going to store to simplify the validation and display. YouCan Metafields API currently support the following types: | Type | Description | |-----------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | number | Numeric value (price, rating, etc) | | string | Text representation (product description, etc) | | array | Array or JSON object | | boolean | true or false value | | date | A date in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format (YYYY-MM-DD). | | date\_time | A date and time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format (YYYY-MM-DDTHH:MM:SS). | | money | A numeric amount, with a currency code that matches the store's currency. `{"amount": "5.99", "currency_code": "CAD"}` | | url | A URL with one of the allowed schemes: https, http, mailto, sms, tel. | | volume | A value and a unit of volume. Valid unit values: ml, cl, l, m3 (cubic meters), us\_fl\_oz, us\_pt, us\_qt, us\_gal, imp\_fl\_oz, imp\_pt, imp\_qt, imp\_gal. `{ "value": 20.0, "unit": "ml"}` | | weight | A value and a unit of weight. Valid unit values: oz, lb, g, kg. `{"value": 2.5,"unit": "kg"}` | Each of the types mentioned above supports a list type (`list.{type}`), as an example `list.number` can store a list of numbers (`[3, 4, 2, 12, 123]`). **Note:** All values are stored as strings internally and cast using the selected type on display.