REST API ยท v1

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

  1. Read the catalog and retain its catalogRevision.
  2. Create a server-priced quote. Quotes normally expire after 15 minutes.
  3. Create the order from that quote with confirm: true and a stable, unique idempotency key. One quote covers one category and one or more compounds; each compound is its own sample line.
  4. Pay: with stripe_checkout the response carries payment.hostedUrl, where the account owner pays by card, saved card, or Stripe-settled stablecoin. POST /payments/prepare returns a fresh link (or the paid state) at any time; the API never charges a card itself.
  5. Ship: the same response carries shipping with 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.
  6. 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

Gold Standard Analytics REST API endpoints
MethodPathPurpose
GET/catalogAuthoritative cursor-paginated catalog
POST/quotesImmutable server-priced quote
GET / POST/ordersList or create orders
GET/orders/{reference}Order detail, timeline, scoped related resources
GET/invoicesList safe invoice metadata
GET/invoices/{reference}Read one invoice
GET/paymentsList payment state
GET/payments/{reference}Read one payment
POST/payments/prepareSafely retry payment preparation
POST/payments/usdc/submitSubmit an Ethereum transaction hash for verification
GET/shipmentsList labels and shipments
GET/shipments/{reference}Read tracking and carrier events
GET/shipments/{reference}/labelPre-paid inbound label (PDF), tracking, ship-to address, and packing steps
GET / POST/orders/{reference}/pickupUPS door-pickup options, or request one (paid by the customer with Stripe; booked once paid)
GET/orders/{reference}/etaStage-by-stage progress with a non-binding ETA
GET/orders/{reference}/custodyChain-of-custody timeline and retention deadline
POST/orders/{reference}/addonsRequest add-on assays on the retained sample
POST/orders/{reference}/cancel-requestFile a human-confirmed cancellation request
GET/resultsList QA-published COAs only
GET/results/{reference}Read one published COA and structured results
GET/results/{reference}/analytesNormalized per-analyte rows for a published COA
GET / POST/support/ticketsList or open support tickets answered by a human
POST/notifications/customer-coaConsent-gated COA email to an opted-in end customer
GET/orders/{reference}/raw-dataReleased one-hour instrument manifests
GET/orders/{reference}/samplesSample items, logged units, tests, status history, linked COAs
GET/orders/{reference}/instrument-dataStructured instrument measurements behind the order's published COAs
GET/results/{reference}/instrument-dataStructured instrument measurements behind one published COA
GET/instrumentsLab-wide instrument registry with linked equipment
GET/methodsLab-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/batchPublic COA authenticity check by accession
GET / POST/webhooksList or create signed endpoints
DELETE/webhooks/{endpointId}Delete a signed endpoint
POST/webhooks/{endpointId}/rotate-secretRotate an endpoint secret
POST/webhooks/{endpointId}/testSend a signed test event

Scopes

Agent API scopes and capabilities
ScopeCapability
catalog:readBrowse tests, matrices, bundles, pricing, and requirements
quotes:writeCreate immutable, expiring server quotes
orders:read / orders:writeRead or place customer-owned laboratory orders
invoices:read / payments:readRead invoice and payment state
payments:writeRetry preparation or submit a USDC transaction for verification
shipments:readRead labels, tracking, carrier history, the lab ship-to address, packing steps, and door-pickup options
results:readRead QA-published COAs and structured results
raw_data:readRead released instrument-file manifests after publication
instruments:readRead the structured instrument measurements, run metadata, and integrity checks behind published COAs, and export them in bulk
webhooks:read / webhooks:writeList 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.

Webhook event types
EventRead scopeEmitted when
order.createdorders:readAn order (submission) was placed.
order.status_changedorders:readThe 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.cancelledorders:readThe order was cancelled.
invoice.createdinvoices:readAn invoice was issued (Mercury, Stripe, or USDC rail).
invoice.updatedinvoices:readAn invoice changed. A Stripe card payment settling arrives here with data.status "paid" and data.previous_status not "paid".
payment.requestedpayments:readAn Ethereum USDC payment request was issued.
payment.observedpayments:readA matching USDC transfer was seen on chain.
payment.confirmingpayments:readThe USDC transfer is being confirmed and finalized.
payment.confirmedpayments:readPayment settled: a Mercury invoice was paid, or a USDC transfer finalized.
payment.reorgedpayments:readA previously observed USDC transfer left the canonical chain; the request is awaiting a transfer again.
payment.expiredpayments:readA USDC payment request expired unpaid.
shipment.label_createdshipments:readThe prepaid inbound UPS label exists (data.tracking_number, carrier_code, service_code). Fetch the PDF from the label endpoint.
shipment.updatedshipments:readA UPS tracking event (data.status_code, description, occurred_at, location): in transit, out for delivery, delivered.
sample.receivedorders:readThe package was delivered to and received at the lab.
testing.startedorders:readAnalysis started (the order entered in_lab).
results.publishedresults:readEmitted with coa.published for the same certificate and payload; subscribe to either one.
coa.publishedresults:readA 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.retractedresults:readA 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.