Skip to content

Latest commit

 

History

History
219 lines (155 loc) · 6.4 KB

File metadata and controls

219 lines (155 loc) · 6.4 KB

ClickSend\GlobalSendingApi

All URIs are relative to https://rest.clicksend.com/v3

Method HTTP request Description
listCountriesGet GET /country-list List of countries
userCountriesAgreePost POST /user-countries/agree Agree to rules and regulation
userCountriesGet GET /user-countries Get Countries for Global Sending
userCountriesPost POST /user-countries Select Countries for Global Sending

listCountriesGet

string listCountriesGet()

List of countries

List of countries with IDs that can be used in selecting countries for Global sending.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: BasicAuth
$config = ClickSend\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new ClickSend\Api\GlobalSendingApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);

try {
    $result = $apiInstance->listCountriesGet();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling GlobalSendingApi->listCountriesGet: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

This endpoint does not need any parameter.

Return type

string

Authorization

BasicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

userCountriesAgreePost

string userCountriesAgreePost()

Agree to rules and regulation

To agree on rules and regulations of selected countries and confirm selection.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: BasicAuth
$config = ClickSend\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new ClickSend\Api\GlobalSendingApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);

try {
    $result = $apiInstance->userCountriesAgreePost();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling GlobalSendingApi->userCountriesAgreePost: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

This endpoint does not need any parameter.

Return type

string

Authorization

BasicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

userCountriesGet

string userCountriesGet()

Get Countries for Global Sending

Get the list of selected countries.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: BasicAuth
$config = ClickSend\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new ClickSend\Api\GlobalSendingApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);

try {
    $result = $apiInstance->userCountriesGet();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling GlobalSendingApi->userCountriesGet: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

This endpoint does not need any parameter.

Return type

string

Authorization

BasicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

userCountriesPost

string userCountriesPost($body)

Select Countries for Global Sending

Use this endpoint to select countries that you intend to send sms / mms to. To remove / unselect a country, just remove the country id from the array in the payload.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: BasicAuth
$config = ClickSend\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new ClickSend\Api\GlobalSendingApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$body = new \ClickSend\Model\CountryListIds(); // \ClickSend\Model\CountryListIds | Id of countr(ies) you want to select, you can get them from GET /country-list response

try {
    $result = $apiInstance->userCountriesPost($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling GlobalSendingApi->userCountriesPost: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
body \ClickSend\Model\CountryListIds Id of countr(ies) you want to select, you can get them from GET /country-list response

Return type

string

Authorization

BasicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]