Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Table of Contents
stylenone

Changelogs

Version

Date

Changes by

Description of change

V1.0

Mar 29, 2024

Que Nguyen

  • Add Table of Contents.

  • Add Changelogs.

V1.0.1

April 10, 2024

Que Nguyen

  • Add Release Status table.

Release status

Environment

Status

Released Date

Version

DEV

Status
colourGreen
titleReleased

Mar 25, 2024

V1.0

UAT

Status
colourGreen
titleRELEASED

Mar 25, 2024

V1.0

PROD

Status
colourGreen
titleRELEASED

Mar 25, 2024

V1.0

API Definition

Upload Document

Request Header

Name

Value

Authorization

Bearer {access_token}

Request Payload

Field

Type

Description

File

form

Mime types:

  • image/*

  • application/pdf

  • application/msword

  • application/vnd.openxmlformats-officedocument.wordprocessingml.document

  • application/vnd.ms-excel

  • application/vnd.openxmlformats-officedocument.spreadsheetml.sheet

  • text/plain

Max size: 40MB

multipart/form

Response Header

Content-Type

application/json

Response Body

Field

Type

Description

Id

uuid

File unique identifier

Return file Id

Request

Status
colourGreen
titlePOST
/public/v2/documents/devices

Request with cURL

Code Block
languagec
curl --location '{url}/public/v2/documents/devices' \
--header 'Authorization: Bearer {access_token}' \
--form 'File=@"/C:/Users/Document.docx"'

Response

Info

200 Success

Code Block
{
  "Data": {
    "Id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
  },
  "Errors": [],
  "Meta": null,
  "StatusCode": 200,
  "Message": "Success"
}

Warning

404 Not Found

Code Block
languagejson
{
  "Data": null,
  "Errors": [],
  "Meta": null,
  "StatusCode": 404,
  "Message": "Not Found"
}

Warning

422 Unprocessable Entity

Code Block
languagejson
{
  "Data": null,
  "StatusCode": 422,
  "Errors": [],
  "Meta": null,
  "Message": "Unprocessable Entity"
}

Warning

401 Unauthorized

Code Block
languagejson
{
  "Data": null,
  "StatusCode": 401,
  "Errors": [],
  "Meta": null,
  "Message": "Unauthorized"
}