---
title: "Get rule model"
method: GET
path: "/v1/models/{modelId}"
tags: ["Model"]
---

# Get rule model

`GET /v1/models/{modelId}`

## Request

- Base URL: `https://sandbox.pismolabs.io/processing-code`
- URL: `https://sandbox.pismolabs.io/processing-code/v1/models/{modelId}`
- Auth: none declared

Get the rule model identified in the path.

## Path parameters

- `modelId` string, required

## Response `200`

OK

- ModelPayload
  - `rules` Rule[], required: Processing code rules configuration array.
    - `processing_code` string, required: Processing code to use when the rule condition is met and it is a domestic transaction.
    - `order` integer, required: Rule evaluation order, `1` being the highest.
    - `conditions` Condition[], required: Conditions that need to be `true` to assign the processing code.
      - `type` 'INSTALLMENT_NUMBER' | 'PROCESSING_CODE' | 'ACCOUNT_TYPE' | 'ORIGIN' | 'DCC' | 'DOMESTIC' | 'MERCHANT_NAME_LIST' | 'INSTALLMENT_PLAN' | 'AMOUNT' | 'MERCHANT_CATEGORY_CODE' | 'REVERSAL_INDICATOR' | 'AUTHORIZATION_FLOW' | 'ORIGINAL_PROCESSING_CODE' | 'MTI', required: List types and data formats allowed:<br /> - `INSTALLMENT_NUMBER` - Integer values<br /> - `PROCESSING_CODE` - Alphanumeric strings<br /> - `ACCOUNT_TYPE` - Alphanumeric strings<br /> - `ORIGIN`- Alphanumeric strings<br /> - `DCC`- Boolean values<br /> - `DOMESTIC`- Boolean values<br /> - `MERCHANT_NAME_LIST` - Alphanumeric strings<br /> - `INSTALLMENT_PLAN` - Alphanumeric strings<br /> - `AMOUNT` - Numbers with or without decimal places<br /> - `MERCHANT_CATEGORY_CODE` - Alphanumeric strings<br /> - `REVERSAL_INDICATOR` - Boolean values<br /> - `AUTHORIZATION_FLOW` - Either `PAYMENTS` or `NETWORK`<br /> - `ORIGINAL_PROCESSING_CODE`- Original processing code or persisted authorization processing code<br /> - `MTI` - Message Type Indicator (MTI) - a four-digit numeric field - ISO 8583 standard<br />
      - `operator` 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'contains' | 'starts_with' | 'ends_with', required: Operator that will be used on this rule evaluation - `eq`: Equals operator, allowed with rules that evaluate data containing strings, numbers, and booleans. - `neq`: Not equals operator, allowed with rules that evaluate data containing strings, numbers, and booleans. - `gt`: Greater than operator, allowed with rules that evaluate data containing numbers. - `gte`: Greater than or equal operator, allowed with rules that evaluate data containing numbers. - `lt`: Less than operator, allowed with rules that evaluate data containing numbers. - `lte`: Less than or equal operator, allowed with rules that evaluate data containing numbers. - `in`: In operator, allowed with rules that use model list as data. Compares if the data is in the configured list. - `contains`: Contains operator, allowed with rules that use model list as data. Compares if the data is part of any string in the configured list. - `starts_with`: Starts with operator, allowed with rules that use model list as data. Verifies whether any string in the list starts with the data value. - `ends_with`: Ends with operator, allowed with rules that use model list as data. Verifies whether any string in the list ends with the data value.
      - `data` string, required: Data used to evaluate this rule against the operator and the information received in the request. This field must be in the format as indicated in `type` and `operator`. **Note:** This field's value can be a model list ID returned from [Create model list](ref:post-org-model-list). A model list contains a list of values for evaluation.
    - `name` string: Rule name
    - `international_processing_code` string: Processing code to use when the rule condition is met and it is an international transaction. If this is an international transaction and this field is not passed, the `processing_code` field is used instead.
  - `name` string: Model name

## Other responses

- `400`: Bad request
- `404`: Not found
- `500`: Internal server error

---

[API](https://skmtc.dev/pismo/apis/core-platform-rule-models.md) - [All operations](https://skmtc.dev/pismo/apis/core-platform-rule-models/llms.txt) - [OpenAPI document](https://skmtc.dev/pismo/apis/core-platform-rule-models/revisions/f7b6f9e7d9d9?raw)
