Glossary API
Create Glossary
/v1/glossary/createCreate a new glossary with terms and translations.
Example
curl
1curl -X POST 'https://otranslator.com/api/v1/glossary/create' \
2--header 'Authorization: [yourSecretKey]' \
3--header 'Content-Type: application/json' \
4--data '{
5 "name": {
6 "id": "N9aErn"
7 },
8 "targetLang": "English",
9 "keys": "[\"储蓄分流\"]",
10 "translated": "{'储蓄分流':'Diversion of household deposits'}"
11}'Request Parameters
| Parameters | Type | Default | Description | Example |
|---|---|---|---|---|
| *name | String | - | Glossary name | Financial terminology |
| desc | String | - | Glossary description | - |
| *targetLang | String | - |
| English |
| *keys | String[] | - | List of source terms | ["储蓄分流"] |
| *translated | JSON | - | Map of terms to translations | {'储蓄分流':'Diversion of household deposits'} |
Response
| Parameters | Type | Default | Description | Example |
|---|---|---|---|---|
| glossaryId | String | - | Glossary ID | - |