Developers
Storefront API
Put your certificate data on your own product pages, served from our infrastructure rather than yours. One script tag for most people, a JSON endpoint for anyone who wants to build their own presentation.
v1 · August 2026
Keys come with an account. The API serves certificates for laboratory clients who have opted into public listing. There is no self-serve signup: you get a key from the portal once you have an account.Accounts open with the laboratory; until then, join the founding vendor program.
Quick start
Paste this into your product template. That is the whole integration.
<div data-averion
data-key="avk_pub_your_key_here"
data-product="Semaglutide"
data-lot="SPC-2026-0042"></div>
<script src="https://averionanalytics.com/embed.js" async></script>data-lot is optional. Include it and the widget shows the certificate for that exact lot. Leave it out and it shows your most recent released certificate for that product, clearly labelled as such so nobody mistakes it for a statement about the vial in their hand.
What the widget does
- Renders inside a shadow root, so your theme CSS cannot break it and its CSS cannot leak into your page.
- No dependencies, under 12 KB, loaded asynchronously.
- If our API is unreachable it renders nothing and logs a warning. A laboratory outage never leaves a broken box on your storefront.
- Pass and fail are carried in text, not colour alone, so the panel is readable by a screen reader and by someone who cannot distinguish the two.
- Multiple widgets per page are fine. Call window.AverionEmbed.scan() after injecting markup dynamically.
Shopify and WooCommerce
Both install the same widget, so the panel is identical on every store: rendered by us from the certificate as issued, linked to the full certificate and its verification page, and not editable from your store.
- Shopify. Download averion-certificate.liquid. In the theme editor, add a Custom Liquid block to the product page and paste the file in, then put your publishable key in its first line. If a store title differs from the name on your certificate, set the product metafield averion.product; averion.lot is optional.
- WooCommerce. Download averion-certificates.zip, upload it under Plugins, then paste your publishable key under Settings, Averion certificates. It adds a “Lab certificate” tab to product pages, or use the shortcode [averion_certificate]. Each product can carry its certificate name and lot under Product data.
Under the certificate-use terms, do not place the panel beside claims about human use. Results relate only to the item tested, as received.
The endpoint
GET https://averionanalytics.com/api/v1/certificates
Parameters
| Name | Required | Notes |
|---|---|---|
| key | yes | Your publishable key. May also be sent as Authorization: Bearer. |
| product | yes | Exact product name, case-insensitive. Max 200 characters. |
| lot | no | Exact lot, case-sensitive. Max 120 characters. |
Example
curl "https://averionanalytics.com/api/v1/certificates\ ?key=avk_pub_your_key_here&product=Semaglutide"
{
"vendor": { "name": "Specimen Peptide Co.", "slug": "specimen-peptide-co" },
"query": { "product": "Semaglutide", "lot": null, "matched": "latest" },
"certificate": {
"accession": "AVR-26-000001",
"product": "Semaglutide",
"lot": "SPC-2026-0042",
"version": 1,
"releasedAt": "2026-08-28",
"ageDays": 2,
"stale": false,
"overall": "PASS",
"results": [
{ "analyte": "Purity + LC-MS Identity", "display": "99.04%", "status": "PASS" }
],
"verifyUrl": "https://averionanalytics.com/verify/AVR-26-000001"
},
"disclaimer": "Results relate only to the sample as received…",
"terms": {
"url": "https://averionanalytics.com/terms",
"displayRequirements": [ "…", "…" ]
}
}What you must display
The widget and the badge are rendered by us and carry our framing wherever they go. Raw JSON does not, so these obligations travel in every response as terms.displayRequirements and are binding under section 6 of the terms of service:
- Show the accession number, lot and release date next to any result, with equal prominence.
- Show the returned disclaimer with any result.
- Do not omit the tests performed, and do not restate our results as a grade, score or rating of your own making while attributing it to us.
- Do not display our results, name or marks on any page stating or implying the product is for human consumption or administration.
- Do not leave a certificate up for a lot you have stopped shipping.
Certificate age
ageDays is days since release, and stale is true past 365 days. This is a display signal, not a statement that anything about the material changed: it exists because a panel left on a storefront for a year is describing a lot you have most likely stopped shipping. Our widget prints a notice when stale is true. If you render your own panel, handle it.
The matched field
| Value | Meaning |
|---|---|
| lot | You asked for a lot and we found its certificate. |
| latest | You did not ask for a lot. This is the most recent released certificate for the product. |
| none | Nothing matched. certificate is null. |
There is no fallback. If you ask for a lot that has no certificate, you get none, never a different lot's result. A silent fallback would let an untested lot appear tested, so the API refuses to do it.
Status codes
| Code | Meaning |
|---|---|
| 200 | Query succeeded. certificate may be null. |
| 400 | Missing or malformed product, or a parameter over its length cap. |
| 401 | Key missing, malformed, unknown or revoked. |
| 403 | Request origin is not in the key's allowed domains. |
| 404 | Your account is not publicly listed. |
| 429 | Rate limited. Includes Retry-After. |
| 503 | Laboratory database unreachable. Retry. |
Rate limits and caching
120 requests per key per minute, plus a per-IP throttle on unauthenticated traffic. Responses carry max-age=300, so a product page served through any CDN costs you almost nothing and a newly released certificate appears within five minutes.
Keys and domains
Keys look like avk_pub_9f2c1a7e4b8d0356a1c9e7f42b8d6051. The pub is deliberate: this key is publishable. It is meant to sit in your page source. It is read-only, scoped to your organization, and reaches nothing you have not already chosen to publish. A leaked publishable key is not an incident.
You can restrict a key to specific domains in the portal. Because the browser sets the origin header and a non-browser client can forge it, treat that as a control against casual reuse by another site rather than as a secret. Nothing in the design depends on it being one.
Revoking a key in the portal takes effect immediately.
What the API will never do
- Filter out a failing result. There is no status parameter and there never will be one. The API returns what we measured.
- Let you choose the sort order. Newest released first, fixed.
- Return drafts or superseded versions. Released certificates only.
- Expose your access codes, certificate PDFs, or their SHA-256 fingerprints. A reader still needs the code printed on the vial to open the document itself.
- Accept writes. It is read-only, permanently.
The first two are not oversights. A feed you could curate would be worth nothing to the customer reading it, which is the whole reason this exists. The reasoning is in the publication and impartiality policy.
Versioning
The path carries the version. Additive changes, such as new fields on the certificate object, ship within v1. Anything that would break an existing integration ships as v2, and v1 keeps working. Write your integration to ignore fields it does not recognise.
Support
lab@averionanalytics.com. Tell us the accession number and the request you sent.