v1

latestOpenAPI 3.1.0Terms of services for Altera.app2026-07-13146285.1 KB
Sales

Create/update invoice

post/sales/invoice

Request body

overrideboolean

Defines whether we wish to override split payments warning, in Machine-machine integrations should be set to true

sendToKSEFboolean

Submit the invoice to KSeF during save.

additionalDetailsstring

Describes extra information that we wish to present on the invoice

correctionReasonstring

Additional information regarding the reason behing correcting your invoice

Example request

{
  "modelType": "INVOICE",
  "override": false,
  "basicInformation": {
    "invoiceType": "SALES",
    "invoiceFormat": "%N/%M/%Y",
    "saleDate": "2022-10-11T00:00:00.000Z",
    "issueDate": "2022-10-11T00:00:00.000Z",
    "isReceipt": false,
    "relatedInvoicesIds": [],
    "priceTypeId": "NET",
    "statusId": "DRAFT"
  },
  "contractor": {
    "contractorRegion": "POLAND",
    "country": "PL",
    "contractorType": "COMPANY",
    "contractorName": "Test działania",
    "street": "Testowa",
    "houseNumber": "10",
    "flatNumber": "10",
    "city": "Bydgoszcz",
    "postCode": "62-156",
    "defaultCurrency": "PLN",
    "taxIdentificationNumber": "1589651654",
    "email": "testing@attention.please",
    "areaNumber": "+58",
    "phoneNumber": "518 961 516"
  },
  "invoicePosition": [
    {
      "productPosition": 0,
      "productName": "A",
      "positionType": "PRODUCT",
      "productCategory": "Health",
      "quantity": 10,
      "unit": "szt.",
      "unitNetPrice": 150,
      "unitGrossPrice": 184.5,
      "vat": "23%",
      "pkwiu": "",
      "discount": "0",
      "deductions": false,
      "netPrice": "1500",
      "grossPrice": "1845",
      "invoiceProductId": 179
    }
  ],
  "additionalDetails": "",
  "correctionReason": "",
  "payments": {
    "isPaid": false,
    "paymentMethod": "TRANSFER",
    "dueDate": "2022-10-25T00:00:00.000Z",
    "bankAccountNumber": "10 1010 1062 5565 1561 5615 1516",
    "isSplitPayment": false
  }
}

Response

OK

result'OK'

Example response

{
  "result": "OK",
  "data": {
    "invoiceId": 12413
  }
}