Files

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.

 

 


 

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.

Endpoint

Description

Endpoint

Description

GET /files

Returns 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. 

Parameter

Type

Endpoints to be used with

Description

Parameter

Type

Endpoints to be used with

Description

fileLibraryType

string

GET /files

Should be set to "FOLDER" to return only files that have fileLibraryType property set to FOLDER.

parentFileLibraryUUID

integer

GET /files

Should 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.

( "businessId": 43111, "uploadedFileName": TimeTap Writer Style Guide.pdf, "userName": MORGANKEARNEY )
{ "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" }
{ "businessId": 43111, "fileLibraryType": "FOLDER", "fileName": "Text files", "filesForDisplay": [] }

 


 

Files API Responses

[{ "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 }]
{ "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 }
{ "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 Name

Type

Required

Description

Property Name

Type

Required

Description

businessId

integer

Yes

Provides unique numeric ID for the business to which specified file belongs.

calendarId

integer

 

Provides unique numeric ID for any appointment connected to specified file.

clientId

integer

 

Provides unique numeric ID for any client connected to specified file.

contentType

string

 

Displays as content type for specified file.

createdDate

integer

 

Displays as date specified file was created in milliseconds elapsed since January 1, 1970 00:00:00 UTC form. 

createdUser

string

 

Displays as username of the user who created specified file.

deleted

boolean

 

Indicates whether or not specified file has been deleted.

emailId

integer

 

Provides unique numeric ID for the email connected to specified file.

encrypted

boolean

 

Indicates whether or not specified file is encrypted.

extension

string

 

Displays as the extension of specified file.

fileLibraryType

string

Yes 

Displays as the file type of specified file.

fileLibraryUUID

string

 

Provides unique alphanumeric ID for specified file library.

fileName

string

Yes

Displays as the file name for specified file. 

fileSize

integer

 

Provides the size of specified file.

modifiedDate

integer

 

Displays as date specified file was last modified in milliseconds elapsed since January 1, 1970 00:00:00 UTC form. 

modifiedUser

string

 

Displays as username of the user who last modified specified file.

parentFileLibraryUUID

string

 

Provides unique alphanumeric ID for the parent file library of specified file.

professionalId

integer

 

Provides unique numeric ID for any staff connected to specified file.

publicVisible

boolean

 

Indicates whether or not specified file is visible to the public.

referenceId

integer

 

Provides ID of file reference.

s3Bucket

string

 

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".

s3Key

string

 

Displays as specific subfolder and file name location of specified file as stored in Amazon Web Services repository.

url

string

 

If file is public, this displays as the Amazon Web Services repository url.