Skip to content

Kurt

My feedback

2 results found

  1. 1 vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    4 comments  ·  Developers » API  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    An error occurred while saving the comment
    Kurt commented  · 

    I know this question is old but I thought I would post my solution, for anyone who might need a head start writing code. First of all, W.A. has posted some code examples on github that are very helpful. I recommend using them.

    I'm writing some PHP scripts, so the following snippet is based on the PHP example on github. It's a function that assembles the query parameters and returns the newest users based on the date provided. It's very simple. Should be easy to adapt this to any other language. Hope this helps someone.

    function getNewMemberList($accountUrl, $date, $async='false', $records=50, $offset=0) {
    global $waApiClient;

    $queryParams = array(
    '$async' => $async, // execute request synchronously
    '$skip' => $offset, // offset, for pagination
    '$top' => $records, // limit result set
    '$filter' => "'Creation date' ge " . $date . " AND ('Membership status' eq active OR 'Membership status' eq Pending - New)",
    '$select' => "Id, 'First name', 'Last name', Email, 'Member since', 'Manager email'"
    );

    $url = $accountUrl . '/Contacts/?' . http_build_query($queryParams);
    return $waApiClient->makeRequest($url);
    }

  2. 4 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Developers » API  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    Kurt supported this idea  · 

Feedback and Knowledge Base