Skip to main content

Send an invoice

Every invoice has a status property that describes the current stage of its life cycle.

A-Cube accepts an invoice only if it has been properly validated against the KSeF FA (3) Schema and additional business logic layer. If its not valid - there is an instant information provided with detailed information about the error. After successfull validation, the invoice is stored in A-Cube's secure space and forwarded to KSeF.

The invoice with in_queue status will be sent to KSeF in hourly intervals.

There are a few fields that are related to KSeF processing:

"ksefReferenceNumber": "8431324763-20221010-C2EE39-1AC5D0-06", - Special Number assigned by KSeF
"acquisitionTimestamp": "2022-10-10 12:53:32" - Acquisition time at KSeF

Sample Invoice upload

POST /invoices

{
"Naglowek": {
"KodFormularza": {
"__value": "FA",
"kodSystemowy": "FA (3)",
"wersjaSchemy": "1-0E"
},
"WariantFormularza": "3",
"DataWytworzeniaFa": "2025-09-14T12:46:25+00:00"
},
"Podmiot1": {
"DaneIdentyfikacyjne": {
"NIP": "9999999999",
"Nazwa": "Sender"
},
"Adres": {
"KodKraju": "PL",
"AdresL1": "Testowa"
},
"Telefon": []
},
"Podmiot2": {
"DaneIdentyfikacyjne": {
"BrakID": "1"
},
"JST": "2",
"GV": "2",
"Adres": {
"KodKraju": "PL",
"AdresL1": "Testowa"
},
"Telefon": []
},
"Podmiot3": [],
"Fa": {
"KodWaluty": "PLN",
"P_1": "2022-01-01",
"P_2": "FV\/2025\/09\/14\/12\/46\/25",
"WZ": [],
"P_13_1": 7700.0,
"P_14_1": 2300.0,
"P_15": 10000.0,
"Adnotacje": {
"P_16": "2",
"P_17": "1",
"P_18": "2",
"P_18A": "2",
"Zwolnienie": {
"P_19N": "1"
},
"NoweSrodkiTransportu": {
"NowySrodekTransportu": [],
"P_22N": "1"
},
"P_23": "1",
"PMarzy": {
"P_PMarzyN": "1"
}
},
"RodzajFaktury": "VAT",
"DaneFaKorygowanej": [],
"DaneFaKorygowanejPozaKSEF": [],
"Podmiot2K": [],
"P_6Z": [],
"P_15Z": [],
"KursWalutyZW": [],
"DodatkowyOpis": [],
"NrFaZaliczkowej": [],
"FaWiersz": []
}
}

CURL Example of invoice upload

curl --location --request POST 'https://pl.api.acubeapi.com/invoices' \
--header 'Authorization: Bearer $Token' \
--header 'Content-Type: application/xml' \
--data-raw '$XML_CONTENT'