Replay uploads API
Upload a CSV or provider export and replay it against a policy version.
Base URL https://api.ndstill.com/v2. Send Authorization: Bearer with a key, Ndstill-Version: 2026-11-01, and an Idempotency-Key on every POST. Conventions, scopes and errors are in the API overview and Errors and decline reasons. Examples come from the mock backend; the shapes are the TypeScript types in packages/api.
Create a replay upload#
/v2/replay-uploads- filenamestringrequired
- csvstringrequired
- idId
- object"replay_upload"
- org_idId
- created_atTimestamp
- updated_atTimestampoptional
- test_modebooleanoptional
True for test-mode objects (simulations, sandbox).
- filenamestring
- rowsnumber
- errorsobject[]
Rows that couldn't be read, with the line number and why (first 20).
2 fields
- linenumber
- messagestring
- columnsstring[]
- fromTimestamp | null
- toTimestamp | null
- totalMoney
An amount: integer minor units + asset.
Money: 2 fields
- amountnumber
- assetAssetCode
"USD""USDC""EUR""GBP"
- matched_paymentsnumber
Rows that match a stored payment (they open the payment drawer).
- 400invalid_request
A field is missing or invalid; fields names each one.
- 401authentication
The key or token is missing, expired or revoked.
- 403permission
The key's scopes or the person's role don't allow this.
- 409conflict
The object changed or already exists, or the Idempotency-Key was reused with a different body.
- 429rate_limited
Slow down; retry after the Retry-After header.
curl -X POST "https://api.ndstill.com/v2/replay-uploads" \
-H "Authorization: Bearer $NDSTILL_API_KEY" \
-H "Ndstill-Version: 2026-11-01" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"filename": "example",
"csv": "example"
}'{
"object": "error",
"type": "invalid_request",
"code": "invalid_request",
"message": "The header is missing date, agent, counterparty, amount, outcome.",
"request_id": "req_25906ef9e81d9d0d7832",
"fields": {
"file": "Columns needed: date, agent, counterparty, amount, outcome (asset, rail and intent_id are optional)."
}
}The mock answered this sample with an error; its message says why. Adjust the request in Try it below.
Runs against the in-browser mock with a test key. Nothing leaves your browser.
List replay uploads#
/v2/replay-uploads- cursorstring
- limitnumber
1–200, default 50.
- qstring
Free-text search over names, ids and descriptors.
- sortstring
Sort field, prefix "-" for descending ("-created_at" is the default).
- created_gteTimestamp
created_at >= (ISO).
- created_lteTimestamp
created_at <= (ISO).
Returns a list envelope: object "list", data[], has_more, next_cursor (pass it back as cursor) and total when cheap to count. Items:
The same ReplayUpload object as Create a replay upload.
- 400invalid_request
A query parameter is invalid.
- 401authentication
The key or token is missing, expired or revoked.
- 403permission
The key's scopes or the person's role don't allow this.
- 429rate_limited
Slow down; retry after the Retry-After header.
curl -X GET "https://api.ndstill.com/v2/replay-uploads?limit=2" \
-H "Authorization: Bearer $NDSTILL_API_KEY" \
-H "Ndstill-Version: 2026-11-01"{
"object": "list",
"data": [],
"has_more": false,
"next_cursor": null,
"total": 0
}Runs against the in-browser mock with a test key. Nothing leaves your browser.
Retrieve a replay upload#
/v2/replay-uploads/{id}- idIdrequired
A prefixed ID from this org.
The same ReplayUpload object as Create a replay upload.
- 401authentication
The key or token is missing, expired or revoked.
- 403permission
The key's scopes or the person's role don't allow this.
- 404not_found
No object with that id in this org.
- 429rate_limited
Slow down; retry after the Retry-After header.
curl -X GET "https://api.ndstill.com/v2/replay-uploads/{id}" \
-H "Authorization: Bearer $NDSTILL_API_KEY" \
-H "Ndstill-Version: 2026-11-01"Runs against the in-browser mock with a test key. Nothing leaves your browser.
Replay an upload against a policy#
/v2/replay-uploads/{id}/replay- idIdrequired
A prefixed ID from this org.
- policy_idIdrequired
- policy_version_idIdrequired
- idId
- object"replay"
- policy_idId
- policy_version_idId
- fromTimestamp
- toTimestamp
- decisions_replayednumber
- changednumber
- totalsobject
5 fields
- newly_heldnumber
- newly_declinednumber
- newly_allowednumber
- amount_blockedMoney
An amount: integer minor units + asset.
Money: 2 fields
- amountnumber
- assetAssetCode
"USD""USDC""EUR""GBP"
- amount_newly_allowedMoney
An amount: integer minor units + asset.
Money: 2 fields
- amountnumber
- assetAssetCode
"USD""USDC""EUR""GBP"
- samplesobject[]
7 fields
- intent_idId
- agentRef
Small reference used for denormalized names in lists (no N+1 lookups in tables).
Ref: 2 fields
- idId
- namestring
- counterpartystring
- amountMoney
An amount: integer minor units + asset.
Money: 2 fields
- amountnumber
- assetAssetCode
"USD""USDC""EUR""GBP"
- beforeDecisionOutcome
"approve""hold""decline" - afterDecisionOutcome
"approve""hold""decline" - reasonstring
- created_atTimestamp
- upload_idId | nulloptional
Set when the replay ran over an uploaded CSV instead of stored decisions.
- 400invalid_request
A field is missing or invalid; fields names each one.
- 401authentication
The key or token is missing, expired or revoked.
- 403permission
The key's scopes or the person's role don't allow this.
- 404not_found
No object with that id in this org.
- 409conflict
The object changed or already exists, or the Idempotency-Key was reused with a different body.
- 429rate_limited
Slow down; retry after the Retry-After header.
curl -X POST "https://api.ndstill.com/v2/replay-uploads/{id}/replay" \
-H "Authorization: Bearer $NDSTILL_API_KEY" \
-H "Ndstill-Version: 2026-11-01" \
-H "Idempotency-Key: $(uuidgen)"Runs against the in-browser mock with a test key. Nothing leaves your browser.