Modifier un contact
- Home
- Modifier un contact
Modifier un contact
URL
POST http://api.smspartner.fr/v1/contact/update
Paramètres
Chaque demande d’API prend en charge les paramètres suivants :
apiKey | Clé API de votre compte. Vous l’obtenez dans votre compte SMS Partner. |
---|---|
contactId | Identifiant du contact à modifier |
phoneNumber | Numéro de téléphone du contact.
Pour l’envoi de plusieurs SMS les numéros doivent être séparés par des virgules. Ils peuvent être :
|
firstname | Prénom (32 caractères maximum) |
lastname | Nom (32 caractères maximum) |
date | Date au format YYYY-MM-DD. Pourra être utilisé pour des envois automatique (ex: anniversaire ) |
url | Url , elle doit commencer par http:// ou https:// |
custom1 | Champ personnalisé 1 |
custom2 | Champ personnalisé 2 |
custom3 | Champ personnalisé 3 |
custom4 | Champ personnalisé 4 |
Requête
Exemple de requête :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
<span style="font-weight: 400;">curl --location --request POST 'http://api.smspartner.fr/v</span><span style="font-weight: 400;">1</span><span style="font-weight: 400;">/contact/update' \</span> <span style="font-weight: 400;">--header 'Content-Type: application/json' \</span> <span style="font-weight: 400;">--data-raw '{</span> <span style="font-weight: 400;"> "apiKey": </span><span style="font-weight: 400;">"YOUR_API_KEY"</span><span style="font-weight: 400;">,</span> <span style="font-weight: 400;"> "contactId": </span><span style="font-weight: 400;">"ID CONTACT"</span><span style="font-weight: 400;">,</span> <span style="font-weight: 400;"> "contact":{</span> <span style="font-weight: 400;"> "phoneNumber": </span><span style="font-weight: 400;">"+xxxxxxxxx"</span><span style="font-weight: 400;">,</span> <span style="font-weight: 400;"> "firstname": </span><span style="font-weight: 400;">"prénom"</span><span style="font-weight: 400;">,</span> <span style="font-weight: 400;"> "lastname":</span><span style="font-weight: 400;">"nom"</span><span style="font-weight: 400;">,</span> <span style="font-weight: 400;"> "url":</span><span style="font-weight: 400;">""</span><span style="font-weight: 400;">,</span> <span style="font-weight: 400;"> "date": </span><span style="font-weight: 400;">"12-06-2020"</span><span style="font-weight: 400;">,</span> <span style="font-weight: 400;"> "custom2": </span><span style="font-weight: 400;">"custom2"</span> <span style="font-weight: 400;"> }</span> <span style="font-weight: 400;">}'</span> |
Réponses
1 2 3 4 5 6 7 8 9 10 11 12 13 |
<span style="font-weight: 400;">{</span> <span style="font-weight: 400;"> "success": </span><span style="font-weight: 400;">true</span><span style="font-weight: 400;">,</span> <span style="font-weight: 400;"> "code": </span><span style="font-weight: 400;">200</span><span style="font-weight: 400;">,</span> <span style="font-weight: 400;"> "contact": {</span> <span style="font-weight: 400;"> "phoneNumber": </span><span style="font-weight: 400;">"+xxxxxxxx"</span><span style="font-weight: 400;">,</span> <span style="font-weight: 400;"> "firstname": </span><span style="font-weight: 400;">"prénom"</span><span style="font-weight: 400;">,</span> <span style="font-weight: 400;"> "lastname": </span><span style="font-weight: 400;">"nom"</span><span style="font-weight: 400;">,</span> <span style="font-weight: 400;"> "url": </span><span style="font-weight: 400;">""</span><span style="font-weight: 400;">,</span> <span style="font-weight: 400;"> "date": </span><span style="font-weight: 400;">"12-06-2020"</span><span style="font-weight: 400;">,</span> <span style="font-weight: 400;"> "custom2": </span><span style="font-weight: 400;">"custom2"</span><span style="font-weight: 400;">,</span> <span style="font-weight: 400;"> "contactId": </span><span style="font-weight: 400;">"ID CONTACT"</span> <span style="font-weight: 400;"> }</span> <span style="font-weight: 400;">}</span> |
Erreurs
Exemple de message d’erreur :
1 2 3 4 5 |
<span style="font-weight: 400;">{</span> <span style="font-weight: 400;">"success": </span><span style="font-weight: 400;">false</span><span style="font-weight: 400;">,</span> <span style="font-weight: 400;">"code": </span><span style="font-weight: 400;">10</span><span style="font-weight: 400;">,</span> <span style="font-weight: 400;">"message": </span><span style="font-weight: 400;">"Clef API incorrecte"</span> <span style="font-weight: 400;">}</span> |
Code de contrôle
Code erreurs | ||
---|---|---|
1 | contactId est requis | |
2 | Les infos du contact sont requises | |
10 | La Clé API est requise | |
15 | Le numéro est déjà dans le groupe |
© 2014 - 2023 NDA MEDIA. Tous droits réservés. Mentions légales