Introduction
The GetImageSettings API is part of the Artifi product personalization platform and is used to retrieve the image upload configuration settings associated with a specific website. When a customer initiates an image upload - such as uploading a personal photo during product customization - the front-end application must first understand the rules governing what kind of images are acceptable. This API provides exactly that: the allowed file extensions, maximum file size, required image DPI, and the company's physical folder name used for storing uploaded assets.
This API is primarily consumed during the initialization of the image upload workflow — before the actual upload takes place - to enforce client-side and server-side validation in sync. It returns a structured JSON response containing image policy settings, making it a foundational API for any upload-related feature in the Artifi ecosystem.
Use Cases
- Pre-Upload Validation on UI
Retrieve allowed file types and size limits before enabling file selection or drag-and-drop functionality.
- DPI Enforcement for Print Workflows
Validate that uploaded images meet minimum DPI requirements for high-quality printing.
- Dynamic File Extension Handling
Avoid hardcoding supported formats by dynamically fetching allowed extensions from the API.
- File Size Limit Display
Display maximum file size (e.g., “Max 5 MB”) in the UI to reduce failed upload attempts.
- Multi-Tenant Configuration Support
Support different upload rules for different websites using the websiteId parameter.
- Admin Configuration Verification
Allow admins or integrators to verify backend image settings for a specific website.
- Mobile App Integration
Configure mobile image pickers dynamically during app initialization.
- Third-Party Integration Setup
Enable external platforms to align their upload rules with Artifi configurations.
- Upload Widget Initialization
Initialize upload components with proper validation rules and error handling.
API Details
Endpoint
GET /api/4/ /UploadImage/GetImageSettings
curl --location 'https://api.artifi.net/api/4/UploadImage/GetImageSettings' \
--header 'websiteId: 167' \
--header 'webApiClientKey: c961461a-b287-448c-b9ea-e1162bd80b8e'
Parameters
Header Validation
Header Name | Type | Required | Description |
websiteId | int | Yes | Unique identifier of the website. |
webApiClientKey | string | Yes | API client key used for authentication. |
Success Responses
{
"Response": "Success",
"Message": "",
"Data": {
"FileSize": 10,
"ImageExtensions": "JPG,JPEG,PNG,BMP,GIF,AI,EPS,PDF,SVG,SVGZ,TIFF,WEBP,PSD,HEIC,HEIF,TIF",
"Dimension": {
"Width": 5000,
"Height": 5000
},
"ImageDPI": 90,
"UserPhotoImageWidth": 0,
"UserPhotoImageHeight": 0,
"RemoveNegativeSpace": false
},
"ErrorCode": ""
}
Error Code List (Click Here)
Q&A
1. What format does the API response use?
The API returns data in JSON format, wrapped in a standard response structure.
2. Is authentication required for this API?
Yes, the API requires websiteId and webApiClientKey in the request headers.
3. What does the FileSize value represent?
It represents the maximum allowed file size for uploads.
4. Are image extensions configurable per website?
Yes, each website can have its own set of allowed image extensions.
5. What is the purpose of ImageDPI?
It defines the minimum DPI required for uploaded images.
6. Can this API be used for client-side validation?
Yes, it is primarily used to validate files before uploading.
7. What happens if invalid credentials are provided?
The API will return an error response with an appropriate error code.
8. Does this API upload images?
No, it only provides configuration settings for image uploads.
9. Can this API be used in mobile apps?
Yes, it is suitable for both web and mobile integrations.
10. What happens if no data is returned?
The API will return a failure response indicating that data cannot be retrieved.
11. Is there a limit on the number of extensions returned?
No, all configured extensions for the website are returned.
12. Does the API enforce validation automatically?
No, it provides rules. Validation must be implemented on the client or server.
13. Can dimensions be enforced using this API?
Yes, maximum width and height constraints are provided.