{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://recruitly.dev/backup-schema/v1/invoices.schema.json",
  "title": "Invoices",
  "description": "Your invoices and what has been paid.",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "tenantId": {
      "type": [
        "string",
        "null"
      ]
    },
    "reference": {
      "type": [
        "string",
        "null"
      ]
    },
    "owner": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "id": {
          "type": [
            "string",
            "null"
          ]
        },
        "name": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "additionalProperties": false
    },
    "createdOn": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "modifiedOn": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "archived": {
      "type": "boolean"
    },
    "number": {
      "type": [
        "string",
        "null"
      ]
    },
    "status": {
      "type": [
        "string",
        "null"
      ]
    },
    "contact": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "id": {
          "type": [
            "string",
            "null"
          ]
        },
        "name": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "additionalProperties": false
    },
    "currency": {
      "type": [
        "string",
        "null"
      ]
    },
    "totalAmount": {
      "type": [
        "number",
        "null"
      ]
    },
    "totalTax": {
      "type": [
        "number",
        "null"
      ]
    },
    "amountDue": {
      "type": [
        "number",
        "null"
      ]
    },
    "amountPaid": {
      "type": [
        "number",
        "null"
      ]
    },
    "invoiceDate": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "dueDate": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "paymentDate": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "notes": {
      "type": [
        "string",
        "null"
      ]
    },
    "links": {
      "type": "array",
      "items": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "additionalProperties": false
      }
    }
  },
  "required": [
    "id",
    "tenantId",
    "reference",
    "owner",
    "createdOn",
    "modifiedOn",
    "archived",
    "number",
    "status",
    "contact",
    "currency",
    "totalAmount",
    "totalTax",
    "amountDue",
    "amountPaid",
    "invoiceDate",
    "dueDate",
    "paymentDate",
    "notes",
    "links"
  ],
  "additionalProperties": false
}
