{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/moov/json-schema/moov-update-issued-card-schema.json",
  "title": "UpdateIssuedCard",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/moov-card-issuing-api-openapi.yml#/components/schemas/UpdateIssuedCard",
  "type": "object",
  "properties": {
    "state": {
      "$ref": "#/$defs/UpdateIssuedCardState"
    },
    "nickname": {
      "type": [
        "string",
        "null"
      ]
    },
    "metadata": {
      "type": [
        "object",
        "null"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/Metadata"
        }
      ]
    },
    "billingAddress": {
      "type": [
        "object",
        "null"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/AddressUpdate"
        }
      ]
    }
  },
  "$defs": {
    "AddressUpdate": {
      "type": "object",
      "properties": {
        "addressLine1": {
          "type": "string",
          "maxLength": 60,
          "pattern": "[a-zA-Z0-9,.\\/?:'\"|~!@#$%^&*()+_= -]+"
        },
        "addressLine2": {
          "type": "string",
          "maxLength": 32,
          "pattern": "[a-zA-Z0-9,.\\/?:'\"|~!@#$%^&*()+_= -]+"
        },
        "city": {
          "type": "string",
          "maxLength": 32,
          "pattern": "[a-zA-Z0-9,.\\/?:'\"|~!@#$%^&*()+_= -]+"
        },
        "stateOrProvince": {
          "type": "string",
          "maxLength": 2
        },
        "postalCode": {
          "type": "string",
          "maxLength": 5
        },
        "country": {
          "type": "string",
          "maxLength": 2
        }
      }
    },
    "Metadata": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "Free-form key-value pair list. Useful for storing information that is not captured elsewhere."
    },
    "UpdateIssuedCardState": {
      "type": "string",
      "enum": [
        "active",
        "frozen",
        "closed"
      ],
      "description": "Updates the state of a Moov issued card.\n- `active`: Reactivates a frozen card so it can approve authorizations again.\n- `frozen`: Temporarily suspends the card so it cannot approve authorizations. A card can be moved between `frozen` and `active` at will until it is `closed`, which is a terminal state.\n- `closed`: The card is permanently deactivated and cannot approve authorizations. A card can be closed by request or when it expires."
    }
  }
}