Wild Apricot Update Invoices

We are trying to use the API to update invoices in Wild Apricot. We have been able to Void invoices and Delete invoices, but so far unable to update an invoice. For instance, update the memo for the invoice. Or update the cost on the invoice.

There isn’t a pre-defined Make connection for updating an invoice that we can tell. But there is a PUT in the API documentation that looks like what we should be using, along with the Make Wild Apricot “Make an API Call”.

Can someone please point us in the right direction? What information do we pass to WA to make an update for a particular invoiceid?

Thank you.

Hi @DanSanders

As they mention here in the documentation, you need make an API call from the WA module to update the invoice, since it is a PUT request, I think you need to send the invoice object to the endpoint, so just copy the entire sample code, and get rid of everything except order details and memo/notes, and in order details change the things you want, invoice object are difficult when there are multiple products involved

2 Likes

I see noone has really helped you with this excellent question and I had it on my bookmarks to get back to you. I made a small video for you to describe the solution since that is much faster than typing it out.

Here’s a sample payload you can adjust for your use to modify an invoice with the PUT to /accounts/{{accountID}}/invoices/{{invoiceID}}

    {
        "Id": {{invoiceID}},
        "DocumentNumber": "2000",
        "OrderType": "Undefined",
        "OrderDetails": [
            {
                "Value": 20,
                "Notes": "item 1",
                "OrderDetailType": "Unspecified",
                "Taxes": null
            },
            {
                "Value": 50,
                "Notes": "item 2",
                "OrderDetailType": "Unspecified",
                "Taxes": null
            }
        ],
        "Memo": "my private memo",
        "PublicMemo": "my public memo",
        "DocumentDate": "2022-12-16T14:40:11+00:00",
        "CreatedDate": "2022-12-16T14:40:11"
    }
2 Likes

3 posts were split to a new topic: Voiding invoices in Wild Apricot using the generic API call

Thank you Alex! I didn’t see your response until today when I was faced with updating invoices again. I’m going to try this out and update what happens. Not sure about the last part you were talking about, not able to keep the data from the invoice that needs updated/line added, I’m going to see what happens when I attempt to add a line to an existing invoice.

THANK YOU AGAIN!

I have tried this solution this morning and have been able to insert new line items on an invoice. I think I understand now why you were saying that I’ll need to save the data for the lines that were already on the invoice. It wipes all line when adding another line.

This scenario is basically outlining what is required: Simply add a late fee line to any outstanding invoices.

My plan is to gather the data and iterate through it and add the line that currently exists and then add the second line with the late fee.

Of course this could be used for other scenarios where you want to add a line to an existing invoice.

Thank you again @alex.newpath , this really helped us out.

3 Likes

Yup if you add late fees to an invoice you’ll need to store the existing line items and add them with your late fees when updating the invoice. Otherwise the PUT will just add the late fees and erase the other items. Glad this helped.

3 Likes