Metoda zwraca subskrybentów o danym adresie e-mail
Wywołanie
1 2 3 4 5 6 7 8 |
POST https://getall.pl/api/ Array ( [key] => {klucz api} [method] => ResponderSearchSubscriber [email] => {E-mail szukanego subskrybenta} ) |
Zwracane dane w formacie JSON
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
Array ( [0] => Array ( [id] => {Identyfikator subskrybenta} [listid] => {Identyfikator listy} [email] => {E-mail} [name] => {Imię} [status] => {Status subskrybenta} // confirmed - potwierdzony // unsubscribed - wypisany // waiting - oczekujący na potwierdzenie [datetime] => {Data i czas zapisu na listę} ) ... [status] => {Status odpowiedzi: 'ok' lub 'bad'} [error] => {Przyczyna błędu, jeśli wystąpił} ) |
Przykład wywołania metody
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
<?php /** * Getall.pl Test API method * * @author Getall.pl * @copyright Getall.pl * @version 1.0 * @since 2015-09-15 */ include('getall.api.class.php'); // Klucz API $api_key = 'WSTAW SWÓJ KLUCZ API'; $getall = new GetAll($api_key); $request = array( "email" => 'SZUKANY E-MAIL' ); $subscribers = $getall -> ResponderSearchSubscriber($request); if($subscribers -> status == 'ok') { for($i=0;$i<count($subscribers -> data);$i++) { echo $subscribers -> data[$i] -> email.'<BR>'; echo $subscribers -> data[$i] -> listid.'<BR>'; } } else echo $subscribers -> error; ?> |
Pobierz klasę PHP do API Opisy błędów Uzyskaj klucz do API