A deterministic API for the full test lifecycle.
Integrate the authoritative GSA catalog, locked quotes, laboratory orders, payment state, inbound shipping, published COAs, released raw data, and signed lifecycle events.
Base URL and authentication
https://www.goldstandardanalytics.com/api/v1/agent
Send the raw key as a bearer token on every request. GSA displays a new secret once and stores only a peppered verifier. Keep the token in your server-side secret manager.
export GSA_AGENT_TOKEN='gsa_live_REPLACE_ME' curl 'https://www.goldstandardanalytics.com/api/v1/agent/catalog?limit=100' \ -H "Authorization: Bearer $GSA_AGENT_TOKEN"
Canonical order flow
- Read the catalog and retain its
catalogRevision. - Create a server-priced quote. Quotes normally expire after 15 minutes.
- Create the order from that quote with
confirm: trueand a stable, unique idempotency key. One quote covers one category and one or more compounds; each compound is its own sample line. - Pay: with
stripe_checkoutthe response carriespayment.hostedUrl, where the account owner pays by card, saved card, or Stripe-settled stablecoin.POST /payments/preparereturns a fresh link (or the paid state) at any time; the API never charges a card itself. - Ship: the same response carries
shippingwith the prepaid inbound UPS label, the ship-to address, and packing steps. Re-read it any time from/shipments/{reference}/label, and optionally book a paid UPS door pickup once the order is paid. - Poll the order (status and full status history) or subscribe to signed webhooks, then retrieve only published COAs.
curl 'https://www.goldstandardanalytics.com/api/v1/agent/quotes' \
-H "Authorization: Bearer $GSA_AGENT_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"categoryId": "peptides",
"compoundNames": ["BPC-157"],
"testIds": ["sterility", "endotoxin"],
"turnaround": "standard",
"conformitySamples": 0
}'curl 'https://www.goldstandardanalytics.com/api/v1/agent/orders' \
-H "Authorization: Bearer $GSA_AGENT_TOKEN" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: your-system-order-000001' \
-d '{
"quoteId": "REPLACE_WITH_QUOTE_UUID",
"paymentMethod": "stripe_checkout",
"clientReference": "your-system-order-000001",
"sampleMetadata": [{
"compoundName": "BPC-157",
"lotNumber": "LOT-2026-0042",
"matrixNotes": "Lyophilized powder"
}],
"publishRawData": true,
"confirm": true
}'Endpoint reference
| Method | Path | Purpose |
|---|---|---|
| GET | /catalog | Authoritative cursor-paginated catalog |
| POST | /quotes | Immutable server-priced quote |
| GET / POST | /orders | List or create orders |
| GET | /orders/{reference} | Order detail, timeline, scoped related resources |
| GET | /invoices | List safe invoice metadata |
| GET | /invoices/{reference} | Read one invoice |
| GET | /payments | List payment state |
| GET | /payments/{reference} | Read one payment |
| POST | /payments/prepare | Safely retry payment preparation |
| POST | /payments/usdc/submit | Submit an Ethereum transaction hash for verification |
| GET | /shipments | List labels and shipments |
| GET | /shipments/{reference} | Read tracking and carrier events |
| GET | /shipments/{reference}/label | Pre-paid inbound label (PDF), tracking, ship-to address, and packing steps |
| GET / POST | /orders/{reference}/pickup | UPS door-pickup options, or request one (paid by the customer with Stripe; booked once paid) |
| GET | /orders/{reference}/eta | Stage-by-stage progress with a non-binding ETA |
| GET | /orders/{reference}/custody | Chain-of-custody timeline and retention deadline |
| POST | /orders/{reference}/addons | Request add-on assays on the retained sample |
| POST | /orders/{reference}/cancel-request | File a human-confirmed cancellation request |
| GET | /results | List QA-published COAs only |
| GET | /results/{reference} | Read one published COA and structured results |
| GET | /results/{reference}/analytes | Normalized per-analyte rows for a published COA |
| GET / POST | /support/tickets | List or open support tickets answered by a human |
| POST | /notifications/customer-coa | Consent-gated COA email to an opted-in end customer |
| GET | /orders/{reference}/raw-data | Released one-hour instrument manifests |
| GET | /orders/{reference}/samples | Sample items, logged units, tests, status history, linked COAs |
| GET | /orders/{reference}/instrument-data | Structured instrument measurements behind the order's published COAs |
| GET | /results/{reference}/instrument-data | Structured instrument measurements behind one published COA |
| GET | /instruments | Lab-wide instrument registry with linked equipment |
| GET | /methods | Lab-wide validated method registry |
| GET | /export/coas?format=json|csv&since={ISO} | Bulk export of all published COAs with per-analyte rows |
| GET | /export/instrument-results?format=json|csv&since={ISO} | Bulk export of every instrument measurement, one row per analyte |
| GET / POST | /verify, /verify/batch | Public COA authenticity check by accession |
| GET / POST | /webhooks | List or create signed endpoints |
| DELETE | /webhooks/{endpointId} | Delete a signed endpoint |
| POST | /webhooks/{endpointId}/rotate-secret | Rotate an endpoint secret |
| POST | /webhooks/{endpointId}/test | Send a signed test event |
Scopes
| Scope | Capability |
|---|---|
catalog:read | Browse tests, matrices, bundles, pricing, and requirements |
quotes:write | Create immutable, expiring server quotes |
orders:read / orders:write | Read or place customer-owned laboratory orders |
invoices:read / payments:read | Read invoice and payment state |
payments:write | Retry preparation or submit a USDC transaction for verification |
shipments:read | Read labels, tracking, carrier history, the lab ship-to address, packing steps, and door-pickup options |
results:read | Read QA-published COAs and structured results |
raw_data:read | Read released instrument-file manifests after publication |
instruments:read | Read the structured instrument measurements, run metadata, and integrity checks behind published COAs, and export them in bulk |
webhooks:read / webhooks:write | List or manage signed endpoints; subscriptions also require each event's resource-read scope |
Shipping your samples
Card and invoice orders are ship-first: the prepaid inbound UPS label is bought the moment the order is placed, and payment then gates only the COA release. Ethereum USDC orders get their label once the payment settles. The order response's shipping block and GET /shipments/{reference}/label return the signed label PDF, the tracking number and URL, packing steps with the exact containers per sample line, and the ship-to address (already printed on the label):
Gold Standard Analytics 5151 Mitchelldale St A10 Houston, TX 77092
Hand the box to any UPS driver or drop it at a UPS location. Once the order is paid, GET /orders/{reference}/pickup lists door-pickup dates, windows, the price, and a quoteToken; POST the chosen date and window with that token and confirm: true (needs orders:write). The pickup is booked with UPS after the account owner pays for it at the returned payUrl.
Pulling all of your laboratory data
Everything the laboratory produces for your account is reachable with a key you create yourself. /orders/{reference}/samples shows the physical units logged against each submitted item, /orders/{reference}/instrument-data and /results/{reference}/instrument-data return the QA-signed instrument measurements, run metadata, checksums, and integrity checks behind each published COA, and /export/coas and /export/instrument-results pull the whole history as JSON or CSV. Exports are capped at 5,000 rows per call; when truncated is true, repeat the call with since set to the last publishedAt. Attachment downloads inside instrument data are signed only when the order was placed with publishRawData enabled; the structured measurements are always yours.
curl 'https://www.goldstandardanalytics.com/api/v1/agent/export/instrument-results?format=csv&since=2026-01-01T00:00:00Z' \ -H "Authorization: Bearer $GSA_AGENT_TOKEN" -o instrument-results.csv
Idempotency and money
Where an endpoint requires an idempotency key, it must be 8โ255 characters and binds the exact request to its first result. Reusing a key with different input fails as a conflict. All commercial totals use integer USD cents. Ethereum USDC instructions separately return an integer atomic amount and an exact six-decimal display amount; neither may be rounded. The service never accepts a private key or broadcasts a transaction.
Signed webhooks
Endpoint registration performs public-HTTPS and SSRF validation. Deliveries are at least once, so deduplicate with X-GSA-Event-Id. Verify the timestamp tolerance and HMAC over the exact raw body before parsing JSON. Creating a subscription requires webhooks:write plus the matching read scope for every selected event: for example, results:read for COA events and orders:read for order or sample-status events.
X-GSA-Signature: t=<unix-seconds>,v1=<hex-hmac-sha256> signed bytes: <unix-seconds>.<exact raw HTTP body>
An endpoint subscribes to coa.published unless you pass events. Card payments settle as invoice.updated with data.status of paid; Mercury and USDC payments also emit payment.confirmed.
| Event | Read scope | Emitted when |
|---|---|---|
order.created | orders:read | An order (submission) was placed. |
order.status_changed | orders:read | The order moved to a new status (data.from_status, data.to_status): invoice_sent, overdue, paid, label_generated, in_transit, sample_received, in_lab, reporting, completed. |
order.cancelled | orders:read | The order was cancelled. |
invoice.created | invoices:read | An invoice was issued (Mercury, Stripe, or USDC rail). |
invoice.updated | invoices:read | An invoice changed. A Stripe card payment settling arrives here with data.status "paid" and data.previous_status not "paid". |
payment.requested | payments:read | An Ethereum USDC payment request was issued. |
payment.observed | payments:read | A matching USDC transfer was seen on chain. |
payment.confirming | payments:read | The USDC transfer is being confirmed and finalized. |
payment.confirmed | payments:read | Payment settled: a Mercury invoice was paid, or a USDC transfer finalized. |
payment.reorged | payments:read | A previously observed USDC transfer left the canonical chain; the request is awaiting a transfer again. |
payment.expired | payments:read | A USDC payment request expired unpaid. |
shipment.label_created | shipments:read | The prepaid inbound UPS label exists (data.tracking_number, carrier_code, service_code). Fetch the PDF from the label endpoint. |
shipment.updated | shipments:read | A UPS tracking event (data.status_code, description, occurred_at, location): in transit, out for delivery, delivered. |
sample.received | orders:read | The package was delivered to and received at the lab. |
testing.started | orders:read | Analysis started (the order entered in_lab). |
results.published | results:read | Emitted with coa.published for the same certificate and payload; subscribe to either one. |
coa.published | results:read | A certificate of analysis was QA-published (data.coa_id, submission_id, accession_number, compound, lot_number). Read or download it with the results endpoints. |
coa.retracted | results:read | A published certificate was withdrawn. |
Never persist a signed COA or instrument download URL as a permanent public link. Fetch the current result, copy the authorized file into your controlled storage when needed, and retain the accession/COA identifiers for future reconciliation.