สารบัญเอกสาร

API อภิธานศัพท์

สร้างศัพท์เฉพาะ

POST/v1/glossary/create

สร้างอภิธานศัพท์ใหม่พร้อมคำศัพท์และคำแปล

ที่อยู่แบบเต็ม
https://otranslator.com/api/v1/glossary/create
การรับรอง
ต้องส่งผ่าน API Key ในส่วนหัวคำขอ Authorization
Content-Type
application/json
รูปแบบผิดพลาด
{ "error": "Invalid API key." }

ข้อควรระวัง

คลังคำศัพท์ถูกแยกตามบัญชีที่เป็นเจ้าของ API Key ปัจจุบันเมื่อสร้างงานแปลสามารถส่งชื่อคลังคำศัพท์ผ่านพารามิเตอร์ glossary ได้

keys คือรายการศัพท์ต้นฉบับ translated คือ JSON mapping จากศัพท์ต้นฉบับไปยังข้อความแปลปลายทาง

ตัวอย่าง

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": "N9aErn",
6  "targetLang": "English",
7  "keys": [
8    "储蓄分流"
9  ],
10  "translated": {
11    "储蓄分流": "Diversion of household deposits"
12  }
13}'

พารามิเตอร์ของคำขอ

พารามิเตอร์ประเภทค่าเริ่มต้นคำอธิบายตัวอย่าง
*nameString-

ชื่ออภิธานศัพท์

ศัพท์ทางการเงิน
descString-

คำอธิบายศัพท์บัญญัติ

-
*targetLangString-
  • แสดงว่าศัพท์เฉพาะนี้จะถูกใช้งานอย่างมีประสิทธิภาพเมื่อแปลเอกสารเป็น"ภาษาปลายทาง"
  • ภาษาที่รองรับ: สอบถาม
English
*keysString[]-

รายการศัพท์ต้นฉบับ

["储蓄分流"]
*translatedJSON-

การแมป JSON ของคำศัพท์จากต้นฉบับสู่คำแปล

{"储蓄分流":"Diversion of household deposits"}

การตอบสนอง

พารามิเตอร์ประเภทค่าเริ่มต้นคำอธิบายตัวอย่าง
glossaryIdString-

ID อภิธานศัพท์

-

ข้อผิดพลาดทั่วไป

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.

API อภิธานศัพท์
สอบถามอภิธานศัพท์