Product type
A product: the parent of its variants. Requires the item.read permission.
Fields
id
The product's MAX id.
code
String!
The product's code in MAX.
name
String!
The product's name, as the catalogue keeps it, not translated.
baseUnit
String!
The product's base unit: its smallest stock unit, the unit its stock is counted in.
vatRateCode
String!
The code of the product's VAT rate.
setMode
How the product is stocked and sold when it is a set. Null when it is not a set.
archivedAt
When the product was archived. Null while it is in use.
updatedAt
When the product last changed.
- It moves when the product's own fields change (archiving too), or when one of its variants, their pack units or their codes change.
- It does not move when a price changes (prices live on price lists), or when an attribute or one of its values is renamed.
- It is the start time of the transaction that wrote the change, so a change committed later
can carry an earlier
updatedAtthan one you already read. Resume an incremental sync from the lastupdatedAtyou saw minus 10 minutes, and remove duplicates by id. - A sync passes
includeArchived: true.archivedAtthen tells you that a product is gone.
variants
Arguments:
first:Intafter:Stringlast:Intbefore:String
Every variant of the product, archived ones included.
- The default variant comes first, then the rest by SKU (compared by bytes) and id.
- A connection, paged with
first/afterorlast/before, at most 250 a page. - Its cursors belong to this product's variants and are refused anywhere else.
Null, with an error at its path, when its page cannot be read, for example because of a cursor of another parent. The rest of the response is returned.
A page costs 2 + first (or last) × the cost of one node.
externalRefs
Arguments:
first:Intafter:Stringlast:Intbefore:String
The ids that external sources know the product by.
- Sorted by external source code, then by parent id (references without a parent first), external id and the reference's own id.
- A connection, paged with
first/afterorlast/before, at most 250 a page. - Its cursors belong to this product's references and are refused anywhere else.
- It is read with the product, so it requires the
item.readpermission, notintegration.read. Withoutitem.readit is null, withFORBIDDEN_ROLEat its path.
Null, with an error at its path, when its page cannot be read, for example because of a cursor of another parent. The rest of the response is returned.
A page costs 2 + first (or last) × the cost of one node.