Invoice Validation
Every invoice submitted to A-Cube undergoes validation using the KSeF FA (3) Schema. Additionally, A-Cube enforces an extra set of checks, along with NIP verification through the official government validation service.
The mentioned validation logic is being applied when calling the following A-Cube API endpoints:
- Validate Invoice (POST /invoices/v3/validate)
- Send Invoice (POST /invoices/v3)
Any violation detected during sending the invoice to A-Cube will return detailed information like in the example below.
Example with incorrect Legal Entity data
{
"type": "https://tools.ietf.org/html/rfc2616#section-10",
"title": "An error occurred",
"detail": "podmiot1.daneIdentyfikacyjne.NIP: Legal Entity not found for NIP 1234567890",
"violations": [
{
"propertyPath": "podmiot1.daneIdentyfikacyjne.NIP",
"message": "Legal Entity not found for NIP 1234567890",
"code": null
}
]
}
Example with data incompatible with schema
{
"type": "https://tools.ietf.org/html/rfc2616#section-10",
"title": "An error occurred",
"detail": "podmiot1.daneIdentyfikacyjne.pelnaNazwa: This value is too short. It should have 1 character or more.",
"violations": [
{
"propertyPath": "podmiot1.daneIdentyfikacyjne.pelnaNazwa",
"message": "This value is too short. It should have 1 character or more.",
"code": "9ff3fdc4-b214-49db-8718-39c315e33d45"
}
]
}