Files
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 |
|---|---|
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 |
|---|---|---|---|
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.
Files API Responses
Files Object Values
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. |