# Get a policy rule

Get the specified policy rule for the specified wallet

Endpoint: GET /v2/vaults/{vaultId}/wallets/{walletId}/policy-rules/{id}
Version: 2.0
Security: TokenAuth

## Security:

  - `TokenAuth` (unknown)
    apiKey in header Authorization

## Path parameters:

  - `vaultId` (string, required)
    The vault ID

  - `walletId` (string, required)
    The wallet ID

  - `id` (string, required)
    The policy rule ID

## Response 200 fields (application/json):

  - `id` (string)
    The policy rule ID
    Example: ce4918bf-a199-4ce2-85a3-d0d296855384

  - `vaultId` (string, required)
    The vault ID
    Example: ce4918bf-a199-4ce2-85a3-d0d296855384

  - `walletId` (string, required)
    The wallet ID the rule applies to
    Example: ce4918bf-a199-4ce2-85a3-d0d296855384

  - `createdBy` (string)
    The original creator ID. Null or absent when unknown for a projected legacy approval default; required for ordinary rules.
    Example: ce4918bf-a199-4ce2-85a3-d0d296855384

  - `trigger` (string, required)
    The transaction event the rule applies to. Approval defaults use OUTBOUND_INITIATED.
    Enum: "OUTBOUND_INITIATED", "INBOUND_DETECTED"

  - `matchers` (array)

  - `matchers.type` (string, required)
    Type of the matcher. ALL_COUNTERPARTIES accepts no `value` or `values` and matches only destinations resolved to a counterparty; omitting destination matchers leaves the destination unconstrained.
    Enum: "USER", "API_CREDENTIAL", "COUNTERPARTY", "TRANSACTION_TYPE", "SIGN_FOR", "COUNTERPARTY_ID", "ADDRESS_ID", "WALLET_ID", "CHAIN_ID", "ALL_COUNTERPARTIES"

  - `matchers.value` (string)
    Comma seperated list of matcher values.

  - `matchers.values` (array)
    Matcher values.

  - `assetId` (string)
    The asset ID the rule applies to. Unset means any asset (wildcard), which is legal only without an amount condition.
    Example: 5:0xbehbehfb:USDC

  - `status` (string)
    The policy rule status
    Enum: "RULE_CREATED", "RULE_ENABLED", "RULE_REJECTED", "RULE_DELETED", "RULE_ERROR", "RULE_CREATION_APPROVAL_PENDING", "RULE_CREATION_APPROVAL_COMPLETE", "RULE_DELETION_APPROVAL_PENDING", "RULE_DELETION_APPROVAL_COMPLETE"

  - `active` (boolean)
    Whether the rule is active
    Example: true

  - `createdAt` (string)
    The original creation time. Null or absent when unknown for a projected legacy approval default; required for ordinary rules.
    Example: 2022-03-29T10:22:22.420Z

  - `updatedAt` (string)
    The date and time the policy rule was updated
    Example: 2022-03-29T10:22:22.420Z

  - `definition` (object)

  - `definition.kind` (string, required)
    Enum: "LIMIT"

  - `definition.limit` (object, required)

  - `definition.limit.amount` (object, required)

  - `definition.limit.amount.threshold` (string, required)
    The amount threshold as a decimal string
    Example: 200.00

  - `definition.limit.amount.operator` (string, required)
    The comparison operator applied to the threshold
    Enum: "GT", "GTE"

  - `definition.limit.amount.aggregation` (string, required)
    The aggregation basis the threshold is evaluated over
    Enum: "SINGLE_TX", "ROLLING", "TOTAL"

  - `definition.limit.amount.duration` (string)
    The rolling window duration. Set only when aggregation is ROLLING.
    Example: 86400s

  - `definition.kind` (string, required)
    Enum: "TRAVEL_RULE"

  - `definition.travelRule` (object, required)

  - `definition.travelRule.travelRuleReleaseLevel` (string)
    Outbound TRAVEL_RULE rules only. Exchange milestone that releases the withdrawal: NEW (message exists at the provider), SENT (dispatched to the beneficiary VASP), ACK (beneficiary confirmed the address), or ACCEPTED (beneficiary accepted).
    Enum: "TRAVEL_RULE_RELEASE_LEVEL_NEW", "TRAVEL_RULE_RELEASE_LEVEL_SENT", "TRAVEL_RULE_RELEASE_LEVEL_ACK", "TRAVEL_RULE_RELEASE_LEVEL_ACCEPTED"

  - `definition.travelRule.amount` (object)
    Optional single-transaction amount threshold. Omit it to require Travel Rule information for every matching transfer.

  - `definition.travelRule.amount.threshold` (string, required)
    The amount threshold as a decimal string
    Example: 200.00

  - `definition.travelRule.amount.operator` (string, required)
    The comparison operator applied to the threshold
    Enum: "GT", "GTE"

  - `definition.travelRule.amount.aggregation` (string, required)
    The aggregation basis the threshold is evaluated over
    Enum: "SINGLE_TX", "ROLLING", "TOTAL"

  - `definition.travelRule.amount.duration` (string)
    The rolling window duration. Set only when aggregation is ROLLING.
    Example: 86400s

  - `definition.kind` (string, required)
    Enum: "APPROVAL"

  - `definition.approval` (object, required)

  - `definition.approval.amount` (object)
    Required for an ordinary step-up rule; absent for a wallet default.

  - `definition.approval.amount.threshold` (string, required)
    The amount threshold as a decimal string
    Example: 200.00

  - `definition.approval.amount.operator` (string, required)
    The comparison operator applied to the threshold
    Enum: "GT", "GTE"

  - `definition.approval.amount.aggregation` (string, required)
    The aggregation basis the threshold is evaluated over
    Enum: "SINGLE_TX", "ROLLING", "TOTAL"

  - `definition.approval.amount.duration` (string)
    The rolling window duration. Set only when aggregation is ROLLING.
    Example: 86400s

  - `definition.approval.users` (object)
    Required for ordinary step-up rules and REQUIRE defaults; absent for NONE defaults.

  - `definition.approval.users.userIds` (array, required)
    The approver user IDs
    Example: ["ce4918bf-a199-4ce2-85a3-d0d296855384"]

  - `definition.approval.requiredApprovals` (integer)
    The number of distinct user approvals required. Positive for ordinary step-up rules and REQUIRE defaults; omitted or zero for NONE defaults.
    Example: 2

  - `definition.approval.timeoutDuration` (string)
    Approval timeout duration. Defaults to 1 hour (3600s) if not specified. Minimum 5 minutes, maximum 24 hours.
    Example: 3600s

  - `definition.approval.walletDefaultMode` (string)
    Present only for an asset-independent wallet transaction-approval default: REQUIRE explicit users/quorum, or NONE to suppress inherited approvals. Omission retains ordinary step-up semantics. Delete the resource to inherit.
    Enum: "REQUIRE", "NONE"

  - `scope` (string)
    The owner of this resource: WALLET for ordinary rules and wallet defaults, ORGANIZATION for a read-only organization default projected into this wallet.
    Enum: "WALLET", "ORGANIZATION"

## Response 400:

  - `400` (unknown)
    Returned when the request is malformed or invalid.

## Response 400 fields (application/json):

  - `code` (integer)

  - `message` (string)

  - `details` (array)

  - `details.@type` (string)

## Response 401:

  - `401` (unknown)
    Returned when the request was unauthorized.

## Response 401 fields (application/json):

  - `code` (integer)

  - `message` (string)

  - `details` (array)

  - `details.@type` (string)

## Response 403:

  - `403` (unknown)
    Returned when the request was forbidden.

## Response 403 fields (application/json):

  - `code` (integer)

  - `message` (string)

  - `details` (array)

  - `details.@type` (string)

## Response 404:

  - `404` (unknown)
    Returned when the resource does not exist.

## Response 404 fields (application/json):

  - `code` (integer)

  - `message` (string)

  - `details` (array)

  - `details.@type` (string)

## Response default:

  - `default` (unknown)
    An unexpected error response.

## Response default fields (application/json):

  - `code` (integer)

  - `message` (string)

  - `details` (array)

  - `details.@type` (string)

## Response 400 examples:

  - `response` (unknown)

## Response 401 examples:

  - `response` (unknown)

## Response 403 examples:

  - `response` (unknown)

## Response 404 examples:

  - `response` (unknown)

