Skip to content

List of Sent SMS and Emails

Methods

GET /api/email/list

GET /api/sms/list

Possible parameters for filtering
clientId - nullable | int
mobilePhone - nullable | string (filtered using **LIKE** method)
email - nullable | string (filtered using **LIKE** method)
dateFrom - nullable | date ISO8601 (filtered by **time_to_send** field)
dateTo - nullable | date ISO8601 (filtered by **time_to_send** field)
perPage - nullable | int (default - 10)
page - nullable | int

Response Examples

Email

json
{
  "status": "ok",
  "timestamp": 1611438895000,
  "data": {
    "data": [
      {
        "id": 22,
        "title": "Просрочка 17",
        "clientId": 123,
        "email": "test@test.com",
        "message": "",
        "sent": true,
        "whenToSend": "2021-01-16T18:17:21+00:00",
        "sentAt": "2021-01-16T18:24:11+00:00",
        "createdAd": "2021-01-16T18:17:21+00:00",
        "updated_at": "2021-01-16T18:24:11+00:00"
      }
    ],
    "links": {
      "first": "{{url}}/api/email/list?email=test%40test.com&page=1",
      "last": "{{url}}/api/email/list?email=test%40test.com&page=1",
      "prev": null,
      "next": null
    },
    "meta": {
      "current_page": 1,
      "from": 1,
      "last_page": 1,
      "path": "{{url}}/api/email/list",
      "per_page": 10,
      "to": 1,
      "total": 1
    }
  }
}

Sms

json
{
  "status": "ok",
  "timestamp": 1611439293000,
  "data": {
    "data": [
      {
        "id": 2191,
        "title": "",
        "clientId": 123,
        "mobilePhone": "70000000000",
        "message": "Вы не внесли оплату, пройдите по ссылке",
        "sent": true,
        "whenToSend": "2021-01-08T11:00:00+00:00",
        "sentAt": "2021-01-18T12:53:29+00:00",
        "createdAd": "2021-01-08T12:46:36+00:00",
        "updated_at": "2021-01-18T12:53:29+00:00"
      },
      {
        "id": 2192,
        "title": "",
        "clientId": 1234,
        "mobilePhone": "70000000000",
        "message": "Вы не внесли оплату, пройдите по ссылке",
        "sent": false,
        "whenToSend": "2021-01-08T11:00:00+00:00",
        "sentAt": "2021-01-18T12:53:29+00:00",
        "createdAd": "2021-01-08T12:46:36+00:00",
        "updated_at": "2021-01-18T12:53:29+00:00"
      }
    ],
    "links": {
      "first": "{{url}}/api/sms/list?mobilePhone=7000&page=1",
      "last": "{{url}}/api/sms/list?mobilePhone=7000&page=1",
      "prev": null,
      "next": null
    },
    "meta": {
      "current_page": 1,
      "from": 1,
      "last_page": 1,
      "path": "{{url}}/api/sms/list",
      "per_page": 10,
      "to": 2,
      "total": 2
    }
  }
}