PATCH /files/{table_name}/{id}/{file_name}
Update file upload status
Authentication Required
Authorization: Bearer {token}
header string This header is required to access this endpoint
Required Parameters
table_name
path string Entity type
id
path string Entity ID
Optional Parameters
Click here to view an exhaustive list of all available parameters
additionalKey
query string An additional key to categorize or organize your file uploads against this entity. ie additional_documents, photos, etc... defaults to __DEFAULT__
Request Body
{}{ "fileUploadSuccess": false, "replaceCurrentFileOnUpload": false}Try it out
Loading...
Output:
Responses
Description
File status updated
{ "id": "string", "tableName": "string", "entityId": "string", "fileName": "string", "displayName": "string", "description": "string", "mimeType": "string", "size": 0, "checksum": "string", "s3Bucket": "string", "s3Key": "string", "status": "pending", "scanStatus": "string", "metadata": {}, "createdBy": "string", "updatedBy": "string", "createdAt": "string", "updatedAt": "string"}Description
Invalid input
{ "error": "string"}Description
Unauthorized
Description
Insufficient permissions
Description
Entity not found
Description
Too many requests
References
#/components/schemas/FileMetadata
type: objectrequired: - id - tableName - entityId - fileName - mimeType - sizeproperties: id: type: string readOnly: true tableName: type: string description: Entity type (e.g., applications, merchants) entityId: type: string description: ID of parent entity fileName: type: string description: Original file name displayName: type: string description: User-friendly name description: type: string mimeType: type: string size: type: integer description: File size in bytes checksum: type: string description: SHA-256 hash s3Bucket: type: string readOnly: true s3Key: type: string readOnly: true status: type: string enum: - pending - available - deleted default: pending scanStatus: type: string enum: - pending - clean - infected readOnly: true metadata: type: object additionalProperties: true createdBy: type: string readOnly: true updatedBy: type: string readOnly: true createdAt: type: string format: date-time readOnly: true updatedAt: type: string format: date-time readOnly: true|export interface FileMetadata { id: string; /** Entity type (e.g., applications, merchants) */ tableName: string; /** ID of parent entity */ entityId: string; /** Original file name */ fileName: string; /** User-friendly name */ displayName?: string; description?: string; mimeType: string; /** File size in bytes */ size: number; /** SHA-256 hash */ checksum?: string; s3Bucket?: string; s3Key?: string; status?: "pending" | "available" | "deleted"; scanStatus?: "pending" | "clean" | "infected"; metadata?: Record<string, any>; createdBy?: string; updatedBy?: string; createdAt?: Date; updatedAt?: Date;}Route Source Code
Check out the source code for this route entrypoint here: /files/[table_name]/[id]/[file_name]/route.ts
Or the swagger.yaml spec this documentation was generated from:
/files/swagger.yaml