Deletes an invoice line item. Automatically recalculates invoice totals after deletion.
array (
// === REQUIRED ===
[ 'idItem' ] = string, // Item ID (32 char GUID from createInvoiceItem)
)
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 item $params = array(); $params['idItem'] = 'ABCD1234EFGH5678IJKL9012MNOP3456'; $ret = $udds->deleteInvoiceItem($params); // $ret['status'] == 'OK' on success // $ret['idItem'] = deleted item ID // $ret['idInvoice'] = parent invoice ID // $ret['deletedItemName'] = name of the deleted item
{
"status": "OK",
"idItem": "ABCD1234EFGH5678IJKL9012MNOP3456",
"idInvoice": "00000004M1G221031126JF1B44ASNQ6D",
"deletedItemName": "Usługa konsultingowa",
"errors": []
}
{
"status": "ERROR",
"errors": [
{ "code": 1002, "message": "Pozycja o ID 'XXX' nie istnieje" }
]
}
| Code | Description |
|---|---|
| 1001 | Missing idItem parameter |
| 1002 | Item not found |
| 1003 | Invoice not found (parent invoice deleted?) |
| 1004 | Invoice already sent to KSEF (cannot modify) |
| 1007 | Database error |