{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/gnosis-pay/json-schema/gnosis-pay-list-cards-success-schema.json",
  "title": "ListCardsSuccess",
  "description": "Cards retrieved successfully",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/gnosis-pay-cards-api-openapi.yml#/components/schemas/ListCardsSuccess",
  "type": "object",
  "required": [
    "cards"
  ],
  "properties": {
    "cards": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Card"
      }
    }
  },
  "$defs": {
    "Card": {
      "type": "object",
      "required": [
        "id",
        "accountId",
        "cardholderId",
        "status",
        "name",
        "type",
        "createdAt",
        "canceledAt",
        "nativeCurrency",
        "additionalCurrencies",
        "printedName",
        "issuingDate",
        "expirationDate",
        "contactlessEnabled",
        "mode",
        "brand",
        "bin",
        "last4Digits",
        "provisionedAt",
        "limit"
      ],
      "properties": {
        "id": {
          "$ref": "#/$defs/uuid"
        },
        "accountId": {
          "$ref": "#/$defs/uuid"
        },
        "cardholderId": {
          "$ref": "#/$defs/uuid"
        },
        "status": {
          "$ref": "#/$defs/CardStatus"
        },
        "name": {
          "type": "string"
        },
        "type": {
          "$ref": "#/$defs/CardType"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "canceledAt": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ]
        },
        "nativeCurrency": {
          "type": "string",
          "description": "ISO-4217 currency code the card is denominated in. The card daily\nspending limit is set and reported in this currency."
        },
        "additionalCurrencies": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "ISO-4217 currency codes the card supports besides `nativeCurrency`."
        },
        "printedName": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "issuingDate": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ]
        },
        "expirationDate": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ]
        },
        "contactlessEnabled": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ]
        },
        "mode": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "brand": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "bin": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "last4Digits": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "provisionedAt": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ]
        },
        "limit": {
          "anyOf": [
            {
              "$ref": "#/$defs/CardLimitSummary"
            },
            {
              "type": "null"
            }
          ],
          "description": "Currently configured daily spending limit. Null if no limit has been set for\nthis card. Call `GET /cards/{id}/limit` for today's spend and remaining\nheadroom."
        }
      }
    },
    "CardLimitSummary": {
      "type": "object",
      "required": [
        "amount",
        "currency",
        "decimals",
        "syncStatus",
        "updatedAt"
      ],
      "properties": {
        "amount": {
          "type": "integer",
          "format": "int64",
          "description": "Daily limit in minor units of `currency`. Divide by 10^`decimals` to get\nthe major-unit value. USD, EUR, and GBP use 2 decimal places."
        },
        "currency": {
          "type": "string",
          "description": "ISO-4217 currency code — the card native currency (`nativeCurrency` on\nthe card from `GET /cards`)."
        },
        "decimals": {
          "type": "integer",
          "format": "int32",
          "description": "Number of decimal places for this currency (2 for USD, EUR, and GBP)."
        },
        "syncStatus": {
          "$ref": "#/$defs/CardLimitSyncStatus",
          "description": "Replication state of the limit. `pending` immediately after an update,\n`synced` once the change has been applied, `failed` if the change could\nnot be applied after retries."
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time",
          "description": "Last time this limit was modified."
        }
      }
    },
    "CardLimitSyncStatus": {
      "type": "string",
      "enum": [
        "pending",
        "synced",
        "failed"
      ]
    },
    "CardStatus": {
      "type": "string",
      "enum": [
        "all",
        "provisioning",
        "pending_activation",
        "active",
        "blocked",
        "canceled"
      ]
    },
    "CardType": {
      "type": "string",
      "enum": [
        "virtual",
        "plastic"
      ]
    },
    "uuid": {
      "type": "string",
      "format": "uuid"
    }
  }
}