API Glosarium
Perbarui glosarium
Perbarui detail glosarium atau istilah.
- Alamat lengkap
- https://dltranslator.com/api/v1/glossary/update
- Autentikasi
- Perlu menyertakan API Key di header permintaan Authorization
- Content-Type
- application/json
- Format error
- { "error": "Invalid API key." }
Hal-hal yang Perlu Diperhatikan
Field yang tidak dikirimkan akan tetap tidak berubah.
Jika memperbarui keys, disarankan untuk sinkronkan memperbarui translated, memastikan setiap istilah sumber memiliki terjemahan yang sesuai.
Contoh
1curl -X POST 'https://dltranslator.com/api/v1/glossary/update' \
2--header 'Authorization: [yourSecretKey]' \
3--header 'Content-Type: application/json' \
4--data '{
5 "glossaryId": "[string]",
6 "name": "0twXbd",
7 "keys": [
8 "储蓄分流"
9 ],
10 "translated": {
11 "储蓄分流": "Diversion of household deposits"
12 }
13}'Parameter Permintaan
| Parameter | Jenis | Bawaan | Deskripsi | Contoh |
|---|---|---|---|---|
| *glossaryId | String | - | ID glosarium | - |
| name | String | - | Nama | Istilah keuangan2 |
| desc | String | - | Deskripsi | - |
| targetLang | String | - |
| - |
| keys | String[] | - | Array dari semua terminologi | ["储蓄分流"] |
| translated | JSON | - | Map terjemahan yang bersesuaian dengan terminologi | {"储蓄分流":"Diversion of household deposits"} |
Respons
| Parameter | Jenis | Bawaan | Deskripsi | Contoh |
|---|---|---|---|---|
| glossaryId | String | - | ID glosarium | - |
| name | String | - | Nama | - |
| desc | String | - | Deskripsi | - |
| targetLang | String | - | Bahasa target | - |
| keys | String[] | - | Array dari semua terminologi | - |
| translated | JSON | - | Map terjemahan yang bersesuaian dengan terminologi | - |
| createdAt | DateTime | - | Waktu pembuatan glosarium | - |
| updatedAt | DateTime | - | Waktu pembaruan glosarium | - |
Kesalahan Umum
401 Missing API key.
The Authorization request header is required.
401 Invalid API key.
The API key does not exist, has been deleted, or is no longer valid.
400 Missing required parameter: glossaryId.
Provide the glossaryId returned by the create glossary API.
404 Glossary not found.
The glossary does not exist or does not belong to the current API account.