API Documentation?

Discussion in 'General discussions' started by americanmailprofits, Oct 20, 2018.

Tags:
  1. americanmailprofits

    americanmailprofits New Member

    Joined:
    Jul 5, 2016
    Messages:
    3
    Likes Received:
    0
    S.E:
    Expired
    L.T:
    Regular
    L.C:
    1
    HI!

    I'm looking for any documentation for the API, Where might one find these?
     
  2. twisted1919

    twisted1919 Administrator Staff Member

    Joined:
    Dec 27, 2014
    Messages:
    9,697
    Likes Received:
    2,268
  3. americanmailprofits

    americanmailprofits New Member

    Joined:
    Jul 5, 2016
    Messages:
    3
    Likes Received:
    0
    S.E:
    Expired
    L.T:
    Regular
    L.C:
    1
    Perfect...
    Thank you!
     
  4. BackOffice

    BackOffice New Member

    Joined:
    Oct 5, 2018
    Messages:
    14
    Likes Received:
    1
    S.E:
    2019-04-05 03:14:04
    L.T:
    Regular
    L.C:
    1
    Hello,
    I was not able to find Campaign -> Setup -> Show More functions for API.
    Example:
    Actions against subscribers upon campaign open - > Move to list ("Opened")

    there are lots of other
    useful option in there.
     
  5. twisted1919

    twisted1919 Administrator Staff Member

    Joined:
    Dec 27, 2014
    Messages:
    9,697
    Likes Received:
    2,268
    @BackOffice - That's true, the API just scratches the surface, offers basic functionality, doesn't go in all the details as it would make the api usage almost impossible given the amount of params you'd have to pass.
     
  6. BackOffice

    BackOffice New Member

    Joined:
    Oct 5, 2018
    Messages:
    14
    Likes Received:
    1
    S.E:
    2019-04-05 03:14:04
    L.T:
    Regular
    L.C:
    1
    Yes but it is very important to have essential parameters like 'Actions against subscribers upon campaign open'.
    for further actions i need to segregate people which opened the email from the ones who didn't by spreading them to different lists.
    and honestly i really don't understand how adding additional parameters will make API impossible to use ? people will just use functions which they need.

    there is a reason why we have those options in GUI right?
     
  7. viotaliy

    viotaliy New Member

    Joined:
    Sep 2, 2018
    Messages:
    14
    Likes Received:
    1
    S.E:
    Expired
    L.T:
    Regular
    L.C:
    5
    I just started learning Mailwizz. I'm looking for step by step documentation for the API.
    Do I need to install Compozer for the API to work? If my provider does not support installing Compozer, how to work with API?
     
  8. twisted1919

    twisted1919 Administrator Staff Member

    Joined:
    Dec 27, 2014
    Messages:
    9,697
    Likes Received:
    2,268
    viotaliy likes this.
  9. viotaliy

    viotaliy New Member

    Joined:
    Sep 2, 2018
    Messages:
    14
    Likes Received:
    1
    S.E:
    Expired
    L.T:
    Regular
    L.C:
    5
    Thanks a lot!
     
  10. viotaliy

    viotaliy New Member

    Joined:
    Sep 2, 2018
    Messages:
    14
    Likes Received:
    1
    S.E:
    Expired
    L.T:
    Regular
    L.C:
    5
    I configured, but not working. I deleted the line: exit('COMMENT ME TO TEST THE EXAMPLES!');
    What did I wrong do? I get this text:
    MailWizzApi_Params Object
    (
    [_data:MailWizzApi_Params:private] => Array
    (
    [status] => error
    [error] => Could not resolve host: www.mailwizz-powered-website.tld; Name or service not known
    )

    [_readOnly:MailWizzApi_Params:private] =>
    )
     
  11. viotaliy

    viotaliy New Member

    Joined:
    Sep 2, 2018
    Messages:
    14
    Likes Received:
    1
    S.E:
    Expired
    L.T:
    Regular
    L.C:
    5
    apiUrl was wrong. I deleted the "tld" in the address, now get:
    MailWizzApi_Params Object
    (
    [_data:MailWizzApi_Params:private] => Array
    (
    [status] => error
    [error] => Customer creation is disabled.
    )

    [_readOnly:MailWizzApi_Params:private] =>
    )
    Where to enable permission to create new subscribers?
     
  12. viotaliy

    viotaliy New Member

    Joined:
    Sep 2, 2018
    Messages:
    14
    Likes Received:
    1
    S.E:
    Expired
    L.T:
    Regular
    L.C:
    5
    Nothing happens if I use the code:
    // ADD SUBSCRIBER
    $response = $endpoint->create('LIST-UNIQUE-ID', array(
    'EMAIL' => 'email@info.com', // the confirmation email will be sent!!! Use valid email address
    'FNAME' => 'John',
    'LNAME' => 'Doe'
    ));

    // DISPLAY RESPONSE
    echo '<hr /><pre>';
    print_r($response->body);
    echo '</pre>';
     
  13. twisted1919

    twisted1919 Administrator Staff Member

    Joined:
    Dec 27, 2014
    Messages:
    9,697
    Likes Received:
    2,268
    Instead of LIST-UNIQUE-ID use your actual email list unique id.
     
  14. viotaliy

    viotaliy New Member

    Joined:
    Sep 2, 2018
    Messages:
    14
    Likes Received:
    1
    S.E:
    Expired
    L.T:
    Regular
    L.C:
    5
    Yes, I did that. I wrote my actual email list unique id. There are no errors, but no new subscribers are created.
     
  15. twisted1919

    twisted1919 Administrator Staff Member

    Joined:
    Dec 27, 2014
    Messages:
    9,697
    Likes Received:
    2,268
    I see. While i check on our end, what is the output of the print_r statement from your above example:
    ^
     
  16. viotaliy

    viotaliy New Member

    Joined:
    Sep 2, 2018
    Messages:
    14
    Likes Received:
    1
    S.E:
    Expired
    L.T:
    Regular
    L.C:
    5
    There is nothing.
    It work just before:
    // CREATE THE ENDPOINT
    $endpoint = new MailWizzApi_Endpoint_Customers();
     
    Last edited: Dec 3, 2018
  17. laurentiu

    laurentiu Member Staff Member

    Joined:
    Mar 13, 2018
    Messages:
    160
    Likes Received:
    20
    @viotaliy - To add subscribers you need to use $endpoint = new MailWizzApi_Endpoint_ListSubscribers();
     
    viotaliy likes this.
  18. viotaliy

    viotaliy New Member

    Joined:
    Sep 2, 2018
    Messages:
    14
    Likes Received:
    1
    S.E:
    Expired
    L.T:
    Regular
    L.C:
    5
    Great. It works! Thank you!
    I get the text: [_readOnly: MailWizzApi_Params: private] =>
    I can not delete the subscriber. What needs to be configured?
     
  19. laurentiu

    laurentiu Member Staff Member

    Joined:
    Mar 13, 2018
    Messages:
    160
    Likes Received:
    20
    @viotaliy - You have two option
    PHP:
    // CREATE THE ENDPOINT
    $endpoint = new MailWizzApi_Endpoint_ListSubscribers();
    // DELETE SUBSCRIBER, no email is sent, delete is silent
    $response $endpoint->delete('LIST-UNIQUE-ID''SUBSCRIBER-UNIQUE-ID');
    // DISPLAY RESPONSE
    echo '<hr /><pre>';
    print_r($response->body);
    echo 
    '</pre>';
    /*===================================================================================*/ 
    // DELETE SUBSCRIBER by email address, no email is sent, delete is silent
    $response $endpoint->deleteByEmail('LIST-UNIQUE-ID''john@doe.com');
    // DISPLAY RESPONSE
    echo '<hr /><pre>';
    print_r($response->body);
    echo 
    '</pre>';
     
  20. laurentiu

    laurentiu Member Staff Member

    Joined:
    Mar 13, 2018
    Messages:
    160
    Likes Received:
    20

Share This Page