7.3 Revise (updating an existing slip)

POST {base_url}/api/v1/integ/invoices — the body is a list. Each element carries the same fields as bill; in addition, idInv (the slip to revise) is required. The old slip is closed and a new slip linked to it is created in its place; the slip type is taken from the old slip. For non-order types, a new invoiceNumber must be sent.

[ { "idInv": 605090001, "distCode": "1001", "centralCode": "C1001", "invoiceNumber": "SIP-778", "items": [ { "metaCode": "P100", "amount": 8, "idUnit": 2, "unitPrice": 120, "unitKdvRat": 0.18 } ] } ]

The response is a list with a separate result for each element; data.idInv is the ID of the new slip. If any element fails, the response is 400, but successful elements remain saved. If idInv is missing, IDInv value must be sent! is returned; if it is not found, Invoice is not found: <id> is returned.