{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/unit-co/main/json-schema/unit-co-create-card-request-schema.json",
  "title": "CreateCardRequest",
  "x-generated": "2026-10-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/unit-co-cards-api-openapi.yml#/components/schemas/CreateCardRequest",
  "type": "object",
  "required": [
    "data"
  ],
  "properties": {
    "data": {
      "type": "object",
      "required": [
        "type",
        "relationships"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "individualDebitCard",
            "individualVirtualDebitCard",
            "businessDebitCard",
            "businessVirtualDebitCard",
            "individualCreditCard",
            "businessCreditCard"
          ]
        },
        "attributes": {
          "type": "object",
          "properties": {
            "shippingAddress": {
              "$ref": "#/$defs/Address"
            }
          }
        },
        "relationships": {
          "type": "object",
          "properties": {
            "account": {
              "type": "object",
              "properties": {
                "data": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "depositAccount",
                        "creditAccount"
                      ]
                    },
                    "id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "$defs": {
    "Address": {
      "type": "object",
      "properties": {
        "street": {
          "type": "string"
        },
        "city": {
          "type": "string"
        },
        "state": {
          "type": "string"
        },
        "postalCode": {
          "type": "string"
        },
        "country": {
          "type": "string"
        }
      }
    }
  }
}