# Bulk SMS API Documentation

## Copyright

Copyright © SIX DEE Telecom Solutions Pvt. Ltd. 2020. All rights reserved. The information in this document is subject to change without notice and describes only the product defined in the introduction of this documentation. This document is intended for the use of 6d customers only for the purposes of the agreement under which the document is submitted, and no part of it may be reproduced or transmitted in any form or means without the prior written permission of 6d. The document has been prepared to be used by professional and properly trained personnel, and the customer assumes full responsibility when using it.

This document and the product it describes are considered protected by copyright according to the applicable laws.

## Disclaimer

The information or statements given in this document concerning the suitability, capacity, or performance of the mentioned hardware or software products cannot be considered binding but shall be defined in the agreement made between 6d and the customer. However, 6d has made all reasonable efforts to ensure that the instructions contained in the document are adequate and free of material errors and omissions. 6d will, if necessary, explain issues, which may not be covered by the document.

## Feedback

6d welcomes customer comments as a part of the process of continuous development and improvement of the documentation.

## Trademarks and Registered Trademarks

Products and product names mentioned in this document may be trademarks or registered trademarks of their individual proprietors.

## 1. Bulk SMS API

This API can be used for scheduling campaigns from REST API.

**Method:** POST

**End-Point:** [To be specified]

## 2. Request Parameters

| Field Name    | Description                                                       | Type      |
|---------------|-------------------------------------------------------------------|-----------|
| `$timeStamp`  | Timestamp of Request. Same is echoed back in response.            | String(M) |
| `$dataSet`    | Data of individual request, supports multiple requests if required. | M         |

`$dataSet` should have the following mandatory/conditional tags in JSON format:

| Tag Name          | Tag Value                                        | Type       | Remarks                                                                                  |
|-------------------|--------------------------------------------------|------------|------------------------------------------------------------------------------------------|
| `message`         | Message to schedule                              | String(M)  |                                                                                          |
| `oa`              | Originating Address/Sender Name                  | String(M)  | Maximum length is configurable, as of now 11                                             |
| `msisdn`          | Destination MSISDN                               | String(M)  | Min-Max length is configurable, default is max 15                                        |
| `channel`         | Channel of the request                           | String(M)  | Possible value is SMS only as of now                                                     |
| `packageId`       | Package ID                                       | Integer(O) | This is optional, if not provided, a package will be selected automatically               |
| `userName`        | Username                                         | String(M)  | Username of the user                                                                     |
| `uniqueId`        | Unique ID of the request                         | String(M)  | It should be unique for each request                                                     |
| `actionResponseURL` | URL to which a request will hit after scheduling | String(O)  | API will post request and response details to this URL if provided                       |
| `CpId`            | Partner Id                                       | String(O)  | Partner Id for the user                                                                  |

## 3. Sample Request Format

```json
{
  "timeStamp": "1556873649895",
  "dataSet": [
    {
      "oa": "SenderSPT",
      "channel": "SMS",
      "packageId": 5761,
      "userName": "testcpuserN",
      "message": "test message",
      "msisdn": "251799001226",
      "uniqueId": "sddf",
      "actionResponseURL": "https://webhook-test.com/96115fa9d36079f0bb39db0505ed2be6",
      "requestParam": {
        "cpId": "450"
      }
    }
  ]
}
```

## 4. Response Parameters

| Field Name    | Description                                        | Type      |
|---------------|----------------------------------------------------|-----------|
| `$keyword`    | Module Name to Identify the channel of the request. | String(M) |
| `$status`     | Status Description                                 | String(M) |
| `$statusCode` | Status Code                                        | String(M) |

## 5. Sample Response

```json
{
  "keyword": "BULK",
  "status": "SUCCESS",
  "statusCode": "SC0000"
}
```

## 6. Error Codes

| Status Code | Status Description                                        | Comment and Example                                                                                                       |
|-------------|-----------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------|
| SC0000      | SUCCESS                                                   | This Success code will come from validation layer. And for all validations, you will get this code if the validation is successful. |
| SC0006      | Keyword/Dataset attributes are missing                    | Missing attribute in request                                                                                              |
| SC0001      | Incorrect Username / Request validation failure (While processing) | This error code will come from validation layer. And for all validations, you will get this error code.                   |
| SC0002      | Critical Error, Please contact support                    | If the request is validated and failed because of some other issue like configuration missing in cache.                    |