NAV

title: Apihub v1.0.0 language_tabs: - ruby: Ruby - python: Python language_clients: - ruby: "" - python: "" toc_footers: [] includes: [] search: false highlight_theme: darkula headingLevel: 2


Apihub v1.0.0

Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

This documentation is used to list all APIs in Apihub

Base URLs:

Email: Support

Customer Lookup

get_v1_customerLookup_servicehub{billing_account}

Code samples

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json'
}

result = RestClient.get 'https://apihub.telia.io/v1/customerLookup/servicehub/{billing_account}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://apihub.telia.io/v1/customerLookup/servicehub/{billing_account}', headers = headers)

print(r.json())

GET /v1/customerLookup/servicehub/{billing_account}

Lookup billing account with Servicehub as source

The servicehub source is mapping a TSCID to customer cache id, belonging to a billing account. The TSCID given in the response is the mapped value and might be different from the actual TSCID of a billing_account.

Parameters

Name In Type Required Description
billing_account path string true Billing account that will be searched for

Example responses

200 Response

{
  "tscid": "string",
  "assets": [
    {
      "id": "string",
      "display_name": "string",
      "asset_code": "string"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Successful operation customerLookup_servicehub

SMS Messaging

post__v1_dcp_sms

Code samples

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json'
}

result = RestClient.post 'https://apihub.telia.io/v1/dcp/sms',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json'
}

r = requests.post('https://apihub.telia.io/v1/dcp/sms', headers = headers)

print(r.json())

POST /v1/dcp/sms

This API is used to send SMSes to customers.

This API is used to send SMSes to customers. DCP API is used in order to send SMSes.

Body parameter

{
  "outboundSMSMessageRequest": {
    "address": [
      "string"
    ],
    "senderAddress": "string",
    "senderName": "string",
    "outboundSMSTextMessage": {
      "message": "string"
    }
  }
}

Parameters

Name In Type Required Description
body body dcp_sms true SMS Payload

Responses

Status Meaning Description Schema
200 OK Successful operation None

Generic SMS API

post__v1_sms

Code samples

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json'
}

result = RestClient.post 'https://apihub.telia.io/v1/sms',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json'
}

r = requests.post('https://apihub.telia.io/v1/sms', headers = headers)

print(r.json())

POST /v1/sms

Generic API wrappe on SMS service providers

This API is used to specify an SMS service provider and send it using generic request/response format.

Body parameter

{
  "genericSMSMessagePayload": {
    "receiver": "string",
    "sender": "string",
    "message": "string",
    "dcs": "string",
    "provider": "string",
    "auth": {
      "username": "string",
      "password": "string"
    }
  }
}

Parameters

Name In Type Required Description
body body generic_sms true Payload

Responses

Status Meaning Description Schema
200 OK SMS has been sent successfully None
400 Bad Request The payload contains an error None
500 Internal Server Error Unhandled error occured None

Schemas

customerLookup_servicehub

{
  "tscid": "string",
  "assets": [
    {
      "id": "string",
      "display_name": "string",
      "asset_code": "string"
    }
  ]
}

Properties

Name Type Required Restrictions Description
tscid string false none none
assets [object] false none none
» id string false none none
» display_name string false none none
» asset_code string false none none

dcp_sms

{
  "outboundSMSMessageRequest": {
    "address": [
      "string"
    ],
    "senderAddress": "string",
    "senderName": "string",
    "outboundSMSTextMessage": {
      "message": "string"
    }
  }
}

Properties

Name Type Required Restrictions Description
outboundSMSMessageRequest OutboundSMSMessageRequest true none none

OutboundSMSMessageRequest

{
  "address": [
    "string"
  ],
  "senderAddress": "string",
  "senderName": "string",
  "outboundSMSTextMessage": {
    "message": "string"
  }
}

Properties

Name Type Required Restrictions Description
address [string] true none The recipients MSISDN including the ‘tel:' protocol identifier and the country code. For example: tel:16309700001
senderAddress string true none A string that represents the address of the enterprise that sends the SMS. For example: tel:12345678
senderName string false none The name of the sender
outboundSMSTextMessage OutboundSMSTextMessage false none none

OutboundSMSTextMessage

{
  "message": "string"
}

Properties

Name Type Required Restrictions Description
message string true none Regular text string of up to 160 characters.

generic_sms

{
  "genericSMSMessagePayload": {
    "receiver": "string",
    "sender": "string",
    "message": "string",
    "dcs": "string",
    "provider": "string",
    "auth": {
      "username": "string",
      "password": "string"
    }
  }
}

Properties

Name Type Required Restrictions Description
genericSMSMessagePayload GenericSMSMessagePayload true none none

GenericSMSMessagePayload

{
  "receiver": "string",
  "sender": "string",
  "message": "string",
  "dcs": "string",
  "provider": "string",
  "auth": {
    "username": "string",
    "password": "string"
  }
}

Properties

Name Type Required Restrictions Description
receiver string true none The recipients MSISDN including country code For example: 46300400999
sender string true none A string that represents the name of the sender, must not be blacklisted by the operator
message string true none UTF-8 encoded message contents
dcs string false none Message encoding, "gsm" for GSM messages, "ucs" for Unicode
provider string false none Service Provider to be used to send the message, defaults to "sms_hub"
auth GenericSMSMessageProviderAuth false none Custom Auth object, applicable for unregistered clients sending messages via SMS Hub provider

GenericSMSMessageProviderAuth

{
  "username": "string",
  "password": "string"
}

Custom Auth object, applicable for unregistered clients sending messages via SMS Hub provider

Properties

Name Type Required Restrictions Description
username string true none Service Provider registered username
password string true none Password set for Service Provider account