{
    "type": "object",
    "properties": {
        "id": {
            "type": "string"
        },
        "user_id": {
            "type": "string"
        },
        "project_id": {
            "type": "string"
        },
        "assigned_user_id": {
            "type": "string"
        },
        "balance": {
            "type": "integer"
        },
        "client_id": {
            "type": "string"
        },
        "vendor_id": {
            "type": "string"
        },
        "status_id": {
            "type": "string"
        },
        "design_id": {
            "type": "string"
        },
        "recurring_id": {
            "type": "string"
        },
        "created_at": {
            "type": "integer"
        },
        "updated_at": {
            "type": "integer"
        },
        "archived_at": {
            "type": "integer"
        },
        "is_deleted": {
            "type": "boolean"
        },
        "number": {
            "type": "string"
        },
        "discount": {
            "type": "integer"
        },
        "po_number": {
            "type": "string"
        },
        "date": {
            "type": "string"
        },
        "last_sent_date": {
            "type": "string"
        },
        "next_send_date": {
            "type": "string"
        },
        "due_date": {
            "type": "string"
        },
        "terms": {
            "type": "string"
        },
        "public_notes": {
            "type": "string"
        },
        "private_notes": {
            "type": "string"
        },
        "uses_inclusive_taxes": {
            "type": "boolean"
        },
        "tax_name1": {
            "type": "string"
        },
        "tax_name2": {
            "type": "string"
        },
        "tax_rate2": {
            "type": "integer"
        },
        "tax_name3": {
            "type": "string"
        },
        "tax_rate3": {
            "type": "integer"
        },
        "is_amount_discount": {
            "type": "boolean"
        },
        "footer": {
            "type": "string"
        },
        "partial": {
            "type": "integer"
        },
        "partial_due_date": {
            "type": "string"
        },
        "custom_value1": {
            "type": "string"
        },
        "custom_value2": {
            "type": "string"
        },
        "custom_value3": {
            "type": "string"
        },
        "custom_value4": {
            "type": "string"
        },
        "has_tasks": {
            "type": "boolean"
        },
        "has_expenses": {
            "type": "boolean"
        },
        "custom_surcharge1": {
            "type": "integer"
        },
        "custom_surcharge2": {
            "type": "integer"
        },
        "custom_surcharge3": {
            "type": "integer"
        },
        "custom_surcharge4": {
            "type": "integer"
        },
        "exchange_rate": {
            "type": "integer"
        },
        "custom_surcharge_tax1": {
            "type": "boolean"
        },
        "custom_surcharge_tax2": {
            "type": "boolean"
        },
        "custom_surcharge_tax3": {
            "type": "boolean"
        },
        "custom_surcharge_tax4": {
            "type": "boolean"
        },
        "line_items": {
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "_id": {
                        "type": "string"
                    },
                    "product_key": {
                        "type": "string"
                    },
                    "product_cost": {
                        "type": "integer"
                    },
                    "notes": {
                        "type": "string"
                    },
                    "discount": {
                        "type": "integer"
                    },
                    "is_amount_discount": {
                        "type": "boolean"
                    },
                    "tax_name1": {
                        "type": "string"
                    },
                    "tax_rate1": {
                        "type": "integer"
                    },
                    "tax_name2": {
                        "type": "string"
                    },
                    "tax_rate2": {
                        "type": "integer"
                    },
                    "tax_name3": {
                        "type": "string"
                    },
                    "tax_rate3": {
                        "type": "integer"
                    },
                    "sort_id": {
                        "type": "string"
                    },
                    "tax_amount": {
                        "type": "integer"
                    },
                    "date": {
                        "type": "string"
                    },
                    "custom_value1": {
                        "type": "string"
                    },
                    "custom_value2": {
                        "type": "string"
                    },
                    "custom_value3": {
                        "type": "string"
                    },
                    "custom_value4": {
                        "type": "string"
                    },
                    "type_id": {
                        "type": "string"
                    },
                    "tax_id": {
                        "type": "string"
                    },
                    "task_id": {
                        "type": "string"
                    },
                    "expense_id": {
                        "type": "string"
                    },
                    "unit_code": {
                        "type": "string"
                    }
                },
                "required": [
                    "quantity",
                    "cost",
                    "product_key",
                    "product_cost",
                    "notes",
                    "discount",
                    "is_amount_discount",
                    "tax_name1",
                    "tax_rate1",
                    "tax_name2",
                    "tax_rate2",
                    "tax_name3",
                    "tax_rate3",
                    "sort_id",
                    "line_total",
                    "tax_amount",
                    "gross_line_total",
                    "date",
                    "custom_value1",
                    "custom_value2",
                    "custom_value3",
                    "custom_value4",
                    "type_id",
                    "tax_id",
                    "task_id",
                    "expense_id"
                ]
            }
        },
        "entity_type": {
            "type": "string"
        },
        "reminder1_sent": {
            "type": "string"
        },
        "reminder2_sent": {
            "type": "string"
        },
        "reminder3_sent": {
            "type": "string"
        },
        "reminder_last_sent": {
            "type": "string"
        },
        "subscription_id": {
            "type": "string"
        },
        "auto_bill_enabled": {
            "type": "boolean"
        },
        "invitations": {
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "client_contact_id": {
                        "type": "string"
                    },
                    "key": {
                        "type": "string"
                    },
                    "link": {
                        "type": "string"
                    },
                    "sent_date": {
                        "type": "string"
                    },
                    "viewed_date": {
                        "type": "string"
                    },
                    "opened_date": {
                        "type": "string"
                    },
                    "updated_at": {
                        "type": "integer"
                    },
                    "archived_at": {
                        "type": "integer"
                    },
                    "created_at": {
                        "type": "integer"
                    },
                    "email_status": {
                        "type": "string"
                    },
                    "email_error": {
                        "type": "string"
                    },
                    "message_id": {
                        "type": "string"
                    }
                },
                "required": [
                    "id",
                    "client_contact_id",
                    "key",
                    "link",
                    "sent_date",
                    "viewed_date",
                    "opened_date",
                    "updated_at",
                    "archived_at",
                    "created_at",
                    "email_status",
                    "email_error",
                    "message_id"
                ]
            }
        }
    },
    "required": [
        "id",
        "user_id",
        "project_id",
        "assigned_user_id",
        "amount",
        "balance",
        "client_id",
        "vendor_id",
        "status_id",
        "design_id",
        "recurring_id",
        "created_at",
        "updated_at",
        "archived_at",
        "is_deleted",
        "number",
        "discount",
        "po_number",
        "date",
        "last_sent_date",
        "next_send_date",
        "due_date",
        "terms",
        "public_notes",
        "private_notes",
        "uses_inclusive_taxes",
        "tax_name1",
        "tax_rate1",
        "tax_name2",
        "tax_rate2",
        "tax_name3",
        "tax_rate3",
        "total_taxes",
        "is_amount_discount",
        "footer",
        "partial",
        "partial_due_date",
        "custom_value1",
        "custom_value2",
        "custom_value3",
        "custom_value4",
        "has_tasks",
        "has_expenses",
        "custom_surcharge1",
        "custom_surcharge2",
        "custom_surcharge3",
        "custom_surcharge4",
        "exchange_rate",
        "custom_surcharge_tax1",
        "custom_surcharge_tax2",
        "custom_surcharge_tax3",
        "custom_surcharge_tax4",
        "line_items",
        "entity_type",
        "reminder1_sent",
        "reminder2_sent",
        "reminder3_sent",
        "reminder_last_sent",
        "paid_to_date",
        "subscription_id",
        "auto_bill_enabled",
        "tax_info",
        "e_invoice",
        "invitations",
        "documents"
    ],
    "version": 1
}
