Import words from an Excel file.

POST /words/importxlsx

Import words from an Excel file. The Excel file must follow this template NOTES:

  • The old data will NOT be DELETED or OVERWRITTEN, except if there is:
    • A word with EXACTLY the same definition (in either English or Vietnamese)
    • ...
multipart/form-data

Body Required

The Excel file to be imported. If the file is not valid, the API will return an error.

  • file string(binary)

Responses

  • 200 application/json

    OK, together with the link to the illustration.

    Hide response attribute Show response attribute object
  • 400

    The request is not following the convention.

  • 403

    The user is not authorized to import words (aka. not admin).

POST /words/importxlsx
curl \
 -X POST http://localhost:5000/words/importxlsx \
 --cookie "fastapiusersauth=$API_KEY" \
 -H "Content-Type: multipart/form-data" \
 -F "file=@file"
Response examples (200)
{
  "link": "https://meddict-vinuni.com/illustration/1.png"
}