Skip to main content

Codes and profiles

A user is the person. What the machine reads is their code. What decides what they may take is the code's profile.

Code​

The physical identifier the user presents. Supported types: QR, NFC, CODE128, CODE39, PDF417, EAN-13, UPC-A, MRZ, GENERIC.

A code has:

  • a value (the ID the machine reads), unique within the account;
  • one profile, from its account's line. It is required: the code is born with it and it can be changed, never removed;
  • balance and top-up if the account is VENDING (see Balances);
  • an active/inactive status, independent of the user's status.

A code has no level: it is valid across the whole account, with a single balance and a single quota. Where it dispenses is decided by its profile's authorised devices, and the same value cannot be repeated within the account (it can in another account).

Profile​

The consumption rule. It belongs to one account and has that account's business line: in a VENDING account every profile is VENDING, and in an EAS account, every profile is EAS. It has no level: where it works is defined by its list of authorised devices.

VENDING profile

FieldPurpose
Top-up periodHow often credit is granted: daily, weekly, biweekly, monthly, quarterly, semiannual, annual, or Custom (specific dates).
Top-up valueHow much is credited each period.
Max balanceCap for the accumulated credit. Only exists with cumulative credit; empty = no cap.
Cumulative creditOn: the top-up adds up to the previous balance. Off: it replaces it. With it, the balance can also be reset to 0 on chosen dates.
Consumption daysOptional. Days when dispensing is allowed.

EAS profile

FieldPurpose
ProductsAllowed products, each with a quantity per period (or unlimited).
PeriodWindow that quantity applies to.
Time between deliveriesMinimum wait between two deliveries of the same product.
Consumption daysOptional, same as VENDING.
"Returnable" is set on the profile

Whether a product is returnable, restricts delivery or is reusable is decided on each line of the profile, not on the product: it is a rule of the profile × product pair, just like the quantity and the time between deliveries.

Authorised devices: all or a list​

The profile can work on every device of the account or only on the ones you check. There is a shortcut to check or uncheck a whole operation, but what gets saved are the devices.

  • With no device checked, the profile works on every device of the account, including the ones installed later.
  • With at least one checked, it works only on those. A device installed later is not added automatically: you must edit the profile and check it.

Code ↔ profile: same account​

The only pairing rule is the account: the profile must belong to the user's account. Otherwise the server answers The profile does not belong to the user's account. A code has no level of its own: it is valid across the whole account, so any profile of that account can be assigned to it. Since the account has a single line, the profile is always of the right line.

How a delivery gets authorised​

  1. The user presents the code at a device.
  2. The code must have a profile assigned.
  3. That device must be in the profile's authorised devices list.
  4. If consumption days are configured, today must be enabled.
  5. VENDING: enough credit for the price. EAS: remaining quota and the time between deliveries elapsed.
  6. User and code must be active, and so must the profile.

If anything fails, the attempt is recorded in Failed deliveries with its reason.