Skip to content

insertUploadedDocument

WRITE

Register the metadata row for a file already uploaded to storage.

POST /api/v1/documents/insertUploadedDocument
curl -X POST '<your-host>/api/v1/documents/insertUploadedDocument' \
  -H 'Authorization: Bearer <api-key>' \
  -H 'Content-Type: application/json' \
  -d '{
    "path": "string",
    "name": "string",
    "size": 0
  }'
Response
{
  "active": true,
  "companyId": "string",
  "createdAt": "string",
  "createdBy": "string",
  "description": "string",
  "extension": "string",
  "id": "string",
  "name": "string",
  "path": "string",
  "readGroups": [
    "string"
  ],
  "size": 0,
  "sourceDocument": "Consumable",
  "sourceDocumentId": "string",
  "type": "Archive",
  "updatedAt": "string",
  "updatedBy": "string",
  "writeGroups": [
    "string"
  ]
}

Parameters

ParameterType
"Job""Gauge Calibration Record""Issue""Purchase Order""Purchase Invoice""Quote""Request for Quote""Purchasing Request for Quote""Supplier Quote""Sales Order""Sales Invoice""Sales Return Order""Purchase Return Order""Shipment""Supplier""Customer""Part""Material""Tool""Consumable""Service"

Input schema

schema
{
  "type": "object",
  "properties": {
    "path": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "size": {
      "type": "number"
    },
    "sourceDocument": {
      "type": "string",
      "enum": [
        "Job",
        "Gauge Calibration Record",
        "Issue",
        "Purchase Order",
        "Purchase Invoice",
        "Quote",
        "Request for Quote",
        "Purchasing Request for Quote",
        "Supplier Quote",
        "Sales Order",
        "Sales Invoice",
        "Sales Return Order",
        "Purchase Return Order",
        "Shipment",
        "Supplier",
        "Customer",
        "Part",
        "Material",
        "Tool",
        "Consumable",
        "Service"
      ]
    },
    "sourceDocumentId": {
      "type": "string"
    }
  },
  "required": [
    "path",
    "name",
    "size"
  ]
}