ANTS API SPECIFICATION
English v1.0.0
English v1.0.0
  • INTRODUCTION
  • ACCOUNT
  • SMS
    • Send Message
    • Callback Delivery Report
    • Message Logs
    • Preview Message
    • Sender List
    • Status and Error codes
  • OTP (One Time Password)
  • SMS 2 WAY Interactive
Powered by GitBook
On this page

Was this helpful?

  1. SMS

Message Logs

This method allows you to get logs for sent SMS.

PreviousCallback Delivery ReportNextPreview Message

Last updated 5 years ago

Was this helpful?

This Logs API will show the details of destination, messages sent, status, and reason. Records can be shown up to 30,000 latest transactions within 48 hours.

Sequence Diagram

You can start creating HTTP request as this following:

Header

Description

HTTP Request (URL)

HTTP Headers

Content-Type: application/json

Authorization: (Basic Auth) Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==

HTTP Methods

GET

Parameters

Type

Description

bulkId

String

The ID which uniquely identifies the request. Bulk ID will be received only when you send a message to more than one destination address.

messageId

String

The ID that uniquely identifies the message sent.

mobile

String

The destination mobile number for your message

sendDateStart

String

Lower limit on date and time of sending SMS.

sendDateEnd

String

Upper limit on date and time of sending SMS.

Sample Request (method : Get)

HTTP Request (URL): https://api-service.ants.co.th/sms/loginfo?
senddate_start=2019-05-27T14:39:00.00&senddate_end=2019-05-27T15:04:39.64

Message Logs Response

Parameters

Type

Description

bulkId

String

The ID that uniquely identifies the request. Bulk ID will be received only when you send a message to more than one destination address

details

Array

Set of logs information

messageId

String

The ID that uniquely identifies the message sent.

to

String

The destination mobile number for your message.

from

String

Represents a sender ID which can be alphanumeric or numeric (maximum 11 characters, space is not allowed. Example: from = ANTS

text

String

Text of the message that will be sent.

credit

Decimal

SMS credit usage.

sendDate

String

Date and time when the message is to be sent. Used for scheduled SMS (not sent immediately, but at scheduled time).

doneDate

String

Tells when the SMS was finished processing by our system/network operator system (ie. delivered to destination network, delivered, etc.)etc.)

status

String

Indicates whether the message is successfully sent, not sent, delivered, not delivered, waiting for delivery or any other possible status.

code

String

Code ID of return status.

name

StringN

Name of return status.

description

String

Description of return status.

The response will look like:

[
    {
      "bulkId": "898319fa-34f0-49b7-a3b0-4235cc716a1f",
      "details": [
                {
	              "messageId": "25501288135972440649",
                "to": "66123456789",
                "from": "ANTS",
                "text": "เชิญชวนร่วมกิจกรรม วิ่งการกุศล ANTS มาราธอน",
                "credit": 1.00,
                "sendDate": "2019-05-27T14:39:40.273",
                "doneDate": "2019-05-27T14:40:09.44",
                "status": {
                    "code": "000",
                    "name": "DELIVERED",
                    "description": "Successfully sent to phone"
                    }
                },
                {
	              "messageId": "25501288135972440649",
                "to": "66112233445",
                "from": "Verify",
                "text": "เชิญชวนร่วมกิจกรรม วิ่งการกุศล ANTS มาราธอน",
                "credit": 1.00,
                "sendDate": "2019-05-27T14:39:49.383",
                "doneDate": "2019-05-27T14:40:09.66",
                "status": {
                    "code": "000",
                    "name": "DELIVERED",
                    "description": "Successfully sent to phone"
                    }
                }
        ]
    }
]

You must input at least 1 parameter. If it is a date; start and end date is required

❗
https://api-service.ants.co.th/sms/loginfo
Sequence Diagram (API Loginfo)