{
    "openapi": "3.0.1",
    "info": {
        "title": "KROS Webhooks",
        "description": "To check origin of the sender use the X-Kros-Signature-256 webhook header.\r\n\r\nThis header contains hashed body of notification message, computed using HCMASSHA256 algorithm and converted to Base64String. \r\n\r\nHash is computed using webhook secret key you saved in company settings. The hash is created using encoding UTF-16 Little Endian (UTF-16LE).\r\n\r\nYou can find more information about Kros OpenAPI in the documentation <a target='_blank' href='https://www.kros.sk/openapi-dokumentacia/'>https://www.kros.sk/openapi-dokumentacia/</a> \r\n",
        "version": "1.0"
    },
    "paths": {
        "https://example.com/endpoint": {
            "post": {
                "tags": [
                    "Document webhook"
                ],
                "summary": "Sent to the endpoint on which your server listens when document in InvoicingApp is created, changed, or deleted.",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/DocumentCallbackPayload"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Status code that your server should return if the data was received successfully."
                    },
                    "400": {
                        "description": "Status code indicating that your server does not understand the format of the payload.\r\n                                No retries are attempted."
                    },
                    "500": {
                        "description": "Status code indicating server-side error in the delivery. 2 retries are attempted."
                    }
                }
            }
        },
        "https://example.com/paid-document": {
            "post": {
                "tags": [
                    "Payment webhook"
                ],
                "summary": "Triggered whenever a payment for a document is created, updated, or deleted in InvoicingApp. This event applies only to document payments and is not triggered by payment changes in the Finance module.",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/PaymentCallbackPayload"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Status code that your server should return if the data was received successfully."
                    },
                    "400": {
                        "description": "Status code indicating that your server does not understand the format of the payload.\r\nNo retries are attempted."
                    },
                    "500": {
                        "description": "Status code indicating server-side error in the delivery. 2 retries are attempted."
                    }
                }
            }
        },

        "https://example.com/payment": {
            "post": {
                "tags": [
                    "Payment webhook"
                ],
                "summary": "Triggered whenever a payment in the Finance module is created, updated, or deleted. This event does not include document payment events that are not linked to a bank account, payment gateway, or cash register.",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/FinancialTransactionCallbackPayload"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Status code that your server should return if the data was received successfully."
                    },
                    "400": {
                        "description": "Status code indicating that your server does not understand the format of the payload.\r\nNo retries are attempted."
                    },
                    "500": {
                        "description": "Status code indicating server-side error in the delivery. 2 retries are attempted."
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "DocumentCallbackPayload": {
                "type": "object",
                "properties": {
                    "companyId": {
                        "type": "integer",
                        "description": "Id of company.",
                        "format": "int64",
                        "example": 5587
                    },
                    "entityType": {
                        "enum": [
                            0,
                            1,
                            2,
                            3
                        ],
                        "type": "integer",
                        "description": "Type of returned entity. Undefined = 0, Document = 1, DocumentPayments = 2, ReceivedTransaction = 3",
                        "format": "int32",
                        "example": 1
                    },
                    "results": {
                        "$ref": "#/components/schemas/UploadedDocumentHeaderObjectResults"
                    },
                    "status": {
                        "type": "integer",
                        "description": "Status of the entire request. Continue = 100, SwitchingProtocols = 101, Processing = 102, EarlyHints = 103, OK = 200, Created = 201, Accepted = 202, NonAuthoritativeInformation = 203, NoContent = 204, ResetContent = 205, PartialContent = 206, MultiStatus = 207, AlreadyReported = 208, IMUsed = 226, MultipleChoices = 300, Ambiguous = 300, MovedPermanently = 301, Moved = 301, Found = 302, Redirect = 302, SeeOther = 303, RedirectMethod = 303, NotModified = 304, UseProxy = 305, Unused = 306, TemporaryRedirect = 307, RedirectKeepVerb = 307, PermanentRedirect = 308, BadRequest = 400, Unauthorized = 401, PaymentRequired = 402, Forbidden = 403, NotFound = 404, MethodNotAllowed = 405, NotAcceptable = 406, ProxyAuthenticationRequired = 407, RequestTimeout = 408, Conflict = 409, Gone = 410, LengthRequired = 411, PreconditionFailed = 412, RequestEntityTooLarge = 413, RequestUriTooLong = 414, UnsupportedMediaType = 415, RequestedRangeNotSatisfiable = 416, ExpectationFailed = 417, MisdirectedRequest = 421, UnprocessableEntity = 422, Locked = 423, FailedDependency = 424, UpgradeRequired = 426, PreconditionRequired = 428, TooManyRequests = 429, RequestHeaderFieldsTooLarge = 431, UnavailableForLegalReasons = 451, InternalServerError = 500, NotImplemented = 501, BadGateway = 502, ServiceUnavailable = 503, GatewayTimeout = 504, HttpVersionNotSupported = 505, VariantAlsoNegotiates = 506, InsufficientStorage = 507, LoopDetected = 508, NotExtended = 510, NetworkAuthenticationRequired = 511",
                        "format": "int32",
                        "example": 200
                    },
                    "apiUrl": {
                        "type": "string",
                        "description": "OpenApi GET url. {id} must by replaced by id of created document.",
                        "nullable": true,
                        "example": "http://example/api/endpoint/{id}"
                    },
                    "requestId": {
                        "type": "string",
                        "description": "Always null.",
                        "format": "uuid",
                        "nullable": true,
                        "example": null
                    }
                },
                "additionalProperties": false,
                "description": "Payload example."
            },
            "PaymentCallbackPayload": {
                "type": "object",
                "properties": {
                    "companyId": {
                        "type": "integer",
                        "description": "Id of company.",
                        "format": "int64",
                        "example": 5587
                    },
                    "entityType": {
                        "enum": [
                            0,
                            1,
                            2,
                            3
                        ],
                        "type": "integer",
                        "description": "Type of returned entity. Undefined = 0, Document = 1, DocumentPayments = 2, ReceivedTransaction = 3",
                        "format": "int32",
                        "example": 2
                    },
                    "results": {
                        "$ref": "#/components/schemas/UploadedPaymentInvoicingPaymentStateChangedResults"
                    },
                    "status": {
                        "type": "integer",
                        "description": "Status of the entire request. Continue = 100, SwitchingProtocols = 101, Processing = 102, EarlyHints = 103, OK = 200, Created = 201, Accepted = 202, NonAuthoritativeInformation = 203, NoContent = 204, ResetContent = 205, PartialContent = 206, MultiStatus = 207, AlreadyReported = 208, IMUsed = 226, MultipleChoices = 300, Ambiguous = 300, MovedPermanently = 301, Moved = 301, Found = 302, Redirect = 302, SeeOther = 303, RedirectMethod = 303, NotModified = 304, UseProxy = 305, Unused = 306, TemporaryRedirect = 307, RedirectKeepVerb = 307, PermanentRedirect = 308, BadRequest = 400, Unauthorized = 401, PaymentRequired = 402, Forbidden = 403, NotFound = 404, MethodNotAllowed = 405, NotAcceptable = 406, ProxyAuthenticationRequired = 407, RequestTimeout = 408, Conflict = 409, Gone = 410, LengthRequired = 411, PreconditionFailed = 412, RequestEntityTooLarge = 413, RequestUriTooLong = 414, UnsupportedMediaType = 415, RequestedRangeNotSatisfiable = 416, ExpectationFailed = 417, MisdirectedRequest = 421, UnprocessableEntity = 422, Locked = 423, FailedDependency = 424, UpgradeRequired = 426, PreconditionRequired = 428, TooManyRequests = 429, RequestHeaderFieldsTooLarge = 431, UnavailableForLegalReasons = 451, InternalServerError = 500, NotImplemented = 501, BadGateway = 502, ServiceUnavailable = 503, GatewayTimeout = 504, HttpVersionNotSupported = 505, VariantAlsoNegotiates = 506, InsufficientStorage = 507, LoopDetected = 508, NotExtended = 510, NetworkAuthenticationRequired = 511",
                        "format": "int32",
                        "example": 200
                    },
                    "apiUrl": {
                        "type": "string",
                        "description": "OpenApi GET url. {id} must by replaced by id of created payment.",
                        "nullable": true,
                        "example": ""
                    },
                    "requestId": {
                        "type": "string",
                        "description": "Always null.",
                        "format": "uuid",
                        "nullable": true,
                        "example": ""
                    }
                },
                "additionalProperties": false,
                "description": "Payload example."
            },
            "FinancialTransactionCallbackPayload": {
                "type": "object",
                "properties": {
                    "companyId": {
                        "type": "integer",
                        "description": "Id of company.",
                        "format": "int64",
                        "example": 5587
                    },
                    "entityType": {
                        "enum": [
                            0,
                            1,
                            2,
                            3
                        ],
                        "type": "integer",
                        "description": "Type of returned entity. Undefined = 0, Document = 1, DocumentPayments = 2, ReceivedTransaction = 3",
                        "format": "int32",
                        "example": 3
                    },
                    "results": {
                        "$ref": "#/components/schemas/UploadedTransactionResourceStatus"
                    },
                    "status": {
                        "type": "integer",
                        "description": "Status of the entire request. Continue = 100, SwitchingProtocols = 101, Processing = 102, EarlyHints = 103, OK = 200, Created = 201, Accepted = 202, NonAuthoritativeInformation = 203, NoContent = 204, ResetContent = 205, PartialContent = 206, MultiStatus = 207, AlreadyReported = 208, IMUsed = 226, MultipleChoices = 300, Ambiguous = 300, MovedPermanently = 301, Moved = 301, Found = 302, Redirect = 302, SeeOther = 303, RedirectMethod = 303, NotModified = 304, UseProxy = 305, Unused = 306, TemporaryRedirect = 307, RedirectKeepVerb = 307, PermanentRedirect = 308, BadRequest = 400, Unauthorized = 401, PaymentRequired = 402, Forbidden = 403, NotFound = 404, MethodNotAllowed = 405, NotAcceptable = 406, ProxyAuthenticationRequired = 407, RequestTimeout = 408, Conflict = 409, Gone = 410, LengthRequired = 411, PreconditionFailed = 412, RequestEntityTooLarge = 413, RequestUriTooLong = 414, UnsupportedMediaType = 415, RequestedRangeNotSatisfiable = 416, ExpectationFailed = 417, MisdirectedRequest = 421, UnprocessableEntity = 422, Locked = 423, FailedDependency = 424, UpgradeRequired = 426, PreconditionRequired = 428, TooManyRequests = 429, RequestHeaderFieldsTooLarge = 431, UnavailableForLegalReasons = 451, InternalServerError = 500, NotImplemented = 501, BadGateway = 502, ServiceUnavailable = 503, GatewayTimeout = 504, HttpVersionNotSupported = 505, VariantAlsoNegotiates = 506, InsufficientStorage = 507, LoopDetected = 508, NotExtended = 510, NetworkAuthenticationRequired = 511",
                        "format": "int32",
                        "example": 200
                    },
                    "apiUrl": {
                        "type": "string",
                        "description": "OpenApi GET url. {id} must by replaced by id of created payment.",
                        "nullable": true,
                        "example": ""
                    },
                    "requestId": {
                        "type": "string",
                        "description": "Always null.",
                        "format": "uuid",
                        "nullable": true,
                        "example": ""
                    }
                },
                "additionalProperties": false,
                "description": "Payload example."
            },
            "UploadedDocumentHeaderObjectResults": {
                "type": "object",
                "properties": {
                    "entities": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/UploadedDocumentHeaderResourceStatus"
                        },
                        "description": "List of entities.",
                        "nullable": true
                    },
                    "relatedEntityType": {
                        "enum": [
                            0,
                            1,
                            2
                        ],
                        "type": "integer",
                        "description": "Type of related entity. Undefined = 0, Document = 1, ReceivedPayments = 2",
                        "format": "int32",
                        "nullable": true,
                        "example": null
                    },
                    "relatedEntities": {
                        "type": "array",
                        "items": {},
                        "description": "List of changed related entities. Contents of this property depends on Kros.Esw.OpenApi.Base.Application.Documents.Callbacks.Results`2.RelatedEntityType.",
                        "nullable": true,
                        "example": null
                    }
                },
                "additionalProperties": false,
                "description": "Results of webhook response."
            },
            "UploadedDocumentHeaderResourceStatus": {
                "type": "object",
                "properties": {
                    "index": {
                        "type": "integer",
                        "description": "Index of the resource taken from the original order of resources sent to API.",
                        "format": "int32"
                    },
                    "source": {
                        "enum": [
                            0,
                            1,
                            2
                        ],
                        "type": "integer",
                        "description": "Webhook source. Undefined = 0, OpenApi = 1, InvoicingApp = 2",
                        "format": "int32",
                        "example": 2
                    },
                    "operation": {
                        "enum": [
                            0,
                            1,
                            2,
                            3
                        ],
                        "type": "integer",
                        "description": "Entity CRUD operation. Undefined = 0, Create = 1, Update = 2, Delete = 3",
                        "format": "int32",
                        "example": 1
                    },
                    "status": {
                        "type": "integer",
                        "description": "Status code. Continue = 100, SwitchingProtocols = 101, Processing = 102, EarlyHints = 103, OK = 200, Created = 201, Accepted = 202, NonAuthoritativeInformation = 203, NoContent = 204, ResetContent = 205, PartialContent = 206, MultiStatus = 207, AlreadyReported = 208, IMUsed = 226, MultipleChoices = 300, Ambiguous = 300, MovedPermanently = 301, Moved = 301, Found = 302, Redirect = 302, SeeOther = 303, RedirectMethod = 303, NotModified = 304, UseProxy = 305, Unused = 306, TemporaryRedirect = 307, RedirectKeepVerb = 307, PermanentRedirect = 308, BadRequest = 400, Unauthorized = 401, PaymentRequired = 402, Forbidden = 403, NotFound = 404, MethodNotAllowed = 405, NotAcceptable = 406, ProxyAuthenticationRequired = 407, RequestTimeout = 408, Conflict = 409, Gone = 410, LengthRequired = 411, PreconditionFailed = 412, RequestEntityTooLarge = 413, RequestUriTooLong = 414, UnsupportedMediaType = 415, RequestedRangeNotSatisfiable = 416, ExpectationFailed = 417, MisdirectedRequest = 421, UnprocessableEntity = 422, Locked = 423, FailedDependency = 424, UpgradeRequired = 426, PreconditionRequired = 428, TooManyRequests = 429, RequestHeaderFieldsTooLarge = 431, UnavailableForLegalReasons = 451, InternalServerError = 500, NotImplemented = 501, BadGateway = 502, ServiceUnavailable = 503, GatewayTimeout = 504, HttpVersionNotSupported = 505, VariantAlsoNegotiates = 506, InsufficientStorage = 507, LoopDetected = 508, NotExtended = 510, NetworkAuthenticationRequired = 511",
                        "format": "int32",
                        "example": 201
                    },
                    "data": {
                        "$ref": "#/components/schemas/UploadedDocumentHeader"
                    },
                    "problems": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/ValidationProblemDetail"
                        },
                        "description": "Problems discovered during asynchronous processing of resource..",
                        "nullable": true,
                        "example": null
                    }
                },
                "additionalProperties": false,
                "description": "Status of a resource with its data."
            },
            "UploadedDocumentHeader": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "description": "Document id.",
                        "format": "int64",
                        "example": 159
                    },
                    "numberingSequence": {
                        "type": "string",
                        "description": "The numbering sequence code.",
                        "nullable": true,
                        "example": "OF"
                    },
                    "documentNumber": {
                        "maxLength": 20,
                        "type": "string",
                        "description": "The number of the document.",
                        "nullable": true,
                        "example": "2022155"
                    },
                    "externalId": {
                        "type": "string",
                        "description": "External id.",
                        "nullable": true,
                        "example": ""
                    },
                    "documentType": {
                        "enum": [
                            0,
                            1,
                            2,
                            3,
                            4,
                            5,
                            6,
                            7,
                            8,
                            9,
                            10
                        ],
                        "type": "integer",
                        "description": "Type of created documents Undefined = 0, PriceOffer = 1, Invoice = 2, ProformaInvoice = 3, DeliveryNote = 4, MovementReceivingNote = 5, MovementShippingNote = 6, ReceivedOrder = 7, SentOrder = 8, InvoiceTemplate = 9, ReceivedInvoice = 10",
                        "format": "int32",
                        "example": 2
                    }
                },
                "additionalProperties": false,
                "description": "Response header of uploaded document."
            },
            "ValidationProblemDetail": {
                "type": "object",
                "properties": {
                    "type": {
                        "type": "string",
                        "description": "Type of a problem.",
                        "format": "uri",
                        "nullable": true,
                        "example": null
                    },
                    "title": {
                        "type": "string",
                        "description": "Title.",
                        "nullable": true,
                        "example": null
                    },
                    "detail": {
                        "type": "string",
                        "description": "Detail.",
                        "nullable": true,
                        "example": null
                    }
                },
                "additionalProperties": false,
                "description": "Validation problem details. Based on RFC 7807."
            },
            "UploadedPaymentInvoicingPaymentStateChangedResults": {
                "type": "object",
                "properties": {
                    "entities": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/UploadedPaymentResourceStatus"
                        },
                        "description": "List of entities.",
                        "nullable": true
                    },
                    "relatedEntityType": {
                        "enum": [
                            0,
                            1,
                            2
                        ],
                        "type": "integer",
                        "description": "Type of related entity. Undefined = 0, Document = 1, ReceivedPayments = 2",
                        "format": "int32",
                        "nullable": true,
                        "example": 1
                    },
                    "relatedEntities": {
                        "type": "array",
                        "items": {},
                        "description": "List of changed related entities. This array is empty.",
                        "nullable": true
                    }
                },
                "additionalProperties": false,
                "description": "Results of webhook response."
            },
            "UploadedPaymentResourceStatus": {
                "type": "object",
                "properties": {
                    "index": {
                        "type": "integer",
                        "description": "Index of the resource taken from the original order of resources sent to API.",
                        "format": "int32"
                    },
                    "source": {
                        "enum": [
                            0,
                            1,
                            2
                        ],
                        "type": "integer",
                        "description": "Webhook source. Undefined = 0, OpenApi = 1, InvoicingApp = 2",
                        "format": "int32",
                        "example": 2
                    },
                    "operation": {
                        "enum": [
                            0,
                            1,
                            2,
                            3
                        ],
                        "type": "integer",
                        "description": "Entity CRUD operation. Undefined = 0, Create = 1, Update = 2, Delete = 3",
                        "format": "int32",
                        "example": 1
                    },
                    "status": {
                        "type": "integer",
                        "description": "Status code. Continue = 100, SwitchingProtocols = 101, Processing = 102, EarlyHints = 103, OK = 200, Created = 201, Accepted = 202, NonAuthoritativeInformation = 203, NoContent = 204, ResetContent = 205, PartialContent = 206, MultiStatus = 207, AlreadyReported = 208, IMUsed = 226, MultipleChoices = 300, Ambiguous = 300, MovedPermanently = 301, Moved = 301, Found = 302, Redirect = 302, SeeOther = 303, RedirectMethod = 303, NotModified = 304, UseProxy = 305, Unused = 306, TemporaryRedirect = 307, RedirectKeepVerb = 307, PermanentRedirect = 308, BadRequest = 400, Unauthorized = 401, PaymentRequired = 402, Forbidden = 403, NotFound = 404, MethodNotAllowed = 405, NotAcceptable = 406, ProxyAuthenticationRequired = 407, RequestTimeout = 408, Conflict = 409, Gone = 410, LengthRequired = 411, PreconditionFailed = 412, RequestEntityTooLarge = 413, RequestUriTooLong = 414, UnsupportedMediaType = 415, RequestedRangeNotSatisfiable = 416, ExpectationFailed = 417, MisdirectedRequest = 421, UnprocessableEntity = 422, Locked = 423, FailedDependency = 424, UpgradeRequired = 426, PreconditionRequired = 428, TooManyRequests = 429, RequestHeaderFieldsTooLarge = 431, UnavailableForLegalReasons = 451, InternalServerError = 500, NotImplemented = 501, BadGateway = 502, ServiceUnavailable = 503, GatewayTimeout = 504, HttpVersionNotSupported = 505, VariantAlsoNegotiates = 506, InsufficientStorage = 507, LoopDetected = 508, NotExtended = 510, NetworkAuthenticationRequired = 511",
                        "format": "int32",
                        "example": 201
                    },
                    "data": {
                        "$ref": "#/components/schemas/UploadedPayment"
                    },
                    "problems": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/ValidationProblemDetail"
                        },
                        "description": "Problems discovered during asynchronous processing of resource..",
                        "nullable": true,
                        "example": null
                    }
                },
                "additionalProperties": false,
                "description": "Status of a resource with its data."
            },
            "UploadedTransactionResourceStatus": {
                "type": "object",
                "properties": {
                    "index": {
                        "type": "integer",
                        "description": "Index of the resource taken from the original order of resources sent to API.",
                        "format": "int32"
                    },
                    "source": {
                        "enum": [
                            0,
                            1,
                            2
                        ],
                        "type": "integer",
                        "description": "Webhook source. Undefined = 0, OpenApi = 1, InvoicingApp = 2",
                        "format": "int32",
                        "example": 2
                    },
                    "operation": {
                        "enum": [
                            0,
                            1,
                            2,
                            3
                        ],
                        "type": "integer",
                        "description": "Entity CRUD operation. Undefined = 0, Create = 1, Update = 2, Delete = 3",
                        "format": "int32",
                        "example": 1
                    },
                    "status": {
                        "type": "integer",
                        "description": "Status code. Continue = 100, SwitchingProtocols = 101, Processing = 102, EarlyHints = 103, OK = 200, Created = 201, Accepted = 202, NonAuthoritativeInformation = 203, NoContent = 204, ResetContent = 205, PartialContent = 206, MultiStatus = 207, AlreadyReported = 208, IMUsed = 226, MultipleChoices = 300, Ambiguous = 300, MovedPermanently = 301, Moved = 301, Found = 302, Redirect = 302, SeeOther = 303, RedirectMethod = 303, NotModified = 304, UseProxy = 305, Unused = 306, TemporaryRedirect = 307, RedirectKeepVerb = 307, PermanentRedirect = 308, BadRequest = 400, Unauthorized = 401, PaymentRequired = 402, Forbidden = 403, NotFound = 404, MethodNotAllowed = 405, NotAcceptable = 406, ProxyAuthenticationRequired = 407, RequestTimeout = 408, Conflict = 409, Gone = 410, LengthRequired = 411, PreconditionFailed = 412, RequestEntityTooLarge = 413, RequestUriTooLong = 414, UnsupportedMediaType = 415, RequestedRangeNotSatisfiable = 416, ExpectationFailed = 417, MisdirectedRequest = 421, UnprocessableEntity = 422, Locked = 423, FailedDependency = 424, UpgradeRequired = 426, PreconditionRequired = 428, TooManyRequests = 429, RequestHeaderFieldsTooLarge = 431, UnavailableForLegalReasons = 451, InternalServerError = 500, NotImplemented = 501, BadGateway = 502, ServiceUnavailable = 503, GatewayTimeout = 504, HttpVersionNotSupported = 505, VariantAlsoNegotiates = 506, InsufficientStorage = 507, LoopDetected = 508, NotExtended = 510, NetworkAuthenticationRequired = 511",
                        "format": "int32",
                        "example": 201
                    },
                    "data": {
                        "$ref": "#/components/schemas/UploadedTransaction"
                    },
                    "problems": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/ValidationProblemDetail"
                        },
                        "description": "Problems discovered during asynchronous processing of resource..",
                        "nullable": true,
                        "example": null
                    }
                },
                "additionalProperties": false,
                "description": "Status of a resource with its data."
            },

            "UploadedPayment": {
                "type": "object",
                "properties": {
                    "documentType": {
                        "enum": [
                            0,
                            1,
                            2,
                            3,
                            4,
                            5,
                            6,
                            7,
                            8,
                            9,
                            10
                        ],
                        "type": "integer",
                        "description": "Kros.Esw.OpenApi.Base.Application.Documents.Callbacks.UploadedPayment.DocumentType of document that payment belongs to or Undefined if payment is not paired with document. Undefined = 0, PriceOffer = 1, Invoice = 2, ProformaInvoice = 3, DeliveryNote = 4, MovementReceivingNote = 5, MovementShippingNote = 6, ReceivedOrder = 7, SentOrder = 8, InvoiceTemplate = 9, ReceivedInvoice = 10",
                        "format": "int32",
                        "example": 3
                    },
                    "documentId": {
                        "type": "integer",
                        "description": "Id of document that payment belongs to or 0 if payment is not paired with document.",
                        "format": "int64",
                        "example": 159
                    },
                    "variableSymbol": {
                        "type": "string",
                        "description": "Variable symbol.",
                        "nullable": true,
                        "example": "123"
                    },
                    "sumOfPayment": {
                        "type": "number",
                        "description": "Sum of payment.",
                        "format": "double",
                        "example": 120.26
                    },
                    "dateOfPayment": {
                        "type": "string",
                        "description": "Day of payment.",
                        "format": "date"
                    },
                    "hasRelatedEntity": {
                        "type": "boolean",
                        "description": "Flag indicating that payment is associated to the document.",
                        "example": true
                    }
                },
                "additionalProperties": false,
                "description": "Uploaded payment model."
            },
            "UploadedTransaction": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "description": "Kros.Esw.OpenApi.Base.Application.Documents.Callbacks.UploadedTransaction.Id of transaction",
                        "format": "int32",
                        "example": 3
                    },
                    "variableSymbol": {
                        "type": "string",
                        "description": "Variable symbol.",
                        "nullable": true,
                        "example": "123"
                    },
                    "sumOfPayment": {
                        "type": "number",
                        "description": "Sum of payment.",
                        "format": "double",
                        "example": 120.26
                    },
                    "dateOfPayment": {
                        "type": "string",
                        "description": "Date of payment.",
                        "format": "date"
                    },
                    "paymentReference": {
                        "type": "string",
                        "description": "Payment reference/end to end id.",
                        "format": "date"
                    },
                    "externalId": {
                        "type": "string",
                        "description": "External id of transaction.",
                        "format": "date"
                    }
                },
                "additionalProperties": false,
                "description": "Uploaded payment model."
            },
            "InvoicingPaymentStateChanged": {
                "type": "object",
                "properties": {
                    "documentType": {
                        "enum": [
                            0,
                            1,
                            2,
                            3,
                            4,
                            5,
                            6,
                            7,
                            8,
                            9,
                            10
                        ],
                        "type": "integer",
                        "description": "Document type. Undefined = 0, PriceOffer = 1, Invoice = 2, ProformaInvoice = 3, DeliveryNote = 4, MovementReceivingNote = 5, MovementShippingNote = 6, ReceivedOrder = 7, SentOrder = 8, InvoiceTemplate = 9, ReceivedInvoice = 10",
                        "format": "int32",
                        "example": 3
                    },
                    "documentId": {
                        "type": "integer",
                        "description": "Document id.",
                        "format": "int64",
                        "example": 159
                    },
                    "numberingSequence": {
                        "type": "string",
                        "description": "Numbering Sequence.",
                        "nullable": true,
                        "example": "OPF"
                    },
                    "documentNumber": {
                        "type": "string",
                        "description": "Document number.",
                        "nullable": true,
                        "example": "123"
                    },
                    "variableSymbol": {
                        "type": "string",
                        "description": "Variable symbol.",
                        "nullable": true,
                        "example": "123"
                    },
                    "sumOfPayments": {
                        "type": "number",
                        "description": "Sum of all payments of document.",
                        "format": "double",
                        "nullable": true,
                        "example": 120.26
                    },
                    "countOfPayments": {
                        "type": "integer",
                        "description": "Count of all payments.",
                        "format": "int32",
                        "nullable": true,
                        "example": 1
                    },
                    "paymentStatus": {
                        "enum": [
                            0,
                            1,
                            2,
                            3,
                            -1
                        ],
                        "type": "integer",
                        "description": "Payment status of document. NotPaid = 0, FullyPaid = 1, OverPaid = 2, PartiallyPaid = 3, Undefined = -1",
                        "format": "int32",
                        "example": 1
                    },
                    "orderNumber": {
                        "type": "string",
                        "description": "Order number.",
                        "nullable": true,
                        "example": ""
                    },
                    "totalPriceInclVat": {
                        "type": "number",
                        "description": "Total price of document incl vat.",
                        "format": "double"
                    }
                },
                "additionalProperties": false,
                "description": "Invoicing payment state change message for service bus."
            }
        }
    }
}
