# Retrieve risk score blocklist rules

`GET /risk-score-rules/blocklists`

> This is a subset of the full specification, limited to the `GET /risk-score-rules/blocklists` operation.
>
> You can find the full specification here: /_bundle/docs/dev-docs/api/index.yaml

```yaml
openapi: 3.1.1
info:
  version: latest
  title: Core APIs
  contact:
    name: Rebilly API Support
    url: https://www.rebilly.com/contact/
    email: integrations@rebilly.com
  license:
    name: Rebilly
    url: https://www.rebilly.com/api-license/
  termsOfService: https://www.rebilly.com/terms-of-use/
  x-logo:
    url: https://rebilly-core.redoc.ly/rb_apiLogo.svg
    backgroundColor: '#0044d4'
  description: This is a subset of the full specification, limited to the `GET /risk-score-rules/blocklists` operation.
  x-metadata:
    description: The most common APIs used to automate common workflows.
    redocly_category: API Reference
servers:
  - url: https://api-sandbox.rebilly.com/organizations/{organizationId}
    description: Sandbox server
    variables:
      organizationId:
        default: '{organizationId}'
        description: |-
          Unique organization identifier.
          An organization is an entity that represents a company.
          For more information, see [Obtain an organization ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
  - url: https://api.rebilly.com/organizations/{organizationId}
    description: Live server
    variables:
      organizationId:
        default: '{organizationId}'
        description: |-
          Unique organization identifier.
          An organization is an entity that represents a company.
          For more information, see [Obtain an organization ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
security:
  - SecretApiKey: []
  - JWT: []
tags:
  - name: Risk score
    description: Use risk score operations to configure blocklists based on transaction risk factors.
x-tagGroups:
  - name: Risk
    tags:
      - Risk score
paths:
  /risk-score-rules/blocklists:
    get:
      x-products:
        - Core
      tags:
        - Risk score
      summary: Retrieve risk score blocklist rules
      operationId: GetRiskScoreBlocklistRules
      x-sdk-operation-name: getAllBlocklistRules
      security:
        - SecretApiKey: []
        - JWT: []
      description: Retrieves risk score blocklist rules.
      responses:
        '200':
          description: Risk score blocklist rules retrieved.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RiskScoreBlocklist'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
components:
  securitySchemes:
    JWT:
      description: |-
        JWT is a short lifetime token that can be assigned a specific expiration time.

        Usage format: `Bearer <JWT>`.
      type: http
      scheme: bearer
      bearerFormat: JWT
    SecretApiKey:
      description: |-
        Never share your secret keys.
        Keep them guarded and secure.

        Use your secret API key only to make requests from the server side.
        To authenticate, provide your secret key in the request header.
      name: REB-APIKEY
      type: apiKey
      in: header
  schemas:
    BaseProblem:
      type: object
      additionalProperties: true
      minProperties: 1
      description: RFC-7807 [problem details](https://tools.ietf.org/html/rfc7807) JSON object.
      properties:
        type:
          type: string
          description: |-
            Problem type in the form of a [URI](https://tools.ietf.org/html/rfc3986) reference.
            It should provide human-readable documentation for the problem type.
            When this member is not present, its value is assumed to be "about:blank".
          format: uri
        title:
          type: string
          description: |-
            Short, human-readable summary of the problem type.
            Other than for the purposes of localization, this should not change from occurrence to occurrence of the problem.
        detail:
          type: string
          description: Human-readable explanation that is specific to this occurrence of the problem.
        instance:
          type: string
          description: |-
            URI reference that identifies the specific occurrence of the problem.
            It may or may not yield further information if dereferenced.
    Unauthorized:
      allOf:
        - title: Unauthorized
        - type: object
          properties:
            status:
              type: integer
              description: HTTP status code.
              minimum: 401
              maximum: 401
        - $ref: '#/components/schemas/BaseProblem'
    OrganizationId:
      type: string
      description: |-
        Unique organization identifier.
        An organization is an entity that represents a company.
        For more information, see [Obtain an organization ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
      maxLength: 50
      example: org_0YVDM8RC7GDADADSBSMW124JA8
    Forbidden:
      allOf:
        - title: Forbidden
        - type: object
          properties:
            status:
              type: integer
              description: HTTP status code.
              minimum: 403
              maximum: 403
            error:
              type: string
              description: |-
                Message that describes why the request is forbidden.
                Most responses use a descriptive message, such as `Not allowed to change security settings`.
                If the organization requires multi-factor authentication (MFA) and MFA verification has not been completed for the session, this value is `mfa_required`.
                If MFA verification has not been completed for the session and the operation requires a confirmed session, this value is `mfa_required_for_caller`.
                This includes turning on `requireMfa` and resetting MFA for a user.
                If the organization restricts access to a list of IP addresses and the request comes from an IP address that is not in the list, this value is `ip_not_allowed`.
            organizationId:
              description: |-
                ID of the organization that requires MFA or does not allow the IP address of the request.
                This property is present only if `error` is `mfa_required` or `ip_not_allowed`.
                The organization is the organization of the request or another organization that the request acts on.
              $ref: '#/components/schemas/OrganizationId'
        - $ref: '#/components/schemas/BaseProblem'
    RiskScoreBlocklistPermanentRule:
      type: object
      description: Rule that permanently blocklists items when TTL is equal to `0`.
      required:
        - riskScoreThreshold
      properties:
        riskScoreThreshold:
          type: integer
          description: Pass and fail threshold for the blocklist.
          minimum: 1
    RiskScoreBlocklistPermanentRules:
      type:
        - object
        - 'null'
      description: Items permanently blocklisted when TTL is equal to `0`.
      properties:
        address:
          description: House number and ZIP code of the customer's address.
          $ref: '#/components/schemas/RiskScoreBlocklistPermanentRule'
        bankAccount:
          description: Bank account for the charge.
          $ref: '#/components/schemas/RiskScoreBlocklistPermanentRule'
        bin:
          description: Bank Identification Number (BIN) of the payment card for the charge.
          $ref: '#/components/schemas/RiskScoreBlocklistPermanentRule'
        country:
          description: Country where the customer is making the purchase, and country of the payment card billing address.
          $ref: '#/components/schemas/RiskScoreBlocklistPermanentRule'
        customerId:
          description: Rebilly `customerId` of the customer making the purchase.
          $ref: '#/components/schemas/RiskScoreBlocklistPermanentRule'
        email:
          description: Email address of the customer making the purchase.
          $ref: '#/components/schemas/RiskScoreBlocklistPermanentRule'
        emailDomain:
          description: Email address domain of the customer making the purchase.
          $ref: '#/components/schemas/RiskScoreBlocklistPermanentRule'
        fingerprint:
          description: |-
            Fingerprint of the user's device.
            A device fingerprint is a unique token that is used to identify the user.
            The device fingerprint is generated based on device attributes,
            such as: hardware, software, IP address, language, browser, and more.
          $ref: '#/components/schemas/RiskScoreBlocklistPermanentRule'
        ipAddress:
          description: IP address of the customer making the purchase.
          $ref: '#/components/schemas/RiskScoreBlocklistPermanentRule'
        paymentCard:
          description: Payment card number being charged.
          $ref: '#/components/schemas/RiskScoreBlocklistPermanentRule'
    RiskScoreBlocklistTemporaryRule:
      type: object
      description: Items temporarily blocklisted when TTL is greater than `0`.
      required:
        - riskScoreThreshold
        - ttl
      properties:
        riskScoreThreshold:
          type: integer
          description: Pass and fail threshold for the blocklist.
          minimum: 1
        ttl:
          type: integer
          description: |-
            Amount of seconds a blocklist exists before it expires.
            This value must be greater than 0.
          minimum: 1
    RiskScoreBlocklistTemporaryRules:
      type:
        - object
        - 'null'
      description: Items temporarily blocklisted when TTL is greater than `0`.
      properties:
        address:
          description: House number and ZIP code of the customer's address.
          $ref: '#/components/schemas/RiskScoreBlocklistTemporaryRule'
        bankAccount:
          description: Bank account for the charge.
          $ref: '#/components/schemas/RiskScoreBlocklistTemporaryRule'
        bin:
          description: Bank Identification Number (BIN) of the payment card for the charge.
          $ref: '#/components/schemas/RiskScoreBlocklistTemporaryRule'
        country:
          description: Country where the customer is making the purchase, and country of the payment card billing address.
          $ref: '#/components/schemas/RiskScoreBlocklistTemporaryRule'
        customerId:
          description: Rebilly `customerId` of the customer making the purchase.
          $ref: '#/components/schemas/RiskScoreBlocklistTemporaryRule'
        email:
          description: Email address of the customer making the purchase.
          $ref: '#/components/schemas/RiskScoreBlocklistTemporaryRule'
        emailDomain:
          description: Email address domain of the customer making the purchase.
          $ref: '#/components/schemas/RiskScoreBlocklistTemporaryRule'
        fingerprint:
          description: |-
            Fingerprint of the user's device.
            A device fingerprint is a unique token that is used to identify the user.
            The device fingerprint is generated based on device attributes,
            such as: hardware, software, IP address, language, browser, and more.
          $ref: '#/components/schemas/RiskScoreBlocklistTemporaryRule'
        ipAddress:
          description: IP address of the customer making the purchase.
          $ref: '#/components/schemas/RiskScoreBlocklistTemporaryRule'
        paymentCard:
          description: Payment card number for the charge.
          $ref: '#/components/schemas/RiskScoreBlocklistTemporaryRule'
    RiskScoreBlocklist:
      type: object
      description: Risk score blocklist configuration.
      properties:
        permanentlyBlockList:
          description: Items permanently blocklisted when TTL is equal to `0`.
          $ref: '#/components/schemas/RiskScoreBlocklistPermanentRules'
        temporaryBlockList:
          description: Items temporarily blocklisted when TTL is greater than `0`.
          $ref: '#/components/schemas/RiskScoreBlocklistTemporaryRules'
  responses:
    Unauthorized:
      description: |-
        Unauthorized access.
        Invalid credentials used.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Unauthorized'
    Forbidden:
      description: |-
        Access forbidden.
        If the organization requires multi-factor authentication (MFA) and the session has not passed MFA, `error` is `mfa_required`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Forbidden'
```
