{
    "format": "ndjson",
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "properties": {
        "selfbill": {
            "type": "object",
            "properties": {
                "publisher_self_bill_id": {
                    "type": "string"
                },
                "publisher_id": {
                    "type": "string"
                },
                "publisher_self_bill_reference": {},
                "creation_date": {
                    "type": "string"
                },
                "payment_date": {
                    "type": "string"
                },
                "timestamp": {
                    "type": "string"
                },
                "payment_batch_id": {
                    "type": "string"
                },
                "status": {
                    "type": "string"
                },
                "tracked_currency": {
                    "type": "string"
                },
                "tracked_net_value": {
                    "type": "number"
                },
                "paid_currency": {
                    "type": "string"
                },
                "selfbill_currency": {
                    "type": "string"
                },
                "majority_received_currency": {
                    "type": "string"
                },
                "net_value": {
                    "type": "number"
                },
                "vat_value": {
                    "type": "integer"
                },
                "withheld_tax": {
                    "type": "integer"
                },
                "total_value": {
                    "type": "number"
                },
                "items_in_bill": {
                    "type": "integer"
                },
                "publisher_payment_detail_set_id": {
                    "type": "string"
                },
                "payment_detail_set_id": {
                    "type": "integer"
                },
                "self_bill_reference": {
                    "type": "string"
                },
                "legal_entity": {
                    "type": "string"
                },
                "vat_rate": {
                    "type": "integer"
                },
                "pdf_generated": {
                    "type": "integer"
                },
                "report_generated": {
                    "type": "integer"
                },
                "download": {
                    "type": "string"
                },
                "item_download": {
                    "type": "string"
                },
                "payment_type": {
                    "type": "object",
                    "properties": {
                        "payment_type_code": {
                            "type": "string"
                        },
                        "payment_type_name": {
                            "type": "string"
                        }
                    },
                    "required": ["payment_type_code", "payment_type_name"]
                }
            },
            "required": [
                "publisher_self_bill_id",
                "publisher_id",
                "publisher_self_bill_reference",
                "creation_date",
                "payment_date",
                "timestamp",
                "payment_batch_id",
                "status",
                "tracked_currency",
                "tracked_net_value",
                "paid_currency",
                "selfbill_currency",
                "majority_received_currency",
                "net_value",
                "vat_value",
                "withheld_tax",
                "total_value",
                "items_in_bill",
                "publisher_payment_detail_set_id",
                "payment_detail_set_id",
                "self_bill_reference",
                "legal_entity",
                "vat_rate",
                "pdf_generated",
                "report_generated",
                "download",
                "item_download",
                "payment_type"
            ]
        }
    },
    "required": ["selfbill"]
}
