Skip to main content

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-data request with at least one image file.
  • At least one identifier must be provided to resolve the target asset/location:
    • SerialNumber, or
    • StoreNumber, or
    • IMEI (for supported integration flows)
  • Single-image and multi-image upload are both supported.

Identifier selection

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 SerialNumber and StoreNumber are 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

ParameterRequiredTypeDefaultDescription
actionYesstringMust be uploadImage
SerialNumberConditional*stringCooler/asset serial number
StoreNumberConditional*stringOutlet/store code (location code)
IMEIConditional*stringDevice IMEI used for asset resolution in supported flows
SceneTypeNostringProductAnalysisScene category of the image
ImageReceivedFromNonumber1Source system identifier
IsStitchImageNobooltrueWhether uploaded files should be stitched
GridOrderNostringComma-separated placement order for grid stitching
BeforeAfterImageNonumber0Flags lifecycle context (before/after event)
VerifyFileSizeNoboolfalseMarks 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)
  • POS
  • AssetBarcode
  • AssetView
  • StoreView
  • Promotion

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 specified
  • 1 = Before event such as - before merchandising
  • 2 = 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"
}
]
FieldTypeDescription
SuccessboolWhether upload was accepted successfully
InfostringSuccess or error message
UniqueGuidstringUnique image identifier (only present when Success: true)
AssetPurityIdnumberInternal image record identifier (only present when Success: true)

Common errors

MessageMeaning
Action not foundInvalid or missing action parameter
Invalid request. Client not specifiedAuthentication context is missing client scope
No image files found to uploadRequest has no file payload
StoreNumber or Asset Serial# is requiredMissing 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 - mismatchSerial and store code do not match expected mapping
Files did not match with the grid orderGridOrder count differs from uploaded file count
...InactiveTarget asset is inactive/disabled
Image saved with 0 bytesZero-byte image persisted (with file-size verification enabled)
Something went wrongUnexpected server-side issue during upload
Something went wrong while saving imageUnexpected 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.