Skip to content

List decisions

GET
/v1/decisions
curl --request GET \
--url 'https://api-staging.asqary.com/v1/decisions?risk_level=high%2Ccritical&recommended_action=manual_review%2Cblock&limit=25' \
--header 'Authorization: Bearer <token>'

Newest first, keyset-paginated. Requires risk:read.

policy_id
string
/^pol_[0-9a-f]{32}$/
policy_version_id
string
/^plv_[0-9a-f]{32}$/
risk_level
string

Example

high,critical

Comma-separated risk levels.

recommended_action
string

Example

manual_review,block

Comma-separated actions.

rule_code
string

Only decisions where this rule contributed.

customer_hash

HMAC-SHA256 of the identifier under your identifier key, lowercase hex.

string
/^[0-9a-f]{64}$/
transaction_id
string
from
string format: date-time

Defaults to 30 days before to.

to
string format: date-time

Defaults to now.

limit
integer
default: 25 >= 1 <= 100
cursor
string

next_cursor from the previous page.

X-Request-Id
string
/^[A-Za-z0-9._:\-]{1,128}$/

Your own request ID (1–128 of letters, digits and . _ : -), echoed back and stored.

A page of decisions

Media typeapplication/json
object
decisions
required
Array<object>
object
decision_id
required
string
/^dec_[0-9a-f]{32}$/
transaction_id
required
string
customer_hash
required

HMAC-SHA256 of the identifier under your identifier key, lowercase hex.

string
/^[0-9a-f]{64}$/
score
required
integer
risk_level
required
string
Allowed values: low medium high critical
confidence
required
integer
recommended_action
required
string
Allowed values: approve step_up manual_review block
reason_codes
required
Array<string>
policy
required
object
id
required
string
/^pol_[0-9a-f]{32}$/
version
required
integer
version_id
required
string
/^plv_[0-9a-f]{32}$/
feedback_label
required
One of:
string
Allowed values: fraud legitimate suspected
environment
required
string
Allowed values: live test
created_at
required
string format: date-time
has_more
required
boolean
next_cursor
required
string | null

Example

{
"decisions": [
{
"risk_level": "low",
"recommended_action": "approve",
"feedback_label": "fraud",
"environment": "live"
}
]
}

Missing, invalid, expired or revoked API key.

Media typeapplication/json
object
error_code
required

Invalid_request, unauthorized, key_expired, key_revoked, forbidden, ip_not_allowed, quota_exceeded, not_found, method_not_allowed, conflict, policy_in_use, policy_active, policy_archived, idempotency_key_reused, validation_failed, rule_not_available, backtest_invalid_rows, backtest_too_large, rate_limited, internal_error

string
message
required
string
retryable
required
boolean
request_id
string
details
One of:
Array<object>
object
field
required
string
message
required
string
code
string

Example generated

{
"error_code": "example",
"message": "example",
"retryable": true,
"request_id": "example",
"details": {}
}

Missing scope or role, IP not allowed, or monthly quota exceeded (quota_exceeded).

Media typeapplication/json
object
error_code
required

Invalid_request, unauthorized, key_expired, key_revoked, forbidden, ip_not_allowed, quota_exceeded, not_found, method_not_allowed, conflict, policy_in_use, policy_active, policy_archived, idempotency_key_reused, validation_failed, rule_not_available, backtest_invalid_rows, backtest_too_large, rate_limited, internal_error

string
message
required
string
retryable
required
boolean
request_id
string
details
One of:
Array<object>
object
field
required
string
message
required
string
code
string

Example generated

{
"error_code": "example",
"message": "example",
"retryable": true,
"request_id": "example",
"details": {}
}

validation_failed (details: field errors), rule_not_available, or backtest_invalid_rows.

Media typeapplication/json
object
error_code
required

Invalid_request, unauthorized, key_expired, key_revoked, forbidden, ip_not_allowed, quota_exceeded, not_found, method_not_allowed, conflict, policy_in_use, policy_active, policy_archived, idempotency_key_reused, validation_failed, rule_not_available, backtest_invalid_rows, backtest_too_large, rate_limited, internal_error

string
message
required
string
retryable
required
boolean
request_id
string
details
One of:
Array<object>
object
field
required
string
message
required
string
code
string

Example generated

{
"error_code": "example",
"message": "example",
"retryable": true,
"request_id": "example",
"details": {}
}

Too many requests (rate_limited); retry after Retry-After seconds.

Media typeapplication/json
object
error_code
required

Invalid_request, unauthorized, key_expired, key_revoked, forbidden, ip_not_allowed, quota_exceeded, not_found, method_not_allowed, conflict, policy_in_use, policy_active, policy_archived, idempotency_key_reused, validation_failed, rule_not_available, backtest_invalid_rows, backtest_too_large, rate_limited, internal_error

string
message
required
string
retryable
required
boolean
request_id
string
details
One of:
Array<object>
object
field
required
string
message
required
string
code
string

Example generated

{
"error_code": "example",
"message": "example",
"retryable": true,
"request_id": "example",
"details": {}
}
Retry-After
integer

Seconds to wait before retrying.