InteleServiceStack

<back to all web services

RestSmsRequest

"use strict";
export class RestSmsMessageResp {
    /** @param {{StatusCode?:number,StatusDescription?:string,MessageId?:string,TransactionId?:string,ExtraInfo?:{ [index:string]: string; }}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {number}
     * @description Result of sending message. 0 if success. See documentation for full list of codes */
    StatusCode;
    /**
     * @type {string}
     * @description Describes the result of sending Sms text message */
    StatusDescription;
    /**
     * @type {?string}
     * @description Your unique message id from send request message item. Will be empty if you did not provide any id in the request item. */
    MessageId;
    /**
     * @type {string}
     * @description Unique transaction id from server */
    TransactionId;
    /**
     * @type {?{ [index:string]: string; }}
     * @description Key/Value attributes returned from server. E.g. subnumref and the server name that processed the message. Eg. subnumref=19331234567891,server=smsgw1 */
    ExtraInfo;
}
export class RestSmsResponse {
    /** @param {{ProcessResult?:boolean,ProcessResultDescription?:string,Messages?:RestSmsMessageResp[]}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {boolean}
     * @description Overall status of processing the request. Each message will have it's own status. This value indicates if any other error occured or not */
    ProcessResult;
    /**
     * @type {?string}
     * @description Description of any error occured, if ProcessResult equals false */
    ProcessResultDescription;
    /**
     * @type {RestSmsMessageResp[]}
     * @description Collection of messages sent or failed */
    Messages = [];
}
export class RestSmsMessageReq {
    /** @param {{Gateway?:Object,OriginatorAddress?:Object,DestinationAddress?:Object,Price?:Object,MessageType?:string,ValidationPeriod?:Object,MessageId?:string,UserDataHeader?:string,UserData?:string,Category?:string,CustomData?:{ [index:string]: Object; },DeliveryReportUrl?:string,ServiceCode?:string,ServiceDescription?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {Object}
     * @description Gateway number. Default 99700999 for cross country delivery, non premium messages */
    Gateway;
    /**
     * @type {?Object}
     * @description Originator address. Defaults to gateway number if not set. Maximum 11 chars if using alphanumeric value. See documentation for full details. */
    OriginatorAddress;
    /**
     * @type {Object}
     * @description Destination address.The recipient of the message. Must be a valid MSISDN */
    DestinationAddress;
    /**
     * @type {Object}
     * @description Price to bill recipient. Premium messaging. Leave value to 0 if not using premium. Premium is only available on short number gateway number for each country available in documentation */
    Price;
    /**
     * @type {?string}
     * @description Message type according to documentation. Defaults to 00 if not set. If text length is above 160 chars, it defaults to value 11 */
    MessageType;
    /**
     * @type {?Object}
     * @description Delivery expire timestamp (yyyymmddhhmmss) or relative value. See documentation and default value if not defined */
    ValidationPeriod;
    /**
     * @type {?string}
     * @description Your unique message id to track delivery status and response from sending process */
    MessageId;
    /**
     * @type {?string}
     * @description GSM User Data Header (HEX) */
    UserDataHeader;
    /**
     * @type {string}
     * @description GSM User Data. Plain text or hex encoded. Depending on the used MessageType */
    UserData;
    /**
     * @type {?string}
     * @description Parameter to categorize messages on payment bill from Intele */
    Category;
    /**
     * @type {?{ [index:string]: Object; }}
     * @description Custom key/value attributes for the Sms Text Message. See documentation for further details */
    CustomData;
    /**
     * @type {?string}
     * @description Url where Intele should send delivery report. See documentation for url formatting */
    DeliveryReportUrl;
    /**
     * @type {?string}
     * @description For Premium messaging only. See documentation for further details */
    ServiceCode;
    /**
     * @type {?string}
     * @description For Premium messaging only. See documentation for further details */
    ServiceDescription;
}
export class RestSmsRequest {
    /** @param {{Username?:Object,Password?:string,Messages?:RestSmsMessageReq[]}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {Object}
     * @description API Username. Usually your customer id */
    Username;
    /**
     * @type {string}
     * @description API Password */
    Password;
    /**
     * @type {RestSmsMessageReq[]}
     * @description Collection of messages to send */
    Messages = [];
}

JavaScript RestSmsRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other

HTTP + OTHER

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /jsonl/reply/RestSmsRequest HTTP/1.1 
Host: smsgw.intele.no 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"Username":{},"Password":"String","Messages":[{"Gateway":{},"OriginatorAddress":{},"DestinationAddress":{},"Price":{},"MessageType":"String","ValidationPeriod":{},"MessageId":"String","UserDataHeader":"String","UserData":"String","Category":"String","CustomData":{"String":{}},"DeliveryReportUrl":"String","ServiceCode":"String","ServiceDescription":"String"}]}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"ProcessResult":false,"ProcessResultDescription":"String","Messages":[{"StatusCode":0,"StatusDescription":"String","MessageId":"String","TransactionId":"String","ExtraInfo":{"String":"String"}}]}