---
title: "List Rules"
method: POST
path: "/pws/pws_list_rules/"
tags: ["Rules"]
---

# List Rules

`POST /pws/pws_list_rules/`

This web service allows to list different rules at different levels i.e card, account, group and rule id.

## Request body

- ListRulesModel — This web service allows to list different rule
  - `api_call_unique_identifier` string, required — Unique number that must be passed at each API request. Identifier to make each API request unique
  - `client_id` integer, required — Unique identifier for the client which Paymentology will provide at outset
  - `mode` integer, required — <p>Getting list based on mode value. mode can be</p><ul><li class="docBullet">1=token (token mandatory in this mode)</li><li class="docBullet">2=group_id (group_id mandatory in this mode)</li><li class="docBullet">3=ac_id (ac_id mandatory in this mode)</li><li class="docBullet">4=rule_id (rule_id mandatory in this mode)</li><li class="docBullet">5=token_group_id (token_group_id mandatory in this mode)</li><li class="docBullet">6=product_id (product_id mandatory in this mode)</li></ul>
  - `user_id` string — User Id of the Customer who triggered the API request.
  - `remarks` string — Remarks for API request
  - `rule_id` integer — Rule Id. If you pass rule id , single rule will be retrieved. if mode==4, rule_id is mandatory
  - `token` integer — public token for card. getting rule linked with specific token. if mode==1, token is mandatory
  - `group_id` integer — group Id. rules under given group id. if mode==2 ,group_id is mandatory
  - `ac_id` integer — account Id. Get All rules for Cards under linked to this Parent account. if mode==3, ac_id is mandatory
  - `token_group_id` integer — token group Id. Rules under given token group id. if mode==5, token_group_id is mandatory
  - `product_id` integer — product Id. Rules under given product id. if mode==6, product_id is mandatory

## Response `200`

Successful Response

- ListRulesResponseModel
  - `header` ResponseHeader
    - `error_id` integer — Error Id
    - `error_desc` string — Error Message
  - `body` ListRulesResponseModelBody[]
    - `scope` string, required — Rule applicable scope. Values of scope can be : <ul><li class="docBullet">C=Direct card rules</li><li class="docBullet">G=Group rules</li></ul>
    - `rule_id` integer — Rule id
    - `rule_desc` string — Rule description
    - `rule_name` string — Rule name
    - `max_value` number — Max limiting amount
    - `ac_id` integer — Account id
    - `token` integer — Public token
    - `rule_status` string — Rule status. Rule is enabled or disabled for token
    - `value` number — Limit value for daily/weekly/monthly/yearly cash limit/txn count.
    - `remaining_value` number — Remaining value for daily/weekly/monthly/yearly cash limit/txn count. Null value means it does not apply to the rule.
    - `remaining_count` number — Remaining count for number of transaction allowed for daily /weekly /monthly / yearly count. Null value means it does not apply to the rule.
    - `txn_limit_amount` number — Per transaction limit amount
    - `max_count_value` integer — Number of transactions counts for any limit
    - `rfc_params` RfcRuleParamResponse[] — List of parameters
      - `description` string — Description of parameter
      - `min` number — Min value
      - `max` number — Max value
      - `param_number` integer — Parameter number in rule function call
      - `default_value` number — Default value of parameter
    - `h_diff` integer — Time difference in seconds

## Other responses

- `404` — Webservices does not exist
- `500` — Internal Server error

---

[API](https://skmtc.net/paymentology/apis/payapi-docs.md) · [All operations](https://skmtc.net/paymentology/apis/payapi-docs/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/paymentology/payapi-docs/revisions/a675891b0365/schema)
