Versions Compared

Key

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

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/grouped-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"
}