GET https://api.i-as.dev/api/spelled/rupiah?amount={value}&lang={language}
amount ({value}
): The numeric amount you want to convert to a spelled-out format. This value can be provided in various formats, such as:
1234567
1.234.567
lang ({language}
): The language in which the amount should be spelled. It supports the following values:
id
: Indonesianen
: EnglishThe API supports numbers in the following ranges:
Convert 10000
Rupiah to spelled-out form in English.
GET https://api.i-as.dev/api/spelled/rupiah?amount=10000&lang=en
Response Example:
{
"spelled": "Ten Thousand Rupiah"
}
Convert 1.234.567
Rupiah to spelled-out form in Indonesian.
GET https://api.i-as.dev/api/spelled/rupiah?amount=1234567&lang=id
Response Example:
{
"spelled": "Satu Juta Dua Ratus Tiga Puluh Empat Ribu Lima Ratus Enam Puluh Tujuh Rupiah"
}
The API responds with a JSON object containing the spelled-out version of the Rupiah amount.
{
"spelled": "<spelled-out amount>"
}
Where <spelled-out amount>
is the Rupiah amount in words.
If the amount provided is not a valid number, the API will return an error:
{
"error": "Invalid amount format"
}
amount
parameter is a valid number, and if it includes separators (e.g., commas or periods), they should be correctly formatted.lang
parameter should be set to either id
(for Indonesian) or en
(for English) based on your desired language.