pricing follows from that. Read this page once and the four states below stop looking like special cases.
What the numbers mean
Everyprice_cents is what you pay, at the rate card on your API key. Beside it, retail_cents is the same item at the recommended retail card, so you can show a saving without a second request. Both are integer cents.
retail_cents is always present. When your key is already on the retail card it simply equals
price_cents.prices_view scope. Without it, pricing is null on every response — that is the only reason the whole object is ever null.
The four states
price_cents, plus which optional block sits beside it, is the state. There is no separate type field.
Positive — orderable alone
The marker has a price of its own. It may still appear in positions, andpositions then lists them cheapest first — buying the position is often cheaper than buying its members one by one.
biomarker_ids is the position’s full member set; includes is that set minus the marker you queried — what rides along.
Zero with requires — a ratio
A ratio is computed from measured markers, so it has no price of its own. Order it and Aniva puts its components in the cart at their own prices. A component is paid once per cart however many ratios lean on it.
Zero with positions — sold only inside a position
The marker has no price of its own, but it is a member of one or more positions. Buy one of those positions and you get it.
Null — uncurated
Aniva has not decided what this marker costs, so it is not for sale.null is not zero and not “ask us”: treat it as unavailable.
Finding the cheapest way to buy a set
Because every position a marker belongs to travels with the marker, you can solve this locally, without extra requests:- Collect the markers you want from List Biomarkers.
- For each one, compare its own
price_centsagainst theprice_centsof the positions in itspositionsblock. - A position bills once and delivers its whole
biomarker_idsset, so a position covering several of your markers is charged a single time. Extra markers you did not ask for come along at no additional cost.
The bill
Preview Containers returns the whole-cart bill for an appointment — the exact counterpart of the catalog states above:positions[]— every position that fired, billed once at its flat price.panels[]— every attached panel.biomarkers[]— one row per delivered marker. A row a position pays for costs0and names it invia_position. A component pulled in by a ratio carriesrequired_by; the ratio itself carriesrequires.total_cents— the priced positions plus the priced panels plus the priced biomarker rows, withretail_total_centsbeside it.
price_cents: null and adds nothing to the total, so a cart carrying one totals less than it will cost. Every other row keeps its price.
Some positions are internal. One that fired but is not partner-facing still bills, and appears in
positions[] with id and name set to null; the markers it pays for then carry no
via_position.