How can we make it easier for you to develop on top of Wild Apricot?

API Help

I’ve been following your API v2 guides and snagged the PHP sample listed here:

https://github.com/WildApricot/ApiSamples/blob/master/PHP/sampleApplication.php

I was able to properly implement the getAccountDetails function and I created a getContactIdFromEmail function that tweaked the getContactsList function to filter on an email address.

Now I’m trying to update the FirstName of the Contact that I received. Here’s the code:

function updatePasswordByContactId($contactId, $email)

{

global $waApiClient;

global $accountUrl;

$url = $accountUrl . "/Contacts/Contact/{$contactId}";

$data = array("FirstName" => "Chaz2");

$result = $waApiClient->makeRequest($url, "PUT", $data);

return true;

}

I analyzed the CURL parameters to see that it is calling the URL:

https://api.wildapricot.org/v2/Accounts/73659/Contacts/Contact/25710546 ALID_CONTACT_ID

In a “PUT” with the following JSON data:

{"FirstName":"Chaz2"}

I tried using “First name”, “Email”, and “e-Mail” and nothing seems to work.

It simply will return an empty string which gets JSON decoded to NULL.

Help!

-Chaz

0 votes
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)

    We’ll send you updates on this idea

    tinskeytinskey shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →
    Resolved  ·  DmitryDmitry responded  · 

    The help has been updated.

    4 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...

      Feedback and Knowledge Base

      Wild Apricot Inc. 144 Front Street West Suite 725, Toronto, Ontario, Canada M5J 2L7