{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/divvy/json-schema/divvy-apcard-response-dto-schema.json",
  "title": "APCardResponseDto",
  "description": "AP Card response DTO.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/divvy-funding-accounts-api-openapi.yml#/components/schemas/APCardResponseDto",
  "required": [
    "id"
  ],
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "BILL-generated ID of the AP Card. The value begins with `dva`."
    },
    "status": {
      "allOf": [
        {
          "$ref": "#/$defs/APCardStatus"
        },
        {
          "description": "AP Card status."
        }
      ]
    },
    "nameOnAccount": {
      "type": "string",
      "description": "Full name on the AP Card"
    },
    "createdTime": {
      "type": "string",
      "description": "Created date and time",
      "format": "date-time"
    },
    "updatedTime": {
      "type": "string",
      "description": "Updated date and time",
      "format": "date-time"
    },
    "balance": {
      "type": "number",
      "description": "AP Card available balance"
    },
    "limit": {
      "type": "number",
      "description": "AP Card spending limit"
    }
  },
  "$defs": {
    "APCardStatus": {
      "type": "string",
      "description": "AP Card response status.",
      "enum": [
        "ACTIVE",
        "INACTIVE",
        "DELETED",
        "PENDING",
        "DRAFT",
        "DRAFT_DELETED",
        "FROZEN",
        "UNDEFINED"
      ]
    }
  }
}