For the best experience turn off the battery saving mode.

Willkommen im Bereich der BSG-Entwicklerdokumentation

Wenn Sie unsere REST-API verwenden, Benachrichtigungen von Abfangjägern erhalten oder eine App für den Intercom Messenger erstellen möchten, sind Sie hier genau richtig

Resend a VIBER Message via SMS if unvelivered

Creates a new message object. BSG returns the created message object with each request. Per request, a max of 50 phones can be entered.

NOTE: SMS body should be added to viber options hash.

PARAMETERS

Parameter
Type
Description
originator
type: string

The sender of the SMS message.

text
type: string

The body of the SMS message.

DEFINITION

PUT (POST) https://app.bsg.hk/rest/viber/create

RETURNS
Returns a message object if the request was successful. If the request failed, an error object will be returned.

EXAMPLE REQUEST

{ „tariff“:“0″,
„validity“:“1″,
„messages“:[
{
„to“:[
{
„msisdn“:“380972920000″,
„reference“:“ext_id_19″
}
],
„text“:“My Viber messages is shinier than your SMS messages“,
„alpha_name“:“BSG“,
„is_promotional“:false,
„options“:{
„viber“:{
„img“:“http://mysite.com/logo.png“,
„caption“:“See Details“,
„action“:“http://mysite.com/“,
„alt_route“: {
„originator“:“BSG“,
„text“: „SMS message will be received if you not a VIBER user.“
}
}
}
}
]
}

EXAMPLE RESPONSE

{ „result“:[
{
„error“:0,
„errorDescription“:“No errors“,
„reference“:“ext_id_19″,
„id“:“217″,
„price“:0.23,
„currency“:“EUR“
}
],
„currency“:“EUR“,
„total_price“:0.23
}

IN ERROR CASE

{ „result“:[
{
„error“:43,
„errorDescription“:“External ID already exists“,
„reference“:“ext_id_19″
}
]
}

View a status

Retrieves the information of an existing message. This message can be a sent or a received message. You only need to supply the unique message id that was returned upon creation or receiving.

PARAMETERS

Parameter
Type
Description
id
type: int

An unique random ID which is created on the BSG platform and is returned upon creation of the object.

reference
type: string

A client reference

ATTRIBUTES

Attribute
Type
Description
id
type: int

An unique random ID which is created on the BSG platform and is returned upon creation of the object.

msisdn
type: string

The telephone number.

reference
type: string

A client reference.

time_in
type: datetime

The date and time of the creation of the message

time_sent
type: datetime

The scheduled date and time of the message.

time_dr
type: datetime

The date and time of the creation of the message.

status
type: string

Possible values: scheduledsentdeliveredreadexpiredundeliverablerejectedunknown.

alt_route
type: hash

A hash with SMS message info

channel
type: string

Allways SMS

id
type: int

An unique random ID which is created on the BSG platform and is returned upon creation of the object.

status
type: string

Possible values: scheduledsentdeliveredreadexpiredundeliverablerejectedunknown.

DEFINITION

GET https://app.bsg.hk/rest/viber/{id}

EXAMPLE RESPONSE

{ „error“:0,
„errorDescription“:“No errors“,
„id“:“470093225″,
„msisdn“:“380972920000″,
„reference“:“ext_id_19″,
„time_in“:“2017-01-17 09:20:02″,
„time_sent“:“2017-01-17 09:20:02″,
„time_dr“:“2017-01-17 09:20:02″,
„status“:“undeliverable“,
„price“:0.00,
„currency“:“EUR“,
„alt_route“:[{
„channel“: „sms“,
„id“: „470094225“,
„status“: „delivered“,
„price“=>“0.023“
}]
}

IN ERROR CASE

{ „error“: 40,
„errorDescription“:“Message not found“
}