Files

The Files API is used to access, upload, download, and modify the files in the file library on your business' account. The Files API is also used to access, create, and update the folders in the file library on your business' account.


On this page





Files API Endpoints

These are the endpoints that are available under the /files path, which lists all the different files in the file library on your business' account.

EndpointDescription
GET /filesReturns all file objects on a business' account in array format.
POST /files

Updates an existing file object or creates a folder.

Request body/payload: Must pass a file object in request body/payload. 

For these calls, you need to pass a files object with all required fields and any fields you want to update or set filled in the body of the payload. We have an example of a files object in the responses section below and have indicated the required fields in the object values table at the bottom of this page.

When creating a folder, must set the fileLibraryType to "FOLDER".

POST /businessWeb/fileUploadS3.do

Uploads a file to the file library. Files can be made public or private.

For these calls, you need to pass a fileUploadS3 object with the fields file, businessId, uploadedFileName, and userName filled in the body of the payload, and when uploading a file to be made public you must set the fileLibraryType property to "ASSET".

DELETE /files/{fileLibraryUUid}Removes file entirely by going into the file repository and deleting it.




Files API Parameters

Data points passed on in the request URL portion of the API call that are used to filter the data being requested. 

ParameterTypeEndpoints to be used withDescription
fileLibraryTypestringGET /filesShould be set to "FOLDER" to return only files that have fileLibraryType property set to FOLDER.
parentFileLibraryUUIDintegerGET /filesShould be set to the fileLibraryUUID of a file that has fileLibraryType = FOLDER to return all files in that folder.




Files API Request Body/Payload

The objects below represent the minimum viable objects to pass that are needed to create a files object. Check whether or not a property can be written to by looking at the Object Values table below to see if the property is writable.

POST /fileUploadS3
(
    "businessId": 43111,
    "uploadedFileName": TimeTap Writer Style Guide.pdf,
    "userName": MORGANKEARNEY
)
POST /files
{
    "businessId": 43111,
    "calendarId": null,
    "clientId": null,
    "contentType": "image/jpeg",
    "createdDate": 1539884199278,
    "createdUser": "MORGANKEARNEY",
    "deleted": false,
    "emailId": null,
    "encrypted": false,
    "extension": "JPG",
    "fileLibraryType": "ASSET",
    "fileLibraryUUID": "f863c345915940d49483d933881a2391",
    "fileName": "BellanMe.JPG",
    "fileSize": 113902,
    "modifiedDate": null,
    "modifiedUser": null,
    "parentFileLibraryUUID": null,
    "professionalId": null,
    "publicVisible": true,
    "referenceId": null,
    "s3Bucket": "tt-client-public",
    "s3Key": "43111/ttu_5686859481988427234.JPG",
    "url": "https://d3gfi7c8oijy7q.cloudfront.net/43111/ttu_5686859481988427234.JPG"
}
POST /files (creating a folder)
{
    "businessId": 43111,
    "fileLibraryType": "FOLDER",
    "fileName": "Text files",
    "filesForDisplay": []
}




Files API Responses

GET /files
[{
    "businessId": 43111,
    "calendarId": null,
    "clientId": null,
    "contentType": "image/png",
    "createdDate": 1539357134663,
    "createdUser": "JoeSchmo",
    "deleted": false,
    "emailId": null,
    "encrypted": true,
    "extension": "png",
    "fileLibraryType": null,
    "fileLibraryUUID": "ef2844beed084dc0dec359a2ed9",
    "fileName": "Share-Links.png",
    "fileSize": 539,
    "modifiedDate": null,
    "modifiedUser": null,
    "parentFileLibraryUUID": null,
    "professionalId": null,
    "publicVisible": true,
    "referenceId": null,
    "s3Bucket": "tt-client-private",
    "s3Key": "43111/ttu_5276261373056349971.png",
    "url": null
}]
POST /files
{
    "businessId": 43111,
    "calendarId": null,
    "clientId": null,
    "contentType": "image/png",
    "createdDate": 1539869675951,
    "createdUser": "JoeSchmo",
    "deleted": false,
    "emailId": null,
    "encrypted": true,
    "extension": "png",
    "fileLibraryType": null,
    "fileLibraryUUID": "72c0a24cd1da4da6a3c40bbc28ff5c06b",
    "fileName": "interviewinvite1.png",
    "fileSize": 71629,
    "modifiedDate": 1539870115797,
    "modifiedUser": "JoeSchmo",
    "parentFileLibraryUUID": null,
    "professionalId": null,
    "publicVisible": true,
    "referenceId": null,
    "s3Bucket": "tt-client-private",
    "s3Key": "43111/ttu_8058076314446103561.png",
    "url": null
}
POST /files (creating a folder)
{
    "businessId": 43111,
    "calendarId": null,
    "clientId": null,
    "contentType": null,
    "createdDate": 1539872825713,
    "createdUser": "JoeSchmo",
    "deleted": false,
    "emailId": null,
    "encrypted": null,
    "extension": null,
    "fileLibraryType": "FOLDER",
    "fileLibraryUUID": "a105e0e044a744dea937fdc06df87f01",
    "fileName": "Text files",
    "fileSize": null,
    "modifiedDate": null,
    "modifiedUser": null,
    "parentFileLibraryUUID": null,
    "professionalId": null,
    "publicVisible": true,
    "referenceId": null,
    "s3Bucket": null,
    "s3Key": null,
    "url": null
}




Files Object Values

Property NameTypeRequiredDescription
businessIdintegerYesProvides unique numeric ID for the business to which specified file belongs.
calendarIdinteger
Provides unique numeric ID for any appointment connected to specified file.
clientIdinteger
Provides unique numeric ID for any client connected to specified file.
contentTypestring
Displays as content type for specified file.
createdDateinteger
Displays as date specified file was created in milliseconds elapsed since January 1, 1970 00:00:00 UTC form. 
createdUserstring
Displays as username of the user who created specified file.
deletedboolean
Indicates whether or not specified file has been deleted.
emailIdinteger
Provides unique numeric ID for the email connected to specified file.
encryptedboolean
Indicates whether or not specified file is encrypted.
extensionstring
Displays as the extension of specified file.
fileLibraryTypestring

Yes 

Displays as the file type of specified file.
fileLibraryUUIDstring
Provides unique alphanumeric ID for specified file library.
fileNamestringYesDisplays as the file name for specified file. 
fileSizeinteger
Provides the size of specified file.
modifiedDateinteger
Displays as date specified file was last modified in milliseconds elapsed since January 1, 1970 00:00:00 UTC form. 
modifiedUserstring
Displays as username of the user who last modified specified file.
parentFileLibraryUUIDstring
Provides unique alphanumeric ID for the parent file library of specified file.
professionalIdinteger
Provides unique numeric ID for any staff connected to specified file.
publicVisibleboolean
Indicates whether or not specified file is visible to the public.
referenceIdinteger
Provides ID of file reference.
s3Bucketstring
Displays as the name of the folder specified file is in as stored in Amazon Web Services repository. Has available options "tt-client-public" and "tt-client-private".
s3Keystring
Displays as specific subfolder and file name location of specified file as stored in Amazon Web Services repository.
urlstring
If file is public, this displays as the Amazon Web Services repository url.