EligiPro Partner API V3 / Technical reference / Guide 02

Authentication & signing

Verify your API key, sign a request, troubleshoot a rejection, and rotate your signing secrets.

Service and auth info

All successful /v3 JSON routes return the standard V3 envelope:

{
  "requestId": "00-abc123",
  "version": "v3",
  "data": {
    "...": "..."
  }
}

The host-level /health endpoint is the public exception. It is not under /v3 and it is not wrapped in the V3 envelope.

GET /health
{
  "status": "ok",
  "service": "EligiPro.Api.V3",
  "utcNow": "2026-05-26T14:32:18Z"
}
GET /v3/auth/info?companyIdentification=1174762973
{
  "requestId": "00-abc123",
  "version": "v3",
  "data": {
    "headerName": "EPAPIKey",
    "partnerId": 21,
    "partnerCode": "DEMO",
    "apiUserId": 8,
    "companyIdentification": "1174762973",
    "companyDescription": "DEMO FL Dev",
    "status": "Authorized",
    "notes": "The API key is valid, the API user is active, and the partner is related to the requested company."
  }
}

Headers

Authentication always starts with the partner API key header:

EPAPIKey: YOUR_PARTNER_API_KEY

Partners with inbound request signing enabled must also send the following headers on authenticated V3 routes. The only JSON exception is GET /v3/auth/info, which stays intentionally unsigned so you can validate the API key and company mapping before debugging signatures.

X-EligiPro-Timestamp: 2026-06-03T18:15:27.1234567Z
X-EligiPro-Nonce: 6cdb8620-fdbf-4e05-ac2c-525ca87ea018
X-EligiPro-Signature: sha256=<hex_hmac>
X-EligiPro-KeyId: primary   // optional

Request signing is a backend-to-backend responsibility. Your backend must calculate the HMAC and send the final headers together with the exact request it is about to send. Do not expose the signing secret inside browser code, mobile apps, or downloadable desktop clients.

String to sign:

{timestamp}\n{nonce}\n{method}\n{pathAndQuery}\n{rawBody}
HMACSHA256(RequestSigningSecret, utf8(stringToSign))

X-EligiPro-KeyId is optional today, but strongly recommended. It gives both sides a stable name for the active signing secret and makes future key rotation easier.

Synchronous JSON responses returned by the public API are not wrapped in an additional HMAC signature header. Response integrity for those request-response routes relies on HTTPS/TLS. The signed EligiPro-to-partner surface is the outbound webhook delivery model documented in the Webhook Guide.

Signed request rules

Once request signing is enabled for your partner, every authenticated business route under /v3 must be signed. The intended onboarding sequence is:

  1. Use GET /v3/auth/info with only EPAPIKey to validate the key and the target company.
  2. Use signed requests for all other authenticated V3 routes.

The canonical rules are intentionally simple and strict:

  1. timestamp: send UTC in ISO 8601 round-trip form, for example 2026-06-03T18:15:27.1234567Z.
  2. nonce: send one unique UUID-style value per request. Never reuse a nonce for the same partner.
  3. method: sign the uppercase HTTP method exactly as sent, such as GET, POST, or PATCH.
  4. pathAndQuery: sign the exact path and query string starting with /, preserving the final query parameter order and encoding that your client sends on the wire.
  5. rawBody: sign the exact raw body string. For GET and DELETE, the body is the empty string.
  6. encoding: build the string to sign in UTF-8, then calculate HMACSHA256 with the request signing secret.
  7. header format: send the final digest as lowercase hexadecimal prefixed by sha256=.

Whitespace matters. If your JSON serializer changes indentation, spacing, or line endings after the HMAC is calculated, the signature changes too. The safest pattern is to serialize the body once, store that exact string in memory, sign it, and send that same string as the HTTP payload.

Behavior Current rule
Clock skew tolerance 5-minute request window
Replay protection The nonce is stored per partner and cannot be reused while it remains active in the replay window.
Retry behavior Every retry must use a new timestamp, a new nonce, and therefore a new signature.
Unsigned exception GET /v3/auth/info stays unsigned on purpose.

Signature examples

The examples below show the exact signing inputs. The final HMAC values are placeholders because each partner uses its own secret.

Example 1: signed GET request

GET /v3/company/TEST.TA/payors?view=active
EPAPIKey: YOUR_PARTNER_API_KEY
X-EligiPro-Timestamp: 2026-06-03T20:12:49.9510000Z
X-EligiPro-Nonce: e012b101-edb8-4837-a201-2e93eab33aa5
X-EligiPro-Signature: sha256=<computed_hmac>
X-EligiPro-KeyId: primary

String to sign for that GET request:

2026-06-03T20:12:49.9510000Z
e012b101-edb8-4837-a201-2e93eab33aa5
GET
/v3/company/TEST.TA/payors?view=active

The last line is empty because the request body is empty. You still keep the final newline because rawBody is part of the canonical string even when it is blank.

Example 2: signed PATCH request

PATCH /v3/company/TEST.TA/patients/2
EPAPIKey: YOUR_PARTNER_API_KEY
X-EligiPro-Timestamp: 2026-06-03T20:19:10.4040000Z
X-EligiPro-Nonce: 7344a0f5-0db8-4d6f-a44e-69363f38fd2f
X-EligiPro-Signature: sha256=<computed_hmac>
Content-Type: application/json

{"firstName":"IVAN","lastName":"MUDRYJ","active":true,"tags":["POSTMAN","UPDATED"]}

String to sign for that PATCH request:

2026-06-03T20:19:10.4040000Z
7344a0f5-0db8-4d6f-a44e-69363f38fd2f
PATCH
/v3/company/TEST.TA/patients/2
{"firstName":"IVAN","lastName":"MUDRYJ","active":true,"tags":["POSTMAN","UPDATED"]}

If you send the same JSON pretty-printed with spaces and line breaks, the body string changes and the signature must be recalculated from that formatted body.

Example code: Node.js

import crypto from "node:crypto";

function buildSignature({
  requestSigningSecret,
  timestamp,
  nonce,
  method,
  pathAndQuery,
  rawBody
}) {
  const stringToSign = [
    timestamp,
    nonce,
    method.toUpperCase(),
    pathAndQuery,
    rawBody ?? ""
  ].join("\\n");

  const hex = crypto
    .createHmac("sha256", requestSigningSecret)
    .update(stringToSign, "utf8")
    .digest("hex")
    .toLowerCase();

  return `sha256=${hex}`;
}

Example code: C#

using System.Security.Cryptography;
using System.Text;

static string BuildSignature(
    string requestSigningSecret,
    string timestamp,
    string nonce,
    string method,
    string pathAndQuery,
    string rawBody)
{
    var stringToSign = string.Join("\n", new[]
    {
        timestamp,
        nonce,
        method.ToUpperInvariant(),
        pathAndQuery,
        rawBody ?? string.Empty
    });

    using var hmac = new HMACSHA256(Encoding.UTF8.GetBytes(requestSigningSecret));
    var hash = hmac.ComputeHash(Encoding.UTF8.GetBytes(stringToSign));
    var hex = Convert.ToHexString(hash).ToLowerInvariant();
    return $"sha256={hex}";
}

Postman bundle behavior

The downloadable EligiPro Postman bundle includes a collection-level pre-request script that can:

  • skip signing for /health and /v3/auth/info
  • sign every other authenticated route automatically
  • use optional forcedNonce and forcedTimestamp variables for replay testing

In the bundled environment, populate:

  • epApiKey
  • requestSigningSecret
  • requestSigningKeyId when EligiPro gave you one

Signature troubleshooting

Status Typical title What it usually means
401 Missing request signing headers The partner is configured for signing and the request did not send timestamp, nonce, or signature.
401 Invalid request signature The HMAC was calculated from a different method, path/query, timestamp, nonce, or raw body than the one that was actually sent.
401 Expired request timestamp The timestamp is outside the allowed request window or the caller clock is badly skewed.
409 Replay detected The same nonce was already used for that partner. Generate a new nonce and timestamp before retrying.
503 Request signing backend unavailable EligiPro could not reach the replay-protection backend and therefore could not validate the nonce safely.

When debugging a mismatch, log these five values together on your side:

  1. timestamp
  2. nonce
  3. uppercase HTTP method
  4. exact path and query string
  5. exact raw body string

In almost every signing issue, one of those five values differs between what the partner signed and what the HTTP client actually sent.

Signing secret rotation

Partners can rotate one or both shared secrets through:

POST /v3/auth/signing-secrets/rotate

This route is partner-facing. If inbound request signing is already enabled for your partner, this rotation request itself must be signed with the currently active RequestSigningSecret.

Request body:

{
  "rotateRequestSigningSecret": true,
  "rotateWebhookSigningSecret": false
}

At least one of those booleans must be true. You may rotate:

  • only the inbound request signing secret
  • only the outbound webhook signing secret
  • or both in the same request

The response returns the new secret value exactly once:

{
  "requestId": "40001234-0000-0000-b63f-84710c7967bb",
  "version": "v3",
  "data": {
    "partnerId": 3,
    "partnerCode": "TESTFL",
    "requestSigning": {
      "operation": "rotated",
      "keyId": "req-20260604113012015-4f91ad2e",
      "secret": "NEW_SECRET_VALUE_RETURNED_ONCE"
    },
    "webhookSigning": null,
    "notes": "Store the returned secrets now. EligiPro does not expose these values again after this response."
  }
}

Important rules:

  • There is no overlap window between the old and new secret.
  • If you receive HTTP 503 or lose the response, do not assume that the old secret still works or submit another rotation. Contact support with the request ID, if available. The secret is returned only once.
  • The old secret stops being valid as soon as rotation succeeds.
  • If you lose the current request signing secret, you cannot self-rotate it. EligiPro must recover it manually.
  • Rotating the webhook signing secret affects future signed webhook deliveries.

Operationally, most partners should update two places immediately after a successful rotation:

  • the backend secret store used to sign future API requests
  • the webhook receiver configuration used to validate future outbound deliveries

If you use the EligiPro Postman bundle during onboarding or troubleshooting, also replace requestSigningSecret and, when returned, requestSigningKeyId in the imported environment before sending the next signed business request.

Errors

V3 uses standard HTTP status codes plus a problem-details style payload.

{
  "title": "Patient already exists",
  "status": 409,
  "detail": "A patient with externalId 100234 already exists for company 1234567890.",
  "requestId": "00-abc123"
}
  • 400 malformed request
  • 401 missing or invalid API key, timestamp, nonce, or signature
  • 403 partner is not related to the target company
  • 404 company, payor, patient, or eligibility not found
  • 409 duplicate, conflicting state, patient plan limit, or replay detected for a reused nonce
  • 422 business validation error
  • 503 backend dependency temporarily unavailable