Détails d'une campagne

Cette méthode vous permet de récupérer une campagne spécifique.

GET

/campaign/:id

Paramètres de requête

id
requis
L'id de campagne

Exemples


GET /campaign/18969398 HTTP/1.1
Host: api.smsfactor.com
Accept: application/json
Authorization: Bearer your.token
      
    

Format de la réponse


{
    "status": 1,
    "message": "OK",
    "campaign": [
        {
            "id": "18969398",
            "sender": "BESTSHOES",
            "text": "Special offer : Buy one shoe and get the second one for free",
            "creation_date": "2024-05-15 10:18:21",
            "date": "2024-05-15 10:18:21",   //Sending date
            "cost": "2128",                 //The cost of your campaign
            "lists": [                      //The ids of the lists you used to send
                {
                    "id": "12345"
                },
                {
                    "id": "45742"
                }
            ],
            "status": "Sent",
            "delivery_rate": "100",
            "delivered": "1958",
            "error": "0",`                  //Number of SMS in error (from operators)
            "expired": "0",                 //Number of SMS expired (from operators)
            "network_error": "0",           //Number of SMS in error (from operators)
            "stop": "0",                    //Number of stop replies
            "npai": "0"                     //Number of npai numbers
            "total": "1958"                 //Number of message before filtering
        }
    ]
}
          
        

<?xml version="1.0" encoding="UTF-8"?>
<response>
    <status>1</status>
    <message>OK</message>
    <campaign>
        <id>18969398</id>
        <sender>BESTSHOES</sender>
        <text>Special offer : Buy one shoe and get the second one for free</text>
        <creation_date>2024-05-15 10:18:21</creation_date>
        <date>2024-05-15 10:18:21</date>
        <cost>2128</cost>
        <lists>
            <id>12345</id>
        </lists>
        <lists>
            <id>45742</id>
        </lists>
        <delivery_rate>100</delivery_rate>
        <delivered>1958</delivered>
        <error>0</error>
        <expired>0</expired>
        <network_error>0</network_error>
        <stop>0</stop>
        <npai>0</npai>
        <total>1958</total>
    </campaign>
</response>
        
      

Statuts

status Description
Sent Le message a été envoyé.
Waiting Le message est en attente d'envoi (campagne programmée dans le futur).
In progress Le message est en cours d'envoi.
In moderation Le message est en cours de modération. Une action humaine est nécessaire pour valider ou rejeter (en cas de fraude) le message.
Denied Le message a été refusé.