Cette méthode sert à inscrire ou mettre un jour un contact.
Pour réinscrire un abonné afin qu'il puisse recevoir à nouveau votre séquence d'email :
- Supprimez cet abonné avec la méthode del_subscriber et le paramètre : motifdesabonnement -> 'api_sg'
- Ajoutez à nouveau les coordonnées de votre contact avec la méthode set_subscriber
- Pour forcer la date d'inscription :
- Mettre comme valeur pour le champ 15 : 'forcerladate' ( ->set('champs_15', 'forcerladate') )
- Mettre comme valeur pour le champ 16 : Votre date au format 'yyyy-mm-dd' ( ->set('champs_16', '1970-01-01') )
Champ | Type | Description |
---|---|---|
string | Adresse email à inscrire Paramètre requis |
|
listeid | integer | Liste de destination Paramètre requis |
prenom | string | Prénom de votre contact(Optionnel) |
nom | string | Prénom de votre contact(Optionnel) |
civilite | string | Civilité de votre contact(Optionnel) |
adresse | string | Adresse postale de votre contact(Optionnel) |
codepostal | integer | Code postal de votre contact(Optionnel) |
ville | string | Ville de votre contact(Optionnel) |
pays | string | Pays de votre contact(Optionnel) |
siteweb | string | Site web de votre contact(Optionnel) |
telephone | string | Téléphone fixe de votre contact(Optionnel) |
mobile | string | Téléphone mobile de votre contact(Optionnel) |
skype | string | Adresse skype de votre contact(Optionnel) |
pseudo | string | Pseudo de votre contact(Optionnel) |
datenaissance | string | Date de naissance de votre contact Type AAAA-MM-JJ(Optionnel) |
ip | string | Adresse IP de votre contact Paramètre requis Sinon, ce sera l'adresse IP de votre serveur qui sera enregistrée comme appartenant à votre contact. Hors, notre système de sécurité applique par défaut une restriction de 50 inscriptions par adresse IP (sauf dérogation exceptionnelle).(Optionnel) |
parrain | string | Parrain de votre contact(Optionnel) |
champs_1 | string | Champ personnalisé 1(Optionnel) |
champs_2 | string | Champ personnalisé 2(Optionnel) |
champs_3 | string | Champ personnalisé 3(Optionnel) |
champs_4 | string | Champ personnalisé 4(Optionnel) |
champs_5 | string | Champ personnalisé 5(Optionnel) |
champs_6 | string | Champ personnalisé 6(Optionnel) |
champs_7 | string | Champ personnalisé 7(Optionnel) |
champs_8 | string | Champ personnalisé 8(Optionnel) |
champs_9 | string | Champ personnalisé 9(Optionnel) |
champs_10 | string | Champ personnalisé 10(Optionnel) |
champs_11 | string | Champ personnalisé 11(Optionnel) |
champs_12 | string | Champ personnalisé 12(Optionnel) |
champs_13 | string | Champ personnalisé 13(Optionnel) |
champs_14 | string | Champ personnalisé 14(Optionnel) |
champs_15 | string | Champ personnalisé 15(Optionnel) |
champs_16 | string | Champ personnalisé 16(Optionnel) |
urlvisite | string | Provenance de votre contact (Optionnel) |
// Ajout de John Doe dans la liste 12345.
$sgApi
->set('listeid', 12345)
->set('nom', 'Doe')
->set('prenom', 'John')
->set('email', 'John.Doe@domain.ext')
->set('champs_1', 'test')
->set('ip', $_SERVER["REMOTE_ADDR"]);
$call = $sgApi->call('set_subscriber');