API Reference

Request URL

Verb/Method

POST

URL Elements

https://(hostname)

Sample URL

https://revapi.reverieinc.com/

Header Name
Description

Content-Type

The format of the data to be posted.

application/JSON

REV-API-KEY

A unique key/token provided by Reverie to identify the user using the Localization API.

-

REV-APP-ID

The unique account ID to identify the user and the default account settings.

-

REV-APPNAME

The parameter to identify the API.

transliteration

src_lang

The script used in the input text.

Mention the ISO language code of the input text script.

tgt_lang

The script to which you want to convert the input text.

Mention the ISO language code to obtain the output.

domain

The Domain refers to the universe in which you use the Transliteration API. Example: Health Care, Insurance, Legal, etc.

cnt_lang

The language of the words in the input text.

Example -

data”: “Singh Sahab aap Kahan the.”

In the example above, the Hindi language words are written in the English language script (Roman Script). So cnt_lang = “hi”

This is an optional parameter. If no value is provided, by default the value is the same as src_lang.

Mention the ISO language code of the input words.

Request

Element
Type
Is Mandatory?
Description

data

array of content

Yes

List of input text for transliteration.

isBulk

boolean

No

Specify whether the API should initially search in the Exception DB to transliterate the input text. Note: By default, the isBulk= true and will not search in the Exception DB.

noOfSuggestions

integer

No

Mention the number of transliteration suggestions the API should return for the input text.

Note: By default, the noOfSuggestions = 1, means the API will return only one transliteration suggestion for the input string.

Example: Consider noOfSuggestions = 2

abbreviate

boolean

No

The abbreviate will Validate whether any Abbreviations/ Acronyms are passed in the input text and will transliterate it accurately.

Note - By default, the abbreviate = true

Note - if the value is false, the API will consider the abbreviation as a word and transliterate it to the nearest available word.

Note - In the input text, pass the abbreviations in upper case.

convertNumber

string

No

Specify whether to convert the numbers in the input text to the target language script based on the value type.

Three types of values for this parameter:

i) local: this value can convert the input number to the target language script.

Example -

Consider convertNumber = local

ii) words: this value can convert numbers into words w.r.t to the target language.

Consider convertNumber = words

iii) roman: this value can convert Roman numbers to English numbers.

For example -

If the user types sector V in English, - The transliteration would be - सेक्टर 5 in Hindi.

Block II will be transliterated as ब्लॉक 2.

ignoreTaggedEntities

boolean

No

Specify whether you want to retain the entities like email ID and URL in the input script.

Note: By default, the ignoreTaggedEntities = true and will transliterate the email ID and URL into the target language script.

Example: Consider ignoreTaggedEntities= false

convertOrdinal

boolean

No

This is used for transliterating ordinal values to English numbers.

Note - Default value = False

For example - If the user types 15th Main in English, - The transliteration would be - 15 मेन in Hindi.

abbreviationWitho utDot

boolean

No

This is used to produce the abbreviation output without a dot.

Note - Default value = False

For example- If a user wants an abbreviation output without a dot and is given SMS as an input then the result would be - एसएमएस

Response

Element
Type
Description

responseList

array of content

The API will return the string(s) in the target language script.

inString

string

The input text in the source language script.

outString

string

A string which is the result of converting the input text to the output script

api_status

integer

Status of API – successful/fail.

By default, the api_status = 2 for all the successful transactions.

Handling Error

The Transliteration API raises exceptions for many reasons, such as failed conversions, invalid parameters, authentication errors, and network unavailability. It will provide more specific machine-readable messages with an error response so that users can react to errors more effectively.

Refer to API Messages section to view the list of messages and its description.

{
    "documentation": "https://revup.reverieinc.com/dashboard/documentation",
    "message": "Oops! Something wrong happened",
    "error_cause": "Required String parameter 'target_lang' is not present",
    "status": "BAD_REQUEST"
}

Last updated