An attribute’s type decides the shape of the value inside each { locale, channel, value } record and which validation options apply. The API validates every write against it and returns 422 with the offending path when a value doesn’t fit.
The types
| Type | Value shape | Validation options |
|---|---|---|
text | string | minLength, maxLength, regex |
textarea | string | same as text |
richtext | string (the admin stores Markdown) | same as text |
url | string, must be a valid URL | same as text |
email | string, must be a valid email | same as text |
number | number | min, max, integer: true |
decimal | number | same as number |
boolean | true / false | none |
date | "YYYY-MM-DD" | none |
datetime | ISO 8601 UTC timestamp, e.g. "2026-10-07T14:00:00Z" | none |
select | one string | options, allowNewValues |
multiselect | array of strings | options, allowNewValues |
measurement | { "amount": 0.4, "unit": "lb" } | unitFamily |
money | { "amount_cents": 1899, "currency": "USD" } | none |
tags | array of strings | string options apply to each item, maxItems (default 200) |
file | file reference object, or an array when multiple | multiple, allowedTypes, maxSizeBytes |
reference | UUID of another record | none enforced |
media | UUID of a media item | none |
json | anything | none |
select options are either plain strings or { "value": "…", "label": "…" }. A file reference is { mediaId, url, filename, mimeType, sizeBytes, label }.
Measurement units
unitFamily restricts the unit to one family. Units are stored as given and never converted.
| Family | Units |
|---|---|
| mass | mg, g, kg, oz, lb |
| length | mm, cm, m, in, ft |
| volume | ml, l, fl_oz, gal |
| area | cm2, m2, in2, ft2 |
| power | mw, w, kw |
| energy | j, kj, kcal |
| temperature | c, f, k |
| time | s, min, h, d |
Without a unitFamily, any unit string is accepted.
In the admin
The Type dropdown on Catalog → Attributes → New offers 17 types: all of the above except money and tags. Create those two through the API (POST /v1/attributes). Once they exist, the product editor can edit their values. The editor can’t edit reference or media values yet; set those through the API.
With the API
Set type when creating an attribute with POST /v1/attributes and put the options in validation:
{
"code": "list_price",
"label": { "en_US": "List price" },
"type": "money"
}
Full reference: api.minipim.com/docs.
Rules and limits
- Money is always integer cents plus an uppercase three-letter ISO 4217 currency. Decimals are rejected.
numberanddecimalare validated identically. Addinteger: trueto reject fractions.select/multiselectwith no options, or withallowNewValues: true, accept any string. New ones are added to the option list. With a closed list, only listed values pass.fileuploads are capped at 100 MB by the media endpoint.allowedTypestakes MIME types and accepts wildcards likeimage/*.- Only
money,numberanddecimalattributes can be used withsortBy=attributeand thefilterAttributerange filter on the products list.measurementis refused because amounts in different units don’t compare. See Listing, filtering and pagination. - Ten types can carry a default value:
boolean,text,textarea,number,decimal,select,date,datetime,url,email. - Product
tags(the organizing field on every product) are separate from thetagsattribute type. See Tags.
See also
- Attributes — Attributes are the typed fields of a minipim catalog: codes, labels, localizable, scopable and variant-axis flags, requirement levels, validation, deletion.
- Default values — Give a minipim product attribute a default value that is filled in when new products are created. Which types qualify, when defaults apply and when they don't.
- Media — Upload images, video and documents to products, variants and content pages: roles, the single hero, alt text, reordering, file types and the 100 MB limit.
- Listing, filtering and pagination — How minipim list endpoints page with limit, offset and hasMore, which ones return plain arrays, and the filters, sorts and limits /v1/products accepts.