0% found this document useful (0 votes)
36 views6 pages

Ncell SMS API Gateway Overview

The document outlines the Ncell API Gateway's SMS capabilities, detailing the RESTful API specifications for sending SMS messages, including required parameters and response formats. It emphasizes the importance of secure communication and adherence to defined URL patterns and response codes. Additionally, it provides information on error handling and response codes for various scenarios.

Uploaded by

mydala.subhps
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views6 pages

Ncell SMS API Gateway Overview

The document outlines the Ncell API Gateway's SMS capabilities, detailing the RESTful API specifications for sending SMS messages, including required parameters and response formats. It emphasizes the importance of secure communication and adherence to defined URL patterns and response codes. Additionally, it provides information on error handling and response codes for various scenarios.

Uploaded by

mydala.subhps
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Description

Public
Date Page
2020-07-07 1 (6)
Creator Approved by Identifier Revision Status
PnSDM Ncell-ICT-2018-AP10 1.0 Final

Contents
1. Introduction .......................................................................................................................................... 2
2. Security ................................................................................................................................................. 2
3. API Specification ................................................................................................................................... 2
3.1. General ......................................................................................................................................... 2
3.2. SMS ............................................................................................................................................... 2
3.2.1. Send SMS .............................................................................................................................. 2
3.2.2. Response Codes and Exceptions .......................................................................................... 5
4. Version History ..................................................................................................................................... 6

Company Information
Ncell Private Limited
Description
Public
Date Page
2020-07-07 2 (6)
Creator Approved by Identifier Revision Status
PnSDM Ncell-ICT-2018-AP10 1.0 Final

1. Introduction
Ncell API Gateway exposes SMS capabilities for service provider.

All APIs defined in this document are accessible via RESTful web services. A RESTful service utilizes HTTP
commands POST, GET, PUT, and DELETE in order to perform an operation on a resource at the server. This
resource is addressed by a URL; and what is returned by the server is a representation of that resource
depending on its current state.

These are oneAPI v3 compliant and are JSON based RESTful APIs.

2. Security
It is recommended that the communication between the Ncell API Gateway and the service provider
should be via a secure channel (HTTPS) and over IPSec VPN.

Adherence to the URL patterns and response codes defined herein is mandatory.

3. API Specification
3.1. General
Ncell API gateway uses oAuth2 password grant type or authorization [Refer to Ncell-ICT-2018-AP01
Ncell_APG_Token_Specification.pdf ]. The access token obtained from authorization should be passed as bearer in
header for each API call.

3.2. SMS
Following functionalities are supported for SMS.

 Send an SMS from Application (MT)

3.2.1. Send SMS


HTTP Method POST
Operation Used to send an SMS from Application (to one or more mobile terminals).

[Link]. Request Parameters


Parameter
Description Usage
name
At least one address will be provided; in this case the recipients
address MSISDN including the „[Link] protocol identifier and the country Mandatory
code .i.e., [Link]

Company Information
Ncell Private Limited
Description
Public
Date Page
2020-07-07 3 (6)
Creator Approved by Identifier Revision Status
PnSDM Ncell-ICT-2018-AP10 1.0 Final
(string) will be passed back in this notification. It’s used to
identify the message the receipt relates to (or any other useful
callbackData data, such as a function name). This is only valid if notifications Optional
are required – sent with the notifyURL parameter within the
receiptRequest element

Mandatory
Keep Unique clientCorrelator to each SMS send so that client
clientCorrelator
can track based on it.

(string) will be provided within the outboundSMSTextMessage


message element. Messages over 160 characters will be sent as two or Mandatory
more messages.

Reserved for
notifyURL N/A
future

(string) is the address to whom a responding SMS may be sent.


senderAddress Mandatory
Required for P2A only. N/A now.
(string) is the URL-escaped name of the sender to appear on
senderName the terminal is the address to whom a responding SMS may be Mandatory
sent. This needs to be approved and white-listed in SMSC.

[Link]. Request Sample


POST /apicall/smsmessaging/v2/outbound/ tel%3A%2B97798XXXXXXXX/requests
HTTP/1.1
Host: [Link]
Content-Type: application/json
Authorization: Bearer <<access key>>
Accept: application/json

{
"outboundSMSMessageRequest": {
"address": ["[Link]
"senderAddress": "[Link]
"outboundSMSTextMessage": {
"message": "<<MESSAGE THAT NEEDS TO SEND>>"

},
"clientCorrelator": "<<Keep unique id>>",
"receiptRequest": {
"notifyURL": "<<NOTIFY URL>>”,
"callbackData": "<<MISC DATA>>"
},
"senderName": "<<NCELL APPROVED SENDER NAME>>"

Company Information
Ncell Private Limited
Description
Public
Date Page
2020-07-07 4 (6)
Creator Approved by Identifier Revision Status
PnSDM Ncell-ICT-2018-AP10 1.0 Final
}
}
[Link]. Response Parameters
The response should include all original request parameters as listed in the request.

For convenience, this URI is also included in the response body as the resourceURL pair within the
resourceReference object.

[Link]. Response Sample


HTTP/1.1 200
Content-Type: application/json
Date: Thu, 04 Jun 2009 02:51:59 GMT

{
"outboundSMSMessageRequest": {
"address": [
"[Link]
],
"deliveryInfoList": {
"deliveryInfo": [
{
"address": "[Link]
"deliveryStatus": "MessageWaiting"
}
],
"resourceURL": "[Link]
Bot/requests/6099793433950301/deliveryInfos"
},
"senderAddress": "[Link] Bot",
"outboundSMSTextMessage": {
"message": "outbound"
},
"clientCorrelator": "testagain1231bh663",
"receiptRequest": {
"notifyURL": "[Link]
"callbackData": "work"
},
"senderName": "Ncell Bot",
"resourceURL": "[Link]
Bot/requests/6099793433950301"
}
}

NOTE: The HTTP 200 response shows API is successful.

Company Information
Ncell Private Limited
Description
Public
Date Page
2020-07-07 5 (6)
Creator Approved by Identifier Revision Status
PnSDM Ncell-ICT-2018-AP10 1.0 Final
3.2.2. Response Codes and Exceptions
[Link]. RESPONSE CODES
HTTP response codes are used to indicate:
200 – Success!
400 – Bad request; check the error message for details
401 – Authentication failure, check authentication details
403 – Forbidden; please provide authentication credentials
404 – Not found: mistake in the host or path of the service URI
405 – Method not allowed: for example you mistakenly used a HTTP GET instead of a POST
500 – The server encountered an unexpected condition. This could be wrong authentication
details or limited user permission
503 – Server busy and service unavailable. Please retry the request.

[Link]. EXCEPTIONS
This section lists the available error codes, the possible reasons why the exception may have occurred,
and possible solutions.

[Link].1. SERVICE EXCEPTIONS


If the transaction is immediately confirmed, the response is displayed as follows,
HTTP/1.1
400 Bad Request
Accept: application/json

{
"requestError": {
"serviceException": {
"messageId": "SVC0002",
"text": " Invalid input value for message part %1",
"variables": " clientCorrelator Value 12345"
}
}
}

[Link].2. POLICY EXCEPTIONS


A policy exception means that the request syntax is valid, however an operator policy has been broken.

POL0001 - Policy error occurred

The above exception may be thrown to indicate a fault relating to a policy associated with the service.

Company Information
Ncell Private Limited
Description
Public
Date Page
2020-07-07 6 (6)
Creator Approved by Identifier Revision Status
PnSDM Ncell-ICT-2018-AP10 1.0 Final

4. Version History
Version Date Changes Updater
1.0 07-07-2020 Initial PnSDM

Company Information
Ncell Private Limited

Common questions

Powered by AI

The mandatory request parameters for sending an SMS via the Ncell API Gateway include 'address,' 'clientCorrelator,' 'message,' and 'senderName.' The 'address' is the recipient's phone number prefixed with the 'tel:' protocol and country code. The 'clientCorrelator' is a unique identifier for tracking the SMS. The 'message' contains the content to be delivered, which must be formatted within the 'outboundSMSTextMessage' element. The 'senderName' reflects the sender's identity, which must be approved and white-listed in the SMSC .

The Ncell API documentation recommends using a 'clientCorrelator,' a unique identifier for each SMS sent, to ensure unique identification of messages. This aids in tracking and managing messages individually, allowing the client to monitor the status and fulfill different operational requirements effectively, such as troubleshooting or auditing message exchanges .

The Ncell API Gateway utilizes the oAuth2 protocol, specifically the password grant type, for access authorization. An access token obtained through this process must be passed as a bearer token in the header of each API call, ensuring authorized access to the services .

The Ncell API automatically segments messages exceeding 160 characters into two or more separate SMS messages. This ensures compliance with SMS technology limits, enabling the complete transmission of longer messages over existing telecommunications infrastructure. While this allows for exhaustive content delivery, it also implies that users may incur additional costs and need to consider message assembly on the recipient's device .

The Ncell API Gateway utilizes HTTP methods such as POST, GET, PUT, and DELETE to perform operations on resources. These methods correspond to creating, retrieving, updating, and deleting operations on the specified server resource, respectively. Each method interacts with the resource addressed by a URL and returns a representation based on the resource's current state .

The SMS sending operation response structure in the Ncell API includes all original request parameters, ensuring traceability and validation of the operation. Additionally, the response contains a 'resourceURL' in the 'resourceReference' object, providing metadata about the resource's state and location. Delivery information, such as 'deliveryStatus' and 'deliveryInfoList,' is also included to confirm message status, ensuring comprehensive feedback on the operation's outcome .

The Ncell API Gateway mandates adherence to specific URI patterns, which are crucial for defining the endpoints through which services are accessed. These patterns determine the structure and hierarchy of API calls, influencing how requests are constructed, parsed, and managed. Proper adherence ensures seamless integration, allowing for consistent interaction with the gateway and avoiding errors related to incorrect routing or unrecognized endpoints .

Service exceptions in the Ncell API arise from immediate transaction confirmation failures, evidenced by errors such as HTTP 400 Bad Request. These involve invalid input values, with specific error messages detailing the exact issue, like incorrect 'clientCorrelator' values. Policy exceptions pertain to syntax-valid requests that contravene service operator policies, indicated by a 'POL0001' policy error. Resolutions include correcting input values for service exceptions and adhering to operator policies to resolve policy exceptions .

The communication between the Ncell API Gateway and the service provider should be through a secure channel, specifically HTTPS, along with an IPSec VPN. This ensures that data transmitted is protected from malicious activities. Additionally, adherence to the defined URL patterns and response codes is mandatory to maintain security protocols .

Using JSON-based RESTful APIs in the Ncell API Gateway facilitates lightweight, easy-to-read data interchange, which is crucial for efficient communication in web-based applications. JSON formats allow quicker parsing, are language-independent, and enhance interoperability between different systems. This makes them ideal for web services that require fast processing and integration across various platforms .

You might also like