Send an invoice

Every invoice has a status property that describes the current stage of it's life cycle.

A-Cube accepts invoice only if it has been properly validated agains XSD Schema and additional business logic layer. If its not valid - there is an instant information provided with detailed information about the error. Read more about Validation

After successfull validation, Invoice is stored in A-Cube secure space and forwarded to KSeF.

Invoice Status Description
in_queue Invoice has been validated against the XSD schema and uploaded to A-Cube.
processing Invoice has been sent from to KSeF
valid Invoice has been accepted by KSeF and KSeF Reference Number and Time
invalid Invoice has been rejected by 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:

Copy
Copied
"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

Copy
Copied
{
  "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

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