{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/mednode-in/json-schema/mednode-in-invoice-response-schema.json",
  "title": "InvoiceResponse",
  "x-generated": "2026-11-18",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/mednode-in-openapi.json#/components/schemas/InvoiceResponse",
  "properties": {
    "id": {
      "type": "integer",
      "title": "Id"
    },
    "invoice_number": {
      "type": "string",
      "title": "Invoice Number"
    },
    "doctor_user_id": {
      "type": "integer",
      "title": "Doctor User Id"
    },
    "doctor_name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Doctor Name"
    },
    "clinic_name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Clinic Name"
    },
    "patient_name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Patient Name"
    },
    "patient_phone": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Patient Phone"
    },
    "patient_user_id": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Patient User Id"
    },
    "appointment_id": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Appointment Id"
    },
    "items": {
      "items": {
        "type": "object"
      },
      "type": "array",
      "title": "Items",
      "default": []
    },
    "subtotal_inr": {
      "type": "integer",
      "title": "Subtotal Inr"
    },
    "discount_inr": {
      "type": "integer",
      "title": "Discount Inr"
    },
    "tax_inr": {
      "type": "integer",
      "title": "Tax Inr"
    },
    "total_inr": {
      "type": "integer",
      "title": "Total Inr"
    },
    "payment_mode": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Payment Mode"
    },
    "status": {
      "type": "string",
      "title": "Status"
    },
    "notes": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Notes"
    },
    "paid_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Paid At"
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "title": "Created At"
    }
  },
  "type": "object",
  "required": [
    "id",
    "invoice_number",
    "doctor_user_id",
    "subtotal_inr",
    "discount_inr",
    "tax_inr",
    "total_inr",
    "status",
    "created_at"
  ]
}