PageRenderTime 24ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

/vendor/sendinblue/api-v3-sdk/docs/Api/TransactionalSMSApi.md

https://gitlab.com/i-have-a-green/digitemis-v3
Markdown | 266 lines | 202 code | 64 blank | 0 comment | 0 complexity | f21c24b97653e94e959dcca9dd074116 MD5 | raw file
  1. # SendinBlue\Client\TransactionalSMSApi
  2. All URIs are relative to *https://api.sendinblue.com/v3*
  3. Method | HTTP request | Description
  4. ------------- | ------------- | -------------
  5. [**getSmsEvents**](TransactionalSMSApi.md#getSmsEvents) | **GET** /transactionalSMS/statistics/events | Get all your SMS activity (unaggregated events)
  6. [**getTransacAggregatedSmsReport**](TransactionalSMSApi.md#getTransacAggregatedSmsReport) | **GET** /transactionalSMS/statistics/aggregatedReport | Get your SMS activity aggregated over a period of time
  7. [**getTransacSmsReport**](TransactionalSMSApi.md#getTransacSmsReport) | **GET** /transactionalSMS/statistics/reports | Get your SMS activity aggregated per day
  8. [**sendTransacSms**](TransactionalSMSApi.md#sendTransacSms) | **POST** /transactionalSMS/sms | Send the SMS campaign to a mobile number
  9. # **getSmsEvents**
  10. > \SendinBlue\Client\Model\GetSmsEventReport getSmsEvents($limit, $startDate, $endDate, $offset, $days, $phoneNumber, $event, $tags)
  11. Get all your SMS activity (unaggregated events)
  12. ### Example
  13. ```php
  14. <?php
  15. require_once(__DIR__ . '/vendor/autoload.php');
  16. // Configure API key authorization: api-key
  17. $config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKey('api-key', 'YOUR_API_KEY');
  18. // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
  19. // $config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer');
  20. // Configure API key authorization: partner-key
  21. $config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY');
  22. // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
  23. // $config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer');
  24. $apiInstance = new SendinBlue\Client\Api\TransactionalSMSApi(
  25. // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
  26. // This is optional, `GuzzleHttp\Client` will be used as default.
  27. new GuzzleHttp\Client(),
  28. $config
  29. );
  30. $limit = 50; // int | Number of documents per page
  31. $startDate = "startDate_example"; // string | Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report
  32. $endDate = "endDate_example"; // string | Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report
  33. $offset = 0; // int | Index of the first document of the page
  34. $days = 56; // int | Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate'
  35. $phoneNumber = "phoneNumber_example"; // string | Filter the report for a specific phone number
  36. $event = "event_example"; // string | Filter the report for specific events
  37. $tags = "tags_example"; // string | Filter the report for specific tags passed as a serialized urlencoded array
  38. try {
  39. $result = $apiInstance->getSmsEvents($limit, $startDate, $endDate, $offset, $days, $phoneNumber, $event, $tags);
  40. print_r($result);
  41. } catch (Exception $e) {
  42. echo 'Exception when calling TransactionalSMSApi->getSmsEvents: ', $e->getMessage(), PHP_EOL;
  43. }
  44. ?>
  45. ```
  46. ### Parameters
  47. Name | Type | Description | Notes
  48. ------------- | ------------- | ------------- | -------------
  49. **limit** | **int**| Number of documents per page | [optional] [default to 50]
  50. **startDate** | **string**| Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report | [optional]
  51. **endDate** | **string**| Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report | [optional]
  52. **offset** | **int**| Index of the first document of the page | [optional] [default to 0]
  53. **days** | **int**| Number of days in the past including today (positive integer). Not compatible with &#39;startDate&#39; and &#39;endDate&#39; | [optional]
  54. **phoneNumber** | **string**| Filter the report for a specific phone number | [optional]
  55. **event** | **string**| Filter the report for specific events | [optional]
  56. **tags** | **string**| Filter the report for specific tags passed as a serialized urlencoded array | [optional]
  57. ### Return type
  58. [**\SendinBlue\Client\Model\GetSmsEventReport**](../Model/GetSmsEventReport.md)
  59. ### Authorization
  60. [api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key)
  61. ### HTTP request headers
  62. - **Content-Type**: application/json
  63. - **Accept**: application/json
  64. [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
  65. # **getTransacAggregatedSmsReport**
  66. > \SendinBlue\Client\Model\GetTransacAggregatedSmsReport getTransacAggregatedSmsReport($startDate, $endDate, $days, $tag)
  67. Get your SMS activity aggregated over a period of time
  68. ### Example
  69. ```php
  70. <?php
  71. require_once(__DIR__ . '/vendor/autoload.php');
  72. // Configure API key authorization: api-key
  73. $config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKey('api-key', 'YOUR_API_KEY');
  74. // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
  75. // $config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer');
  76. // Configure API key authorization: partner-key
  77. $config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY');
  78. // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
  79. // $config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer');
  80. $apiInstance = new SendinBlue\Client\Api\TransactionalSMSApi(
  81. // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
  82. // This is optional, `GuzzleHttp\Client` will be used as default.
  83. new GuzzleHttp\Client(),
  84. $config
  85. );
  86. $startDate = "startDate_example"; // string | Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report
  87. $endDate = "endDate_example"; // string | Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report
  88. $days = 56; // int | Number of days in the past including today (positive integer). Not compatible with startDate and endDate
  89. $tag = "tag_example"; // string | Filter on a tag
  90. try {
  91. $result = $apiInstance->getTransacAggregatedSmsReport($startDate, $endDate, $days, $tag);
  92. print_r($result);
  93. } catch (Exception $e) {
  94. echo 'Exception when calling TransactionalSMSApi->getTransacAggregatedSmsReport: ', $e->getMessage(), PHP_EOL;
  95. }
  96. ?>
  97. ```
  98. ### Parameters
  99. Name | Type | Description | Notes
  100. ------------- | ------------- | ------------- | -------------
  101. **startDate** | **string**| Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report | [optional]
  102. **endDate** | **string**| Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report | [optional]
  103. **days** | **int**| Number of days in the past including today (positive integer). Not compatible with startDate and endDate | [optional]
  104. **tag** | **string**| Filter on a tag | [optional]
  105. ### Return type
  106. [**\SendinBlue\Client\Model\GetTransacAggregatedSmsReport**](../Model/GetTransacAggregatedSmsReport.md)
  107. ### Authorization
  108. [api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key)
  109. ### HTTP request headers
  110. - **Content-Type**: application/json
  111. - **Accept**: application/json
  112. [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
  113. # **getTransacSmsReport**
  114. > \SendinBlue\Client\Model\GetTransacSmsReport getTransacSmsReport($startDate, $endDate, $days, $tag)
  115. Get your SMS activity aggregated per day
  116. ### Example
  117. ```php
  118. <?php
  119. require_once(__DIR__ . '/vendor/autoload.php');
  120. // Configure API key authorization: api-key
  121. $config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKey('api-key', 'YOUR_API_KEY');
  122. // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
  123. // $config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer');
  124. // Configure API key authorization: partner-key
  125. $config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY');
  126. // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
  127. // $config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer');
  128. $apiInstance = new SendinBlue\Client\Api\TransactionalSMSApi(
  129. // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
  130. // This is optional, `GuzzleHttp\Client` will be used as default.
  131. new GuzzleHttp\Client(),
  132. $config
  133. );
  134. $startDate = "startDate_example"; // string | Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report
  135. $endDate = "endDate_example"; // string | Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report
  136. $days = 56; // int | Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate'
  137. $tag = "tag_example"; // string | Filter on a tag
  138. try {
  139. $result = $apiInstance->getTransacSmsReport($startDate, $endDate, $days, $tag);
  140. print_r($result);
  141. } catch (Exception $e) {
  142. echo 'Exception when calling TransactionalSMSApi->getTransacSmsReport: ', $e->getMessage(), PHP_EOL;
  143. }
  144. ?>
  145. ```
  146. ### Parameters
  147. Name | Type | Description | Notes
  148. ------------- | ------------- | ------------- | -------------
  149. **startDate** | **string**| Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report | [optional]
  150. **endDate** | **string**| Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report | [optional]
  151. **days** | **int**| Number of days in the past including today (positive integer). Not compatible with &#39;startDate&#39; and &#39;endDate&#39; | [optional]
  152. **tag** | **string**| Filter on a tag | [optional]
  153. ### Return type
  154. [**\SendinBlue\Client\Model\GetTransacSmsReport**](../Model/GetTransacSmsReport.md)
  155. ### Authorization
  156. [api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key)
  157. ### HTTP request headers
  158. - **Content-Type**: application/json
  159. - **Accept**: application/json
  160. [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
  161. # **sendTransacSms**
  162. > \SendinBlue\Client\Model\SendSms sendTransacSms($sendTransacSms)
  163. Send the SMS campaign to a mobile number
  164. ### Example
  165. ```php
  166. <?php
  167. require_once(__DIR__ . '/vendor/autoload.php');
  168. // Configure API key authorization: api-key
  169. $config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKey('api-key', 'YOUR_API_KEY');
  170. // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
  171. // $config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer');
  172. // Configure API key authorization: partner-key
  173. $config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY');
  174. // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
  175. // $config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer');
  176. $apiInstance = new SendinBlue\Client\Api\TransactionalSMSApi(
  177. // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
  178. // This is optional, `GuzzleHttp\Client` will be used as default.
  179. new GuzzleHttp\Client(),
  180. $config
  181. );
  182. $sendTransacSms = new \SendinBlue\Client\Model\SendTransacSms(); // \SendinBlue\Client\Model\SendTransacSms | Values to send a transactional SMS
  183. try {
  184. $result = $apiInstance->sendTransacSms($sendTransacSms);
  185. print_r($result);
  186. } catch (Exception $e) {
  187. echo 'Exception when calling TransactionalSMSApi->sendTransacSms: ', $e->getMessage(), PHP_EOL;
  188. }
  189. ?>
  190. ```
  191. ### Parameters
  192. Name | Type | Description | Notes
  193. ------------- | ------------- | ------------- | -------------
  194. **sendTransacSms** | [**\SendinBlue\Client\Model\SendTransacSms**](../Model/SendTransacSms.md)| Values to send a transactional SMS |
  195. ### Return type
  196. [**\SendinBlue\Client\Model\SendSms**](../Model/SendSms.md)
  197. ### Authorization
  198. [api-key](../../README.md#api-key), [partner-key](../../README.md#partner-key)
  199. ### HTTP request headers
  200. - **Content-Type**: application/json
  201. - **Accept**: application/json
  202. [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)