Quickstart

Go from an API key to your first validated order in a few minutes.

This guide walks through the full integration path: create a sandbox API key, look up a payer, submit an order, and read the validation result. Everything here uses the public API with sandbox data, so you can run it without touching live traffic.

https://public-rg-api.crelio.solutions

All public paths include /public/v1.

1

Create a sandbox API key

In the Revenue Guard dashboard, open API Keys and create a key while the environment switcher is set to Sandbox. Sandbox keys start with rg_test_. Grant the order:create and payer:read scopes so the key can both look up payers and submit orders.

Copy the key when it is shown. The plaintext value is returned only once.

The API key alone determines whether a request reads and writes sandbox or live data. Do not send a separate environment header.

2

Store the key as an environment variable

$export REVENUE_GUARD_API_KEY="rg_test_your_sandbox_key"
3

Find a payer ID

Payers are passed to the order endpoint by ID. List the payers available in your environment:

$curl https://public-rg-api.crelio.solutions/public/v1/payers \
> -H "X-API-Key: $REVENUE_GUARD_API_KEY"

Each item includes an id, name, and category. Use an id in the next step.

4

Submit an order

Send the order, patient, insurance, and ordered tests. The response returns immediately with a 202 while validation runs asynchronously.

$curl https://public-rg-api.crelio.solutions/public/v1/orders \
> -H "X-API-Key: $REVENUE_GUARD_API_KEY" \
> -H "Content-Type: application/json" \
> -d '{
> "order_id": "ORD-1001",
> "payer_ids": ["00000000-0000-0000-0000-000000000000"],
> "patient_info": {
> "patient_uid": "PAT-123",
> "first_name": "Jane",
> "last_name": "Doe",
> "dob": "1985-04-12",
> "sex": "F"
> },
> "insurance_info": {
> "insurance_name": "Example Health",
> "policy_number": "POL-99887"
> },
> "ordered_tests": [
> {
> "short_name": "CBC",
> "test_name": "Complete Blood Count",
> "test_code": "CBC-01",
> "cpt_codes": ["85025"],
> "icd_codes": ["D64.9"]
> }
> ]
> }'

The response confirms how the order was recorded:

1{
2 "orderId": "rg_order_...",
3 "externalOrderId": "ORD-1001",
4 "version": 1,
5 "orderVersionId": "rg_order_version_...",
6 "status": "created",
7 "environment": "sandbox",
8 "livemode": false
9}

Re-sending the same order_id updates the existing order and creates a new version instead of a duplicate.

5

Review the validation result

Validation runs in the background. Open Orders in the dashboard to see the verdict, triggered rules, and suggested fixes for the order you just submitted. To be notified automatically instead of polling, subscribe a webhook to the validation.completed event.

What you built

You authenticated with a scoped, environment-bound API key, resolved a payer ID, submitted an order for classification, and saw the result surface in the dashboard. From here:

  • Read the API reference for exact request and response fields.
  • Learn how classification works in How Revenue Guard works.
  • Set up webhooks so your systems react to validation results in real time.
  • When your workflows are verified end to end, switch to a live key (rg_live_) as described in Environments.

Need help with a Revenue Guard integration? Contact your CrelioHealth implementation or account team with the endpoint, timestamp, and request trace details.