isendpro
Module isendpro
API
Definitions
ballerinax/isendpro Ballerina library
Overview
The iSendPro v1.1.1 connector(https://www.isendpro.com/docs/?type=7) OpenAPI specification.
iSendPro provides the capability to the capability to send SMS to one or more recipients.
Key Features
- Programmatic access to create and manage resources via REST API
- Send and publish data through the API
- Manage user accounts and profiles
- Secure authentication with API key or OAuth support
Prerequisites
Before using this connector in your Ballerina application, complete the following:
- Create an iSendPro account
- Obtain tokens - Follow this guide
Clients
isendpro: Client
This is a generated connector for iSendPro v1.1.1 OpenAPI specification. [1] List of features:
- sending SMS to one or more recipients,
- HLR lookup,
- recovery of campaign summaries,
- directory management,
- addition to blacklist.
- counting of the number of characters in SMS
[2] To use this API you must:
- Create an iSendPro account on https://isendpro.com/
- Credit your account
- Note: obtaining a test credit possible under certain conditions
- Write down your account key (keyid)
- It will be essential for you to use the API
- You can find it in the section my "account", sub-section "my API"
- Configure IP control
- IP control can be configured in the my "account" section, "my API" sub-section
- This is a whitelist system, you need to enter the IPs used to call the API
- You can also completely disable IP control
Constructor
Gets invoked to initialize the connector.
The connector initialization doesn't require setting the API credentials.
Create an iSendPro account and obtain tokens by following this guide
Operations require passing the token as a parameter.
init (ConnectionConfig config, string serviceUrl)- config ConnectionConfig {} - The configurations to be used when initializing the
connector
- serviceUrl string "https://apirest.isendpro.com/cgi-bin" - URL of the target service
getCampaign
function getCampaign(string keyid, string rapportCampagne, string dateDeb, string dateFin) returns string|errorReturns the SMS sent over a given period
Parameters
- keyid string - API key
- rapportCampagne string - Must be "1"
- dateDeb string - start date in format YYYY-MM-DD hh:mm
- dateFin string - End date in format YYYY-MM-DD hh:mm
count
function count(CountRequest payload) returns CountResponse|errorCount the number of characters.
Parameters
- payload CountRequest - Count request
Return Type
- CountResponse|error - Response OK
getCredit
function getCredit(string keyid, string credit) returns CreditResponse|errorGet credit
Parameters
- keyid string - API key
- credit string - Type of response requested, 1 for euro, 2 for euro + quantity estimate
Return Type
- CreditResponse|error - Successful response
removeBlacklistNumber
function removeBlacklistNumber(string keyid, string delListeNoire, string num) returns BlacklistResponse|errorAdd a blacklisted number
Parameters
- keyid string - API key
- delListeNoire string - Must be "1"
- num string - Mobile number to be deleted
Return Type
- BlacklistResponse|error - Successful response
getBlacklist
Return the blacklist
validateNumber
function validateNumber(HLRrequest payload) returns HLRResponse|errorCheck the validity of a number
Parameters
- payload HLRrequest - HLR to be looked up
Return Type
- HLRResponse|error - Response OK
updateDirectory
function updateDirectory(DirectoryUpdateRequest payload) returns Directorymodifreponse|errorUpdate directory
Parameters
- payload DirectoryUpdateRequest - Creation directory request
Return Type
- Directorymodifreponse|error - Successful response
createDirectory
function createDirectory(Directorycreaterequest payload) returns Directorycreatereponse|errorCreate directory
Parameters
- payload Directorycreaterequest - Creation directory
Return Type
- Directorycreatereponse|error - Successful response
addBlacklistNumber
function addBlacklistNumber(string keyid, string setlisteNoire, string num) returns BlacklistResponse|errorAdd a blacklisted number.
Parameters
- keyid string - API key
- setlisteNoire string - Must be "1"
- num string - mobile number to be blacklisted
Return Type
- BlacklistResponse|error - Successful response
addShortlink
function addShortlink(ShortlinkRequest payload) returns ShortlinkResponse|erroradd a shortlink
Parameters
- payload ShortlinkRequest - add sub account request
Return Type
- ShortlinkResponse|error - Response OK
sendSms
function sendSms(SmsUniqueRequest payload) returns SMSResponse|errorSend a text message.
Parameters
- payload SmsUniqueRequest - SMS request
Return Type
- SMSResponse|error - Response OK
sendSmsMulti
function sendSmsMulti(SMSRequest payload) returns SMSResponse|errorSend multiple text messages
Parameters
- payload SMSRequest - SMS request
Return Type
- SMSResponse|error - Response OK
updateSubAccount
function updateSubAccount(SubaccountRequest payload) returns SubaccountResponse|errorEdit a subaccount
Parameters
- payload SubaccountRequest - Update sub account request
Return Type
- SubaccountResponse|error - Response OK
addSubAccount
function addSubAccount(SubaccountAddRequest payload) returns SubaccountAddResponse|errorAdd a sub account
Parameters
- payload SubaccountAddRequest - add sub account request
Return Type
- SubaccountAddResponse|error - Response OK
Records
isendpro: BlacklistResponse
Fields
- etat? BlacklistresponseEtat -
isendpro: BlacklistresponseEtat
Fields
- etat BlacklistresponseEtatEtat[] -
isendpro: BlacklistresponseEtatEtat
Fields
- listeNoire string - Must be "OK"
- tel string - Telephone number to be blacklisted. National French or international format.
isendpro: ClientHttp1Settings
Provides settings related to HTTP/1.x protocol.
Fields
- keepAlive KeepAlive(default http:KEEPALIVE_AUTO) - Specifies whether to reuse a connection for multiple requests
- chunking Chunking(default http:CHUNKING_AUTO) - The chunking behaviour of the request
- proxy? ProxyConfig - Proxy server related options
isendpro: ConnectionConfig
Provides a set of configurations for controlling the behaviours when communicating with a remote HTTP endpoint.
Fields
- httpVersion HttpVersion(default http:HTTP_2_0) - The HTTP version understood by the client
- http1Settings? ClientHttp1Settings - Configurations related to HTTP/1.x protocol
- http2Settings? ClientHttp2Settings - Configurations related to HTTP/2 protocol
- timeout decimal(default 60) - The maximum time to wait (in seconds) for a response before closing the connection
- forwarded string(default "disable") - The choice of setting
forwarded/x-forwardedheader
- poolConfig? PoolConfiguration - Configurations associated with request pooling
- cache? CacheConfig - HTTP caching related configurations
- compression Compression(default http:COMPRESSION_AUTO) - Specifies the way of handling compression (
accept-encoding) header
- circuitBreaker? CircuitBreakerConfig - Configurations associated with the behaviour of the Circuit Breaker
- retryConfig? RetryConfig - Configurations associated with retrying
- responseLimits? ResponseLimitConfigs - Configurations associated with inbound response size limits
- secureSocket? ClientSecureSocket - SSL/TLS-related options
- proxy? ProxyConfig - Proxy server related options
- validation boolean(default true) - Enables the inbound payload validation functionality which provided by the constraint package. Enabled by default
isendpro: CountRequest
Fields
- count string -
- date_envoi? string - Date sent in YYYY-MM-DD format hh: mm. This parameter is optional, if it is omitted, the sending is carried out immediately.
- emetteur? string -
- The sender must be an alphanumeric string between 4 and 11 characters long.
- The accepted characters are numbers between 0 and 9, letters between A and Z and space.
- It cannot consist of only numbers.
- For the modification of the transmitter and within the framework of commercial campaigns, the operators contractually impose to add at the end of the message the text "STOP XXXXX". As a result, the message sent cannot exceed a length of 148 characters instead of 160 characters, the "STOP" being added automatically.
- gmt_zone? string - Time zone of the date sent
- keyid string - API key
- nostop? string - If the message is not for commercial purposes, you can request to withdraw the obligation from the STOP. Once your request has been validated by our services, you can remove the STOP SMS mention by adding nostop = "1"
- num string - Telephone number in national (example 0680010203) or international (example 33680010203) format
- numAzur? string -
- sms string - Message to send to recipients. The message must be encoded in utf-8 format and contain only characters existing in the GSM alphabet. It is also possible to send (abroad only) SMS in UCS-2, see parameter ucs2 for more details.
- smslong string(default "999") - The long SMS allows you to exceed the limit of 160 characters by sending a message consisting of of several SMS. Up to 6 concatenated SMS can be sent for a maximum total length of 918 characters per message. For technical reasons, the limit per concatenated SMS is 153 characters. If the transmitter is changed, consider the automatic addition of 12 characters of the "STOP SMS". To send a smslong, you must add the smslong parameter to the calls. The value of SMS must be the maximum number of concatenated SMS allowed. In order not to have this error message and to obtain a dynamic calculation of the number of SMS then you must enter smslong = "999"
- tracker? string - Le tracker doit être une chaine alphanumérique de moins de 50 caractères. Ce tracker sera ensuite renvoyé en paramètre des urls pour les retours des accusés de réception.
- ucs2? string - It is also possible to send SMS in non-Latin alphabet (Russian, Chinese, Arabic, etc.) on numbers outside mainland France. To do this, the request should be encoded in UTF-8 format and contain the argument ucs2 = "1" Due to technical constraints, 1 unique SMS cannot exceed 70 characters (instead of of the usual 160) and in the case of long SMS, each SMS cannot exceed 67 characters.
isendpro: CountResponse
Fields
- etat? CountresponseEtat -
isendpro: CountresponseEtat
Fields
- etat? CountresponseEtatEtat[] -
isendpro: CountresponseEtatEtat
Fields
- nb_character? string - Number of characters
- nb_sms? string - Number of sms needed
- tel? string - Phone number
isendpro: CreditResponse
Fields
- etat? CreditresponseEtat -
isendpro: CreditresponseEtat
Fields
- credit? decimal - Amount of credit remaining
- quantite? string - Credit equivalence in number of SMS to Metropolitan France.
isendpro: Directorycreatereponse
Fields
- etat? DirectorycreatereponseEtat -
isendpro: DirectorycreatereponseEtat
Fields
- etat? DirectorycreatereponseEtatEtat[] -
isendpro: DirectorycreatereponseEtatEtat
Fields
- code string - Return code. See "return code table" in the appendix of the documentation
- message? string - Label associated with the return code.
- repertoireId? string - directoryId of the directory created.
isendpro: Directorycreaterequest
Fields
- keyid string - API key
- repertoireEdit string - Action à réaliser doit valoir "create" ici.
- repertoireNom string - Nom du répertoire (libellé) à créer
isendpro: Directorymodifreponse
Fields
- etat? DirectorymodifreponseEtat -
isendpro: DirectorymodifreponseEtat
Fields
- etat? DirectorymodifreponseEtatEtat[] -
isendpro: DirectorymodifreponseEtatEtat
Return code table. If successful, a separate return code for each number submitted.
Fields
- code string - Return code. See "return code table" in the appendix of the documentation
- message? string - Label associated with the return code.
- repertoireId? string - directory ID passed as argument during the call
- tel? string - Phone number
isendpro: DirectoryUpdateRequest
Fields
- champ1? string[] - Contact names
- champ10? string[] - Champs I des contacts
- champ11? string[] - Champs J des contacts
- champ12? string[] - Champs K des contacts
- champ13? string[] - Champs L des contacts
- champ14? string[] - Champs M des contacts
- champ15? string[] - Champs N des contacts
- champ16? string[] - Champs O des contacts
- champ17? string[] - Champs P des contacts
- champ18? string[] - Champs Q des contacts
- champ19? string[] - Champs R des contacts
- champ2? string[] - Champs A des contacts
- champ20? string[] - Champs S des contacts
- champ21? string[] - Champs T des contacts
- champ22? string[] - Champs U des contacts
- champ23? string[] - Champs V des contacts
- champ24? string[] - Champs W des contacts
- champ25? string[] - Champs X des contacts
- champ26? string[] - Champs Y des contacts
- champ27? string[] - Champs Z des contacts
- champ3? string[] - Champs B des contacts
- champ4? string[] - Champs C des contacts
- champ5? string[] - Champs D des contacts
- champ6? string[] - Champs E des contacts
- champ7? string[] - Champs F des contacts
- champ8? string[] - Champs G des contacts
- champ9? string[] - Champs H des contacts
- keyid string - API key
- num string[] - list of phone numbers to add or delete
- repertoireEdit string - Action to perform, "add" for adding numbers, "del" for removing numbers
- repertoireId string - directory ID of the target directory
isendpro: ErreurEtat
Fields
- etat? ErreurEtatEtat[] -
isendpro: ErreurEtatEtat
Fields
- code? string - Return code. See "return code table" in the appendix of the documentation
- message? string - Label associated with the return code
isendpro: Error
Fields
- etat? ErreurEtat -
isendpro: HLRrequest
Fields
- getHLR string - Must be "1"
- keyid string - API key
- num string[] - Phone number list
isendpro: HLRResponse
Fields
- etat? HlrresponseEtat -
isendpro: HlrresponseEtat
Fields
- etat HlrresponseEtatEtat[] - list of returns
isendpro: HlrresponseEtatEtat
Fields
- operator string - Associated operator (if valid number)
- tel string - Phone number concerned
isendpro: ProxyConfig
Proxy server configurations to be used with the HTTP client endpoint.
Fields
- host string(default "") - Host name of the proxy server
- port int(default 0) - Proxy server port
- userName string(default "") - Proxy server username
- password string(default "") - Proxy server password
isendpro: ShortlinkRequest
Fields
- keyid string -
- shortlink string -
isendpro: ShortlinkResponse
Fields
- etat? ShortlinkresponseEtat -
isendpro: ShortlinkresponseEtat
Fields
- etat? ShortlinkresponseEtatEtat[] -
isendpro: ShortlinkresponseEtatEtat
Fields
- code? decimal -
- message? string -
- shortlink? string -
isendpro: SMSRequest
Fields
- date_envoi? string - Optional parameter, date of sending in YYYY-MM-DD hh: mm format
- emetteur? string - The sender must be an alphanumeric string between 4 and 11 characters long. Accepted characters are numbers between 0 and 9, letters between A and Z and space. It cannot consist of only numbers. For modification from the sender and in the context of commercial campaigns, the operators contractually impose the following text to be added at the end of the message: STOP XXXXX Therefore, the message sent may not exceed a length of 148 characters instead of 160 characters, the STOP being added automatically.
- gmt_zone? string - Time zone of the date sent
- keyid string - API key
- nostop? string - If the message is not for commercial purposes, you can request to withdraw the obligation from the STOP. Once your request has been validated by our services, you can remove the STOP SMS mention by adding nostop = "1"
- num string[] -
- numAzur? string -
- repertoireId? string - Directory ID
- sms string[] -
- smslong? string - The long SMS allows you to exceed the limit of 160 characters by sending a message consisting of several SMS. Up to 6 concatenated SMS can be sent for a maximum total length of 918 characters per message. For technical reasons, the limit per concatenated SMS is 153 characters. If the transmitter is changed, consider the automatic addition of 12 characters of the "STOP SMS". To send a smslong, you must add the smslong parameter to the calls. The value of SMS must be the maximum number of concatenated SMS allowed. In order not to get this error message and to obtain a dynamic calculation of the number of SMS then you must enter smslong = "999"
- tracker? string[] -
- ucs2? string - It is also possible to send SMS in non-Latin alphabet (Russian, Chinese, Arabic, etc.) to numbers outside mainland France. To do this, the request should be encoded in UTF-8 format and contain the argument ucs2 = "1" Due to technical constraints, 1 single SMS cannot exceed 70 characters (instead of the usual 160) and in the case long SMS, each SMS cannot exceed 67 characters.
isendpro: SMSResponse
Fields
- etat? SmsresponseEtat -
isendpro: SmsresponseEtat
Fields
- etat? SmsresponseEtatEtat[] -
isendpro: SmsresponseEtatEtat
Fields
- code? int - Return code. See "return code table" in the appendix of the documentation
- message? string - Label associated with the return code
- smslong? string - Number of long SMS invoiced
- tel? string - Phone number concerned
isendpro: SmsUniqueRequest
Fields
- date_envoi? string - Date sent in YYYY-MM-DD format hh: mm. This parameter is optional, if it is omitted, the sending is carried out immediately.
- emetteur? string -
- The sender must be an alphanumeric string between 4 and 11 characters long.
- The accepted characters are numbers between 0 and 9, letters between A and Z and space.
- It cannot consist of only numbers.
- For the modification of the transmitter and within the framework of commercial campaigns, the operators contractually impose to add at the end of the message the text "STOP XXXXX". As a result, the message sent cannot exceed a length of 148 characters instead of 160 characters, the "STOP" being added automatically.
- gmt_zone? string - Fuseau horaire de la date d'envoi
- keyid string - API key
- nostop? string - If the message is not for commercial purposes, you can request to withdraw the obligation from the STOP. Once your request has been validated by our services, you can remove the STOP SMS mention by adding nostop = "1"
- num string - Telephone number in national (example 0680010203) or international (example 33680010203) format
- numAzur? string -
- sms string - Message to send to recipients. The message must be encoded in utf-8 format and contain only characters existing in the GSM alphabet. It is also possible to send (abroad only) SMS in UCS-2, see parameter ucs2 for more details.
- smslong? string - The long SMS allows you to exceed the limit of 160 characters by sending a message consisting of of several SMS. Up to 6 concatenated SMS can be sent for a maximum total length of 918 characters per message. For technical reasons, the limit per concatenated SMS is 153 characters. If the transmitter is changed, consider the automatic addition of 12 characters of the "STOP SMS". To send a smslong, you must add the smslong parameter to the calls. The value of SMS must be the maximum number of concatenated SMS allowed. In order not to have this error message and to obtain a dynamic calculation of the number of SMS then you must enter smslong = "999"
- tracker? string - Le tracker doit être une chaine alphanumérique de moins de 50 caractères. Ce tracker sera ensuite renvoyé en paramètre des urls pour les retours des accusés de réception.
- ucs2? string - It is also possible to send SMS in non-Latin alphabet (Russian, Chinese, Arabic, etc.) on numbers outside mainland France. To do this, the request should be encoded in UTF-8 format and contain the argument ucs2 = "1" Due to technical constraints, 1 unique SMS cannot exceed 70 characters (instead of the usual 160) and in the case of long SMS, each SMS cannot exceed 67 characters.
isendpro: SubaccountAddRequest
Fields
- keyid string -
- subAccountEdit string -
- subAccountLogin string -
- subAccountPassword string -
isendpro: SubaccountAddResponse
Fields
- etat? SubaccountaddresponseEtat -
isendpro: SubaccountaddresponseEtat
Fields
- etat? SubaccountaddresponseEtatEtat[] -
isendpro: SubaccountaddresponseEtatEtat
Fields
- code? decimal -
- message? string -
- subAccountId? string -
- subAccountKeyId? string -
- subAccountLogin? string -
isendpro: SubaccountRequest
Fields
- keyid string - API key
- subAccountAddCredit? string - Amount of credit to add
- subAccountCountryCode? string -
- subAccountEdit string - Action to be carried out either setPrice to define a price or addCredit to add credit or setRestriction to modify the restriction stop.
- subAccountKeyId? string - sub-account key ID
- subAccountPrice? string -
- subAccountRestrictionStop? string -
- subAccountRestrictionTime? string -
isendpro: SubaccountResponse
Fields
- etat? SubaccountresponseEtat -
isendpro: SubaccountresponseEtat
Fields
- etat? SubaccountresponseEtatEtat[] -
isendpro: SubaccountresponseEtatEtat
Fields
- code? string -
- message? string -
- subAccountId? string -
- subAccountKeyid? string -
Import
import ballerinax/isendpro;Metadata
Released date: 3 days ago
Version: 1.5.2
License: Apache-2.0
Compatibility
Platform: any
Ballerina version: 2201.8.0
GraalVM compatible: Yes
Pull count
Total: 25
Current verison: 0
Weekly downloads
Keywords
Type/Connector
Vendor/iSendPro
Area/Communication
Communication/Call & SMS
Cost/Paid
Contributors
Dependencies