A T-shirt needs a size, a colour and a material. A laptop needs a processor and a screen size. A supplement needs a serving size and an ingredient list. In minipim, each of those is an attribute family — a product type — and every product belongs to exactly one.
Adding a field is data, not code: create the attribute in the admin or over the API and it’s live. No migration, no deploy, no ticket waiting on engineering. There’s a longer walkthrough in the product types guide.
19 attribute types
| Group | Types |
|---|---|
| Text | text, textarea, richtext (Markdown), url, email |
| Numbers | number, decimal, measurement, money |
| Choices | boolean, select, multiselect, tags |
| Dates | date, datetime |
| Links and files | media, file, reference |
| Escape hatch | json |
A few of these do real work for you:
- Measurement values carry a unit —
{ amount, unit }— and the unit must belong to the attribute’s unit family: mass, length, volume, area, power, energy, temperature or time. A weight can’t be saved in centimetres. - Money is always integer cents plus an ISO currency code:
{ amount_cents: 14800, currency: "USD" }. Never a float, so there are no rounding surprises. - Select lists can be closed, or let editors add new values as they go.
- File attributes accept PDFs, spec sheets and other documents, with optional limits on file type and size, and can hold one file or many.
Rules on every attribute
- Requirement — Required, Suggested or Available, and each family can override it. Required attributes must be filled before a product can be set to active.
- Validation — minimum and maximum length or a regular expression for text; min and max for numbers; format checks for URLs and emails.
- Localizable — a different value per locale. See localization.
- Scopable — a different value per channel, so a marketplace can get its own title.
- Variant axis — the attribute varies between variants, like size or colour.
- Default value — pre-fills new products, for the common types.
Every write through the admin or the API is checked against the product’s family: the right types, the rules above, real locales and channels, and no attribute codes the family doesn’t declare. A bad value comes back as a clear error instead of landing in your catalog.
Not just products
The same system defines the fields on categories, brands and content pages, so a category can carry a rich-text description and its own custom fields, and a blog post type can have an author and a summary.
Good to know
- Money and tags attributes are created through the API; the admin’s type picker offers the other 17.
- Units are validated, not converted.
- Values imported by the BigCommerce or Shopify connectors aren’t re-validated on import.