{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/slash/main/json-schema/slash-card-schema.json", "title": "Card", "x-generated": "2026-10-12", "x-method": "derived", "x-generator": "derive-json-schema.py", "x-source": "openapi/slash-card-api-openapi.yml#/components/schemas/Card", "type": "object", "properties": { "id": { "type": "string" }, "accountId": { "type": "string", "description": "The account that this card is associated with" }, "virtualAccountId": { "type": "string", "description": "The virtual account that this card is associated with" }, "last4": { "type": "string", "description": "The last 4 digits of the card number" }, "name": { "type": "string", "description": "The name assigned to the card that appears on the user dashboard" }, "expiryMonth": { "type": "string", "description": "The month the card expires formatted as MM (01, 02, ..., 12)" }, "expiryYear": { "type": "string", "description": "The year the card expires formatted as YYYY (2024, 2025, ...)" }, "status": { "allOf": [ { "$ref": "#/$defs/CardStatus", "x-entrypoint": { "virtualPath": "schemas/CardStatus", "sourcePath": "schemas/CardStatus.yaml", "title": "CardStatus", "origin": "./src/publicApi" } }, { "description": "The status of the card" } ] }, "isPhysical": { "type": "boolean", "description": "When true, a physical card has been issued. Otherwise, this is a virtual card." }, "isSingleUse": { "type": "boolean", "description": "When true, the card will be automatically closed after a single authorization attempt. Note that the card will be closed even if the authorization declines or drops" }, "pan": { "type": "string", "description": "This field contains the full PAN which will only be sent on a request for a single card when you set the query param \"include_pan\" to \"true\"" }, "cvv": { "type": "string", "description": "This field will contain full CVV which will only be sent on a request for a single card when you set the query param \"include_pan\" to \"true\"" }, "cardGroupId": { "type": "string", "description": "The card group the card belongs to." }, "cardGroupName": { "type": "string", "description": "The name of the card group the card belongs to." }, "createdAt": { "type": "string", "format": "date-time" }, "spendingConstraint": { "$ref": "#/$defs/SpendingConstraint", "description": "The spending constraint applied to the card", "x-entrypoint": { "virtualPath": "schemas/SpendingConstraint", "sourcePath": "schemas/SpendingConstraint.yaml", "title": "SpendingConstraint", "origin": "./src/publicApi" } }, "userData": { "type": "object", "description": "Arbitrary information that can be attached to the card. See the [`PATCH /card/{cardId}`](api-reference/card-patch) endpoint for more details on how to add user data." }, "cardProductId": { "type": "string", "description": "The ID of the card product this card was created with." }, "modifiers": { "type": "array", "items": { "$ref": "#/$defs/CardModifier", "x-entrypoint": { "virtualPath": "schemas/CardModifier", "sourcePath": "schemas/CardModifier.yaml", "title": "CardModifier", "origin": "./src/publicApi" } }, "description": "The modifiers applied to this card. Modifiers control card behavior like restricting to recurring payments only." } }, "required": [ "id", "accountId", "last4", "name", "expiryMonth", "expiryYear", "status", "isPhysical" ], "x-entrypoint": { "virtualPath": "schemas/Card", "sourcePath": "schemas/Card.yaml", "title": "Card", "origin": "./src/publicApi" }, "$defs": { "CardModifier": { "oneOf": [ { "type": "object", "required": [ "name", "value" ], "properties": { "name": { "type": "string", "enum": [ "only_allow_recurring_payments" ] }, "value": { "description": "Whether to only allow recurring payments. The default value for newly created cards is false.", "type": "boolean" } } } ], "x-entrypoint": { "virtualPath": "schemas/CardModifier", "sourcePath": "schemas/CardModifier.yaml", "title": "CardModifier", "origin": "./src/publicApi" }, "title": "CardModifier" }, "CardStatus": { "type": "string", "enum": [ "active", "paused", "inactive", "closed" ], "x-entrypoint": { "virtualPath": "schemas/CardStatus", "sourcePath": "schemas/CardStatus.yaml", "title": "CardStatus", "origin": "./src/publicApi" }, "title": "CardStatus" }, "Money": { "type": "object", "description": "Represents a monetary value", "properties": { "amountCents": { "type": "integer", "description": "The amount in cents" } }, "required": [ "amountCents" ], "x-entrypoint": { "virtualPath": "schemas/Money", "sourcePath": "schemas/Money.yaml", "title": "Money", "origin": "./src/publicApi" }, "title": "Money" }, "Restriction": { "type": "string", "enum": [ "allowlist", "blacklist" ], "x-entrypoint": { "virtualPath": "schemas/Restriction", "sourcePath": "schemas/Restriction.yaml", "title": "Restriction", "origin": "./src/publicApi" }, "title": "Restriction" }, "SpendingConstraint": { "type": "object", "description": "A constraint that can be applied to a CardGroupSpendingRule", "properties": { "merchantCategoryRule": { "type": [ "object", "null" ], "properties": { "merchantCategories": { "type": "array", "items": { "type": "string" } }, "restriction": { "$ref": "#/$defs/Restriction", "x-entrypoint": { "virtualPath": "schemas/Restriction", "sourcePath": "schemas/Restriction.yaml", "title": "Restriction", "origin": "./src/publicApi" } } }, "required": [ "merchantCategories", "restriction" ] }, "merchantRule": { "type": [ "object", "null" ], "properties": { "merchants": { "type": "array", "items": { "type": "string" } }, "restriction": { "$ref": "#/$defs/Restriction", "x-entrypoint": { "virtualPath": "schemas/Restriction", "sourcePath": "schemas/Restriction.yaml", "title": "Restriction", "origin": "./src/publicApi" } } }, "required": [ "merchants", "restriction" ] }, "spendingRule": { "type": [ "object", "null" ], "properties": { "utilizationLimit": { "type": "object", "properties": { "timezone": { "type": "string", "description": "IANA timezone string. Limits always reset at midnight of the timezone specified. If no timezone is specified, then UTC time is used." }, "limitAmount": { "$ref": "#/$defs/Money", "x-entrypoint": { "virtualPath": "schemas/Money", "sourcePath": "schemas/Money.yaml", "title": "Money", "origin": "./src/publicApi" } }, "preset": { "type": "string", "enum": [ "daily", "weekly", "monthly", "yearly", "collective" ] }, "startDate": { "type": "string", "description": "Format ISO-8601. A day that equals today or the past. This is optional.If the `preset` is \"daily\", this value is ignored. If the `preset` is \"weekly\", \"monthly\" or \"yearly\", then the this value is used to compute when the limit should start limit." } }, "required": [ "limitAmount", "preset" ] }, "utilizationLimitV2": { "type": "array", "items": { "type": "object", "properties": { "timezone": { "type": "string", "description": "IANA timezone string. Limits always reset at midnight of the timezone specified. If no timezone is specified, then UTC time is used." }, "limitAmount": { "$ref": "#/$defs/Money", "x-entrypoint": { "virtualPath": "schemas/Money", "sourcePath": "schemas/Money.yaml", "title": "Money", "origin": "./src/publicApi" } }, "preset": { "type": "string", "enum": [ "daily", "weekly", "monthly", "yearly", "collective" ] }, "startDate": { "type": "string", "description": "Format ISO-8601. A day that equals today or the past. This is optional.If the `preset` is \"daily\", this value is ignored. If the `preset` is \"weekly\", \"monthly\" or \"yearly\", then the this value is used to compute when the limit should start limit." } }, "required": [ "limitAmount", "preset" ] } }, "transactionSizeLimit": { "type": "object", "properties": { "minimum": { "$ref": "#/$defs/Money", "x-entrypoint": { "virtualPath": "schemas/Money", "sourcePath": "schemas/Money.yaml", "title": "Money", "origin": "./src/publicApi" } }, "maximum": { "$ref": "#/$defs/Money", "x-entrypoint": { "virtualPath": "schemas/Money", "sourcePath": "schemas/Money.yaml", "title": "Money", "origin": "./src/publicApi" } } } } } }, "countryRule": { "type": [ "object", "null" ], "properties": { "countries": { "description": "A 2 digit country code", "type": "array", "items": { "type": "string" } }, "restriction": { "$ref": "#/$defs/Restriction", "x-entrypoint": { "virtualPath": "schemas/Restriction", "sourcePath": "schemas/Restriction.yaml", "title": "Restriction", "origin": "./src/publicApi" } } }, "required": [ "countries", "restriction" ] }, "merchantCategoryCodeRule": { "type": [ "object", "null" ], "properties": { "merchantCategoryCodes": { "type": "array", "items": { "type": "string" } }, "restriction": { "$ref": "#/$defs/Restriction", "x-entrypoint": { "virtualPath": "schemas/Restriction", "sourcePath": "schemas/Restriction.yaml", "title": "Restriction", "origin": "./src/publicApi" } } }, "required": [ "merchantCategoryCodes", "restriction" ] } }, "x-entrypoint": { "virtualPath": "schemas/SpendingConstraint", "sourcePath": "schemas/SpendingConstraint.yaml", "title": "SpendingConstraint", "origin": "./src/publicApi" }, "title": "SpendingConstraint" } } }