For the complete documentation index, see llms.txt. This page is also available as Markdown.

Response Codes

The Sahamati billing endpoint returns the following HTTP responses for each push request made by SNA:

Code
Status
Response Body

200

OK

{ "ver": "1.0", "timestamp": "2026-09-24T10:15:30Z", "txnId": "txn-test-0001", "status": "accepted", "blob_file": "aa-test-001/mc-test-0001" }

400

Bad Request

{ "ver": "1.0", "timestamp": "2026-09-24T10:15:30Z", "txnId": "txn-test-0001", "errorCode": "Bad request", "errorMsg": "Please provide a valid API key" }

400

Bad Request

{ "ver": "1.0", "timestamp": "2026-09-24T10:15:30Z", "txnId": "", "errorCode": "Bad request", "errorMsg": "Required field(s) missing: metricCollectionId" }

400

Bad Request

{ "ver": "1.0", "timestamp": "2026-09-24T10:15:30Z", "txnId": "txn-test-0001", "errorCode": "Bad request", "errorMsg": "aaId does not match the authenticated caller" }

401

Unauthorized

{ "ver": "1.0", "timestamp": "2026-09-24T10:15:30Z", "txnId": "txn-test-0001", "errorCode": "auth_error", "errorMsg": "Auth token is invalid/expired" }

403

Forbidden

{ "ver": "1.0", "timestamp": "2026-09-24T10:15:30Z", "txnId": "txn-test-0001", "errorCode": "ip_not_whitelisted", "errorMsg": "Access denied. Your IP is not whitelisted" }

429

Too Many Requests

{ "ver": "1.0", "timestamp": "2026-09-24T10:15:30Z", "txnId": "txn-test-0001", "errorCode": "Rate limit exceeded", "errorMsg": "Rate limit exceeded. Try again in 5 minutes." }

502

Bad Gateway

{ "ver": "1.0", "timestamp": "2026-09-24T10:15:30Z", "txnId": "txn-test-0001", "errorCode": "processing_error", "errorMsg": "ingest failed, retry is safe" }

A 429 response includes a Retry-After header with the wait time in seconds. For a 400 validation failure, txnId may be empty if the payload could not be parsed far enough to read it.

📌 A billing payload resubmitted with the same txnId is accepted with HTTP 200, so retrying after a 429 or 502 is safe.

Last updated

Was this helpful?