Skip to main content

Update [POST]

https://api.neuro-admin.com/invoice/update[POST]

The update can be used on objects that only have status "draft".

Pay attention: datas not passed will be reset or delete in case of invoice rows.

invoice_id String The invoice_id in the creation response
currency_id String EUR, SEK, USD… etc
invoice_date (optional) String The invoice date (if not have will get the sending date)
due_date (optional)
String The due date
client_data (optional) object * The client data as name, address, ... and where to send and how
invoice_rows (optional) array of object ** Array with invoice row object (item, description, quantity, unitCost, tax)

* client data object structure:

    {
        "name": "Test client 01", // (string) optional
        "address_line1": "Street Nowhere, 3", // (string) optional
        "address_line2": null, // (string) optional
        "zip_code": "12345", // (string) optional
        "city": "My City", // (string) optional
        "country": "My Country", // (string) optional
        "vat_number": "123456798", // (string) optional
        "sendVia": "Email", // (string) optional (only one of the following: "Email" or "Sms")
        "sendTo": "johndoe@test.com" // (string) optional
    }

** array of object containing the datas for every invoice row

        {
            "invoice_row_id": "c24fre56th23.......", // (string) optional but mandatory if you want to change or confirm a row, if not                                         presents means that is a new row
            "item": "Item name", // (string) optional but mandatory if not have description
            "description": "description", // (string) optional but mandatory if not have item
            "quantity": 3.1, // (float) optional
            "unitCost": 10.50, // (float) optional
            "tax": 12 // (float) optional
        }


image.png

This example confirms all the data and add a new row (one without "invoice_row_id")