QIMA Logo
API Reference

8 categories • 44 endpoints

  • All APIs

    44


  • File
    v1.0.0

    Upload file

    Request

    Query Parameters
    NameTypeLocationRequiredDescription
    userIdstringpathYesQIMA client user login ID.
    docTypestringpathYesThe document type of this attachment, like ORDER_ATT, which means order attachment
    sourceIdstringpathYesThe resource id that the attachment will be linked to, like inspection product id, order id etc.Use comma to concat multiple source ids, like id_1,id_2,id_3
    recordHistorystringqueryNoWhether to record this upload in the resource's history log.
    includeThumbnailstringqueryNoWhether to generate/include a thumbnail for the uploaded file.
    filefileformDataYesThe file to upload.
    Responses

    200
    Uploaded file meta info is returned

    Content-Type: application/json

    id
    string
    FieldTypeDescription
    idstringFile id
    FieldTypeDescription
    srcIdstringSource id, related resource it
    FieldTypeDescription
    fileTypestringFile type in QIMA, describe the file is used for what purpose
    FieldTypeDescription
    fileNamestringFile name
    FieldTypeDescription
    commentsstringComments saved by uploader
    FieldTypeDescription
    objectKeystringFile path on S3
    FieldTypeDescription
    fileSizeintegerFile size in bytes
    FieldTypeDescription
    versionintegerVersion of the file, starts from 1
    FieldTypeDescription
    s3UrlstringTemporary url of the file on S3
    FieldTypeDescription
    createDatestringFile creation date, in `dd-MMM-yyyy` format (e.g. "02-Jul-2026").
    FieldTypeDescription
    updateDatestringFile last-updated date, in `dd-MMM-yyyy` format (e.g. "02-Jul-2026").
    {
      "id": "355FBF0CF83D4B39AA6EDE2A2A6117F4",
      "srcId": "613021F253D44D3DAC5A605DE6DB763E",
      "fileType": "ORDER_ATT",
      "fileName": "cover-101.png",
      "comments": "",
      "objectKey": "613021F253D44D3DAC5A605DE6DB763E/ORDER_ATT/0A1E336B57A744369B7BFE7D4E0222F2/cover-101.png",
      "fileSize": 109471,
      "version": 0,
      "s3Url": null,
      "createDate": "02-Jul-2026",
      "updateDate": "02-Jul-2026"
    }

    Content-Type: application/json


    Content-Type: application/json

    POST
    /user/{userId}/doc-type/{docType}/source/{sourceId}/file
    Request samples

    application/json

    {}

    Response samples

    application/json

    { "id": "355FBF0CF83D4B39AA6EDE2A2A6117F4", "srcId": "613021F253D44D3DAC5A605DE6DB763E", "fileType": "ORDER_ATT", "fileName": "cover-101.png", "comments": "", "objectKey": "613021F253D44D3DAC5A605DE6DB763E/ORDER_ATT/0A1E336B57A744369B7BFE7D4E0222F2/cover-101.png", "fileSize": 109471, "version": 0, "s3Url": null, "createDate": "02-Jul-2026", "updateDate": "02-Jul-2026" }