# List card rules Retrieve card rules for a given primary card. # OpenAPI definition ```json { "openapi": "3.0.0", "info": { "title": "Card issuing - Visa Flexible Credentials [beta]", "description": "Visa Flexible Credentials endpoints.", "version": "1.0.0", "contact": { "email": "support@pismo.com.br", "name": "API Support", "url": "https://developers.pismo.io/support" }, "license": { "name": "Copyright Pismo", "url": "https://developers.pismo.io/licenses" }, "termsOfService": "https://developers.pismo.io/terms" }, "servers": [ { "url": "https://sandbox.pismolabs.io", "description": "Sandbox API server for testing" } ], "tags": [ { "name": "Rules", "description": "Creation and management of rules to be applied during transactions using VFC credentials." } ], "components": { "parameters": { "accessTokenHeader": { "name": "access_token", "in": "header", "required": true, "schema": { "type": "string" }, "description": "Access token. Tokens can expire quickly, which can result in a **401 Unauthorized** error." }, "CardIDpath": { "name": "cardId", "in": "path", "schema": { "type": "string" }, "description": "Card ID", "required": true } }, "schemas": { "CardID3": { "type": "integer", "format": "int64", "description": "Primary card ID", "example": 6743052 }, "CardID5": { "type": "integer", "format": "int64", "description": "ID of card the rule applies to", "example": 6743052 }, "CardholderBillAmount": { "type": "object", "required": [ "maxAmount" ], "properties": { "maxAmount": { "$ref": "#/components/schemas/MaxTransAmountAllowed" }, "minAmount": { "$ref": "#/components/schemas/MinTransAmountAllowed" } } }, "ControlType2": { "type": "string", "enum": [ "TCT_GLOBAL", "TCT_ATM_WITHDRAW", "TCT_AUTO_PAY", "TCT_BRICK_AND_MORTAR", "TCT_CROSS_BORDER", "TCT_E_COMMERCE", "TCT_CONTACTLESS", "MCT_ADULT_ENTERTAINMENT", "MCT_AIRFARE", "MCT_ALCOHOL", "MCT_APPAREL_AND_ACCESSORIES", "MCT_AUTOMOTIVE", "MCT_CAR_RENTAL", "MCT_ELECTRONICS", "MCT_SPORT_AND_RECREATION", "MCT_GAMBLING", "MCT_GAS_AND_PETROLEUM", "MCT_GROCERY", "MCT_HOTEL_AND_LODGING", "MCT_HOUSEHOLD", "MCT_PERSONAL_CARE", "MCT_SMOKE_AND_TOBACCO", "MCT_DINING" ], "description": "Transaction control type: \n* `TCT_GLOBAL`— Transaction control type (TCT) global\n* `TCT_ATM_WITHDRAW`— TCT ATM withdrawal\n* `TCT_AUTO_PAY`— TCT autopay\n* `TCT_BRICK_AND_MORTAR`— TCT brick and mortar\n* `TCT_CROSS_BORDER`— TCT cross border\n* `TCT_E_COMMERCE`— TCT e-commerce\n* `TCT_CONTACTLESS`— TCT contactless card\n* `MCT_ADULT_ENTERTAINMENT`— Merchant category type (MCT) adult entertainment\n* `MCT_AIRFARE`— MCT airfare\n* `MCT_ALCOHOL`— MCT alcohol\n* `MCT_APPAREL_AND_ACCESSORIES`— MCT apparel and accessories\n* `MCT_AUTOMOTIVE`— MCT automotive\n* `MCT_CAR_RENTAL`— MCT car rental\n* `MCT_ELECTRONICS`— MCT electronics\n* `MCT_SPORT_AND_RECREATION`— MCT sport and recreation\n* `MCT_GAMBLING`— MCT gambling\n* `MCT_GAS_AND_PETROLEUM`— MCT gas and petroleum\n* `MCT_GROCERY`— MCT grocery\n* `MCT_HOTEL_AND_LODGING`— MCT hotel and lodging \n* `MCT_HOUSEHOLD`— MCT household\n* `MCT_PERSONAL_CARE`— MCT personal car\n* `MCT_SMOKE_AND_TOBACCO`— MCT smoke and tobacco \n* `MCT_DINING`mdash; MCT dining\n", "example": "TCT_AUTO_PAY" }, "EndTimeRuleValidity": { "type": "string", "format": "date-time", "description": "End time for rule validity. RFC 3339 format.", "example": "2025-05-13T23:30:52.123Z" }, "ErrorObject": { "type": "object", "description": "Standard error object", "properties": { "error_code": { "type": "string", "description": "Error code" }, "message": { "type": "string", "description": "Error message" } } }, "MaxTransAmountAllowed": { "type": "number", "format": "float", "description": "Maximum transaction amount allowed", "example": 20.5 }, "MinTransAmountAllowed": { "type": "number", "format": "float", "description": "Minimum transaction amount allowed", "example": 10.5 }, "Rule": { "type": "object", "required": [ "cardId", "rulePriority", "scope", "definedBy", "ruleId" ], "properties": { "cardId": { "$ref": "#/components/schemas/CardID5" }, "rulePriority": { "$ref": "#/components/schemas/RulePriority" }, "scope": { "$ref": "#/components/schemas/RuleScope2" }, "definedBy": { "$ref": "#/components/schemas/RuleDefinedBy" }, "ruleId": { "$ref": "#/components/schemas/RuleID" } } }, "RuleDefinedBy": { "type": "string", "enum": [ "CARDHOLDER", "ISSUER" ], "description": "Entity that defined the rule", "example": "CARDHOLDER" }, "RuleID": { "type": "string", "description": "Rule ID", "example": "v-301-b0c3dfae-0dd7-40b6-9272-5fa466804a8a" }, "RulePriority": { "type": "integer", "description": "Rule priority, `1` being the highest.", "minimum": 1, "example": 1 }, "RuleScope2": { "type": "object", "required": [ "controlType", "cardHolderBillAmount", "timeRange" ], "properties": { "controlType": { "$ref": "#/components/schemas/ControlType2" }, "cardHolderBillAmount": { "$ref": "#/components/schemas/CardholderBillAmount" }, "timeRange": { "$ref": "#/components/schemas/RuleValidityTimeRange" } } }, "RulesResponse": { "type": "object", "required": [ "cardId", "rules" ], "properties": { "cardId": { "$ref": "#/components/schemas/CardID3" }, "rules": { "type": "array", "items": { "$ref": "#/components/schemas/Rule" } } } }, "RuleValidityTimeRange": { "type": "object", "required": [ "startTime", "endTime" ], "properties": { "startTime": { "$ref": "#/components/schemas/StartTimeRuleValidity" }, "endTime": { "$ref": "#/components/schemas/EndTimeRuleValidity" } } }, "StartTimeRuleValidity": { "type": "string", "format": "date-time", "description": "Start time for rule validity. RFC 3339 format.", "example": "2025-05-13T23:30:52.123Z" } }, "securitySchemes": { "BearerAuth": { "type": "http", "scheme": "bearer", "description": "Account token - token encoded with a Pismo account ID. Tokens can expire quickly, which can result in a \"**401 Unauthorized**\" error.", "bearerFormat": "JWT" } }, "responses": { "400BadRequest": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorObject" }, "example": { "error_code": "ERR9993", "message": "card not found" } } } }, "401Unauthorized": { "description": "Access token is missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorObject" }, "example": { "error_code": "ERR9786", "message": "Access token is missing or invalid" } } } }, "500InternalServerError": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorObject" }, "example": { "error_code": "ERR5446", "message": "Internal server error" } } } } } }, "security": [ { "BearerAuth": [] } ], "paths": { "/v1/vfc/rules/cards/{cardId}": { "get": { "summary": "List card rules", "description": "Retrieve card rules for a given primary card.\n", "operationId": "get-card-rules", "tags": [ "Rules" ], "parameters": [ { "$ref": "#/components/parameters/accessTokenHeader" }, { "$ref": "#/components/parameters/CardIDpath" } ], "responses": { "201": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RulesResponse" }, "example": { "cardId": 186283623, "rules": [ { "cardId": 186283615, "rulePriority": 2, "scope": { "controlType": "TCT_AUTO_PAY", "cardHolderBillAmount": { "minAmount": 0, "maxAmount": 201.5 }, "timeRange": { "startTime": "2025-05-13T23:30:52.123Z", "endTime": "2025-08-13T23:30:52.123Z" } }, "definedBy": "CARDHOLDER", "ruleId": "v-301-b0c3dfae-0dd7-40b6-9272-5fa466804a8a" } ] } } } }, "400": { "$ref": "#/components/responses/400BadRequest" }, "401": { "$ref": "#/components/responses/401Unauthorized" }, "500": { "$ref": "#/components/responses/500InternalServerError" } } } } } } ```