Voiding invoices in Wild Apricot using the generic API call

Hi Alex and Dan, I’m trying to void invoices in WA using the generic api call. I can fetch the invoice so I know I’ve got the connection and authentication right. I’ve attached a screenshot of the module.


I’m getting a 404 error from the command.

I see the need for json in the body for updating, but I’m not sure what the void field name will be.

Thanks for any help you can give.
Cheers, Andrew

I just tried the following and it also gave a 404 error

I’ve just realised that my api key was set to read only. Now that I’ve changed it to full access the standard query string method works. Only wasted a day or so on banging my head against the wall!
Anyway best wishes, Andrew

1 Like

Heya @Andrew_Wootton welcome to the community :wave:

I just wanted to step in and say awesome work figuring this out on your own! And thanks so much for circling back to the community and sharing your solution with all of us. We 100% appreciate that. :clap:

Just FYI: I moved your question & replies to a separate topic and I am marking your last reply as a solution :white_check_mark:

Doh! Have you done anything else with wild apricot?

You might be interested in a Postman collection of the WA Admin API v2 – this can help you understand much more clearly what WildApricot expects, especially when you end up having to make a Make API Call module configuration. Let me know and I can share it.

Yes, I have had good success with sending out reminders for previous orders from the WA store. This is for insurance purchased for a year. I couldn’t get the startdate and enddate to work in the api command despite lots of efforts, so I retrieve all orders and then filter between two dates in Make. Then send an Gmail reminder to the purchaser. Works fantastically!

Thanks Alex, yes that would be great - might help me to work out the orders date command format (see my response to Dan).

Here’s the ADMIN WildApricot API JSON from Postman. You can import this URL into your Postman account.

The authorization has variable values which you can setup in an environment or just overwrite them with the known URLs and client ID and client secret keys

image

Note you will have to put an authorized URI into the WIldApricot authorized apps section:

https://www.getpostman.com/oauth2/callback

There is another post on [using Postman]Check out these useful API discovery resources - #11 by alex.newpath) here I believe.

1 Like

Hi Alex, thanks for this. I’ve set up the WA api in Postman and authorised Postman in WA, obtaining a client ID and secret.
I’m struggling with authorisation and would be very grateful for some help. Sorry I’m a bit of a novice at all this.

If I use Type API I should be able just to use my API key??

If I use OAuth 2.0 it requires the Auth URL which is (replacing myorganisation.wildapricot.org with my own domain URL) https://myorganization.wildapricot.org/sys/login/OAuthLogin
Access Token URL ?is this the same as Auth URL?
Client ID and Secret which I have
Then I should be able to set the Variable /accounts/accountId and it should be good to go?
Thanks in advance, Andrew
PS I’ve been able to archive old WA contacts using a WA saved search in Make which is really neat.

Ok here we go. WildApricot is using the oAuth 2.0 mechanism here so the api key is not used. Here are the necessary parameters :astronaut:

Ps. I am assuming you’re using the downloadable postman app and not using postman in a browser. The callback url for postman in a browser is different.

Authorize URL:
https://myorganization.wildapricot.org/sys/login/OAuthLogin

Replace the myorganization.wildapricot.org with your orgs primary domain setup in wildapricot

Access token URL:
Https://oauth.wildapricot.org/auth/token

Client ID and Client Secret you get from your authorized app.

Make sure the allowed redirect uri is set in the wildapricot authorized app to

https://www.getpostman.com/oauth2/callback

Otherwise postman won’t get the token response after successful authentication.

Once you have these encoded the. Click get new token and you will see the oAuth login screen popup. Provide a valid wa username and password and you should get a token.

There are multiple authentication schemes but I like the scheme “Using an authorization code” one best since it doesn’t require you to encode a username and password into postman to authenticate. You can authenticate with any username and password and get an authorization token for subsequent requests.

Here is the full description of each wildapricot authentication scheme:

1 Like

thanks Alex, really appreciate your help. I was pretty close as I had already set these parameters in the browser version of Postman. Anyway I have now tried the downloadable version with the different callback. Actually I think the 1st problem was that I hadn’t realised I needed to hit the “Get New Access Token” button. 2nd problem was that I hadn’t set the trusted redirect domain in Wild Apricot (its not very obvious!).
I’ve now got a token :slightly_smiling_face:
Onwards and upwards…

2 Likes

You’ve gotten oAuth to work! Knowing how to authenticate in apis is half the battle usually. Getting comfortable with the configuration is a good skills because other apis have similar modes of authentication.

If you have questions about the api in wildapricot let me know. We also provide live video conference support for make at this link. Make.com Hero - NewPath Consulting

For wild apricot hands on support we have https://newpathconsulting.com/hero

Stay well.

1 Like

I can see why your recommended Postman - very helpful. I used it to have another go at the WA store/orders GET with a start and enddate (see previous post 6/13 on May3 - but still it returns all the orders. I suspect that there’s a bug in the api rather than a date formatting entry problem. Doesn’t matter as I have a workaround using filters in Make, but interesting to know if that is the problem.
Cheers, AW

2 Likes

Did you confirm the input date format in terms of the start date and end date? I think it is YYYY-MM-DD

There are other endpoints like invoices that have these parameters and you can confirm the format there too.

Glad it is helpful. It is possible there’s a bug in the api but unlikely.

1 Like

The online orders used From and To as query params but I think you’re right. It’s not filtering the orders by date. I tried startdate and enddate too as parameters but those seem to be ignored too. Maybe open a ticket with their support team? I think there maybe something wrong there.

1 Like