Deletes an invoice along with all its line items. This operation is permanent and cannot be undone.
array (
// === REQUIRED ===
[ 'idInvoice' ] = string, // Invoice ID (32 char GUID)
)
require_once ( 'classUddsOx.php' ) ; $udds = new classUddsOx ; $udds->customerCode = [your_customerCode] ; $udds->login = [your_login] ; $udds->password = [your_password] ; $udds->serverUrl = 'http://api.dlaoperatora.pl/udds/' ; // Delete invoice $params = array(); $params['idInvoice'] = '00000004M1G221031126JF1B44ASNQ6D'; $ret = $udds->deleteInvoice($params); // $ret['status'] == 'OK' on success // $ret['idInvoice'] = deleted invoice ID // $ret['deletedInvoiceNumber'] = invoice number (e.g., "0001/01/2026") // $ret['deletedItemsCount'] = number of items that were deleted
{
"status": "OK",
"idInvoice": "00000004M1G221031126JF1B44ASNQ6D",
"deletedInvoiceNumber": "0001/01/2026",
"deletedItemsCount": 3,
"errors": []
}
{
"status": "ERROR",
"errors": [
{ "code": 1003, "message": "Nie można usunąć faktury wysłanej do KSEF (numer: 1234-5678-90)" }
]
}
| Code | Description |
|---|---|
| 1001 | Missing idInvoice parameter |
| 1002 | Invoice not found |
| 1003 | Invoice already sent to KSEF (cannot delete) |
| 1007 | Database error |