Image Upload
Use this API to upload one or more cooler images from mobile apps, IoT devices, StoreAware, StoreBuddy, and third-party systems.
Endpoint
POST /Controllers/CoolRAPI.ashx?action=uploadImage
Content-Type: multipart/form-data
Sample URL:
POST {base_url}/Controllers/CoolRAPI.ashx?StoreNumber=1&SceneType=ProductAnalysis&action=uploadImage&IsStitchImage=False&SerialNumber=Dev-Temp-order_1&ImageReceivedFrom=2&IMEI=8473294723949
All parameters are sent as form fields along with uploaded file(s).
Authentication
Use valid integration credentials/token provided by CoolR. The authentication context determines the client scope and what assets can be accessed.
Prerequisites
multipart/form-datarequest with at least one image file.- At least one identifier must be provided to resolve the target asset/location:
SerialNumber, orStoreNumber, orIMEI(for supported integration flows)
- Single-image and multi-image upload are both supported.
Identifier selection
SerialNumber (recommended)
Use SerialNumber when the cooler serial is known. This is the most direct and reliable way to map the upload to an asset.
StoreNumber
Use StoreNumber when only outlet/store context is known.
- Works best when one cooler is mapped to the store.
- If both
SerialNumberandStoreNumberare sent, serial-based matching is preferred and store may be used for consistency checks.
IMEI
Use IMEI when the uploading device identity is known but cooler serial is not.
- Typical use case: manufacturer or device-led integrations.
- Purpose: allows the platform to resolve the associated asset serial through device mapping.
Request parameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
action | Yes | string | — | Must be uploadImage |
SerialNumber | Conditional* | string | — | Cooler/asset serial number |
StoreNumber | Conditional* | string | — | Outlet/store code (location code) |
IMEI | Conditional* | string | — | Device IMEI used for asset resolution in supported flows |
SceneType | No | string | ProductAnalysis | Scene category of the image |
ImageReceivedFrom | No | number | 1 | Source system identifier |
IsStitchImage | No | bool | true | Whether uploaded files should be stitched |
GridOrder | No | string | — | Comma-separated placement order for grid stitching |
BeforeAfterImage | No | number | 0 | Flags lifecycle context (before/after event) |
VerifyFileSize | No | bool | false | Marks zero-byte saved uploads as unsuccessful in response |
* At least one of SerialNumber, StoreNumber, or IMEI should be provided.
Parameter details
SceneType
Common values:
ProductAnalysis(default)POSAssetBarcodeAssetViewStoreViewPromotion
ImageReceivedFrom
Identifies who submitted the image.
1= StoreAware (default)2= StoreBuddy
This field is used for source tracking and source-specific processing behavior.
IsStitchImage
IsStitchImage=true: multiple uploaded files can be combined as a stitched image.IsStitchImage=false: no stitching occurs; each uploaded file is processed as a separate image.
GridOrder
Controls multi-file grid layout during stitching.
Example:
GridOrder=2,1,3
The number of positions should match the number of uploaded files.
BeforeAfterImage
Captures contextual stage of the image in operational workflows.
0= Not specified1= Before event such as - before merchandising2= After event such as - after merchandising
VerifyFileSize
If enabled, uploads saved as zero-byte files are returned with unsuccessful status (Success: false) and informational message.
Upload examples
Standard single upload
POST /Controllers/CoolRAPI.ashx?action=uploadImage
SerialNumber=XYZ789
SceneType=ProductAnalysis
ImageReceivedFrom=1
[file: shelf.jpg]
Multi-image stitched upload
POST /Controllers/CoolRAPI.ashx?action=uploadImage
SerialNumber=XYZ789
IsStitchImage=true
[file: left_panel.jpg]
[file: right_panel.jpg]
Grid-ordered stitched upload
POST /Controllers/CoolRAPI.ashx?action=uploadImage
SerialNumber=XYZ789
GridOrder=2,1,3
[file: center.jpg]
[file: left.jpg]
[file: right.jpg]
Upload by outlet code
POST /Controllers/CoolRAPI.ashx?action=uploadImage
StoreNumber=STORE-042
[file: shelf.jpg]
Upload by IMEI
POST /Controllers/CoolRAPI.ashx?action=uploadImage
IMEI=352099001761481
[file: shelf.jpg]
Response
The API returns a JSON array with one object per accepted upload result.
Success Response
[
{
"Success": true,
"Info": "Image uploaded successfully",
"UniqueGuid": "a3f1c29d-...",
"AssetPurityId": 84521
}
]
Error Response
[
{
"Success": false,
"Info": "Asset not found: ASSET-123"
}
]
| Field | Type | Description |
|---|---|---|
Success | bool | Whether upload was accepted successfully |
Info | string | Success or error message |
UniqueGuid | string | Unique image identifier (only present when Success: true) |
AssetPurityId | number | Internal image record identifier (only present when Success: true) |
Common errors
| Message | Meaning |
|---|---|
Action not found | Invalid or missing action parameter |
Invalid request. Client not specified | Authentication context is missing client scope |
No image files found to upload | Request has no file payload |
StoreNumber or Asset Serial# is required | Missing required asset/location identifier |
Asset not found: ... | Provided identifier(s) do not map to a known asset |
Outlet not Found OR is Linked with Asset... | Asset-location mapping is invalid or missing |
Asset assigned to outlet code X, passed code Y - mismatch | Serial and store code do not match expected mapping |
Files did not match with the grid order | GridOrder count differs from uploaded file count |
...Inactive | Target asset is inactive/disabled |
Image saved with 0 bytes | Zero-byte image persisted (with file-size verification enabled) |
Something went wrong | Unexpected server-side issue during upload |
Something went wrong while saving image | Unexpected error during image save operation |
Submission outcomes
After upload, images may be accepted as pending, auto-provisioned, or rejected depending on scene, planogram availability, and operational checks.