Skip to main content

Document - Overview

A Document is the resource that representts a binary uploaded file, metadata about the file and relationship (attachement) to another resource in the system (ie; a document attached to an Activity resource).

Methods​

The API supports the following methods for Activity resources:

  • POST - Create
    • Inserts a Document by requiring (and matching on) both an internal_document_id (ie; the ID of the object on your internal system) and an internal_accound_id (ie; the ID of the object on your internal system).
  • GET - Download Link
    • Generate a single use, short lived (30 second max expiration) Signed S3 download URL to retrieve the binary file contents.
  • DELETE - Delete
    • Delete a single Document by internal_document_id (Can only delete documents which originated from your internal system).

Resource Representation​

The following JSON structure shows the format of a Document resource:

{
"id": integer,
"internal_account_id": string,
"internal_document_id": string,
"attached_to_type": ENUM("project","account","credit", "activity"),
"attached_to_id": string,
"attached_to_internal_id": string,
"upload": {
"filename": string,
"size": string,
"extension": string
},
"created_by": {
"internal_user_id": string,
"email": string,
"full_name": string
},
"created_at": string (RFC 3339 Format - 2022-05-03T17:13:44Z),
"updated_at": string (RFC 3339 Format - 2022-05-03T17:13:44Z)
}

Resource Properties​

The following table defines the properties that appear in this resource:

KeyTypeDefinition
idintegerThe ID of the Document.
internal_account_idstringThe ID of the Account on your internal system.
internal_document_idstringThe ID of the Document on your internal system.
attached_to_typeENUM("project","account","credit", "activity")The object type this document is attached to.
attached_to_idintegerThe Incentify ID of the object which this document is attached to.
attached_to_internal_idstringThe ID of the Object this document is attached to on your internal system.
upload.filenamestringThe filename of the uploaded document.
upload.sizestringsize and scale of document upload (eg: 2.5MB)
upload.extensionENUM("pdf", "docx", "xlsx", "csv", ...)the file extension of document upload
created_by.internal_user_idstringThe ID of the user on your internal system.
created_by.emailstringThe email of the user on your internal system.
created_by.full_namestringThe full name of the user on your internal system, or within Incentify.
created_atstringThe date and time that the User was created. The value is specified in RFC 3339 Format (2022-05-03T17:13:44Z).
updated_atstringThe date and time that the User was last updated. The value is specified in RFC 3339 Format (2022-05-03T17:13:44Z).