API Endpoint
Endpoint:POST /api/common/update-object
Content-Type: multipart/form-data
Authentication: Required (Token header: token or api_access_token)
Request Structure
The endpoint accepts amultipart/form-data request with the following structure:
form_banner- Banner image file (PNG, JPG, JPEG, SVG, GIF)form_logo- Logo image file (PNG, JPG, JPEG, SVG, GIF)screenshot- Screenshot image file (PNG, JPG, JPEG, SVG, GIF)
cURL Example
object_id is required. All other fields are optional and only provided fields will be updated.
Response
Success Response
Status Code:200 OK
Error Responses
422 - Validation Error
Status Code:422 Unprocessable Entity
"Object Details is missing"- Required fieldobject_idis missing"Object ID is invalid"- Invalid object ID format"OBJECT_NOT_FOUND"- Form with provided ID does not exist or doesn’t belong to your workspace"INVALID_FORM_BANNER_FILE_TYPE"- Banner file type is not supported (use PNG, JPG, JPEG, SVG, or GIF)"INVALID_FORM_LOGO_FILE_TYPE"- Logo file type is not supported (use PNG, JPG, JPEG, SVG, or GIF)"INVALID_SCREENSHOT_FILE_TYPE"- Screenshot file type is not supported (use PNG, JPG, JPEG, SVG, or GIF)"FORM_BANNER_FILE_REQUIRED"- Banner file field is present but empty"FORM_LOGO_FILE_REQUIRED"- Logo file field is present but empty"SCREENSHOT_FILE_REQUIRED"- Screenshot file field is present but empty
401 - Authentication Error
Status Code:401 Unauthorized
500 - Server Error
Status Code:500 Internal Server Error
Error Codes
| Status Code | Error Code | Description |
|---|---|---|
| 200 | - | Success |
| 401 | AUTH_REQUIRED | Authentication required - Missing or invalid token |
| 401 | AUTH_INVALID | Invalid authentication token or session expired |
| 422 | VALIDATION_ERROR | Validation failed - Check required fields and data format |
| 422 | MISSING_FIELD | Required field missing |
| 422 | INVALID_FORMAT | Invalid data format or type |
| 422 | OBJECT_NOT_FOUND | Form with provided ID does not exist |
| 422 | INVALID_FORM_BANNER_FILE_TYPE | Banner file type not supported |
| 422 | INVALID_FORM_LOGO_FILE_TYPE | Logo file type not supported |
| 422 | INVALID_SCREENSHOT_FILE_TYPE | Screenshot file type not supported |
| 422 | FORM_BANNER_FILE_REQUIRED | Banner file field is empty |
| 422 | FORM_LOGO_FILE_REQUIRED | Logo file field is empty |
| 422 | SCREENSHOT_FILE_REQUIRED | Screenshot file field is empty |
| 500 | SERVER_ERROR | Internal server error |
Update Behavior
Partial Updates
- Only fields you provide will be updated
- Fields not included in the request remain unchanged
- You can update specific fields without affecting others
File Upload Behavior
- New File Upload: If you upload a new file, it replaces the existing file
- File Path Provided: If you provide a file path, the system uses that path (assumes file already exists)
- Neither Provided: If you don’t provide a file or path, the existing file is retained
Automatic Updates
The following fields are automatically updated by the system:UPDATED_ON- Set to current timestampUPDATED_BY- Set to the authenticated user IDIP_ADDRESS- Recorded from the requestUSER_AGENT- Recorded from the request headers
File Upload Guidelines
Supported File Types
- Banner, Logo, Screenshot: PNG, JPG, JPEG, SVG, GIF
File Upload Requirements
- File Size: Ensure files are reasonably sized for web use
- File Format: Only image formats listed above are accepted
- Validation: The system validates both file extension and MIME type
- Storage: Files are securely stored in company-specific directories:
- Banner images:
{company_id}/forms/banner - Logo images:
{company_id}/forms/logo - Screenshot images:
{company_id}/forms/screenshot
- Banner images:
Important Notes
object_idis required - all other fields are optional- Partial updates are supported - only include fields you want to change
- File uploads replace existing files when new files are provided
- Updates are transactional - if any step fails, the entire operation is rolled back
- Cache is automatically cleared after successful updates
- Updates are immediately reflected in the system
- The system automatically tracks who made the update and when

