General Recapture Detection

Updated at:

1. Product overview

General Recapture Detection determines whether an image is a recaptured image. You can use it for risk screening of photos from various types of store inspections. The result can be used for risk interception in your audit process or to flag images for manual review.

2. Use cases

  1. Photo audits for store inspections. Screens photos submitted by stores for recapture risk.

  2. Review of abnormal photos. Forwards photos flagged as recaptures to your team for manual review.

3. Features

This feature accepts a single HTTPS image URL as input. If the recognition is successful, the result.isFake field returns true if the image is a recapture or false if it is a non-recapture. The success field indicates whether the call succeeded. Your business logic determines whether an image passes your audit requirements.

4. Developer guide

The following fields and examples use the casing and structure of the service's workflow. The public endpoint, authentication method, and response format are subject to the final released API.

4.1 Request parameters

Parameter

Type

Required

Description

imageUrl

String

Yes

The HTTPS URL of the image to recognize. The image must be accessible, and the URL must not contain any whitespace characters, usernames, or passwords.

4.2 Request example

{
  "imageUrl": "https://example.com/images/api-03.jpg"
}

When making a call, replace the sample with an accessible image URL.

4.3 Response parameters

Field path

Type

Description

success

Boolean

Indicates whether the request succeeded.

errorCode

String

An empty string on success. Returns an error code on a service failure.

errorMessage

String

An empty string on success. Returns a detailed description on a service failure.

result

Object

The service result. An empty object on a service failure.

result.type

String

Always general on a successful request.

result.isFake

Boolean

Returned on a successful request. A value of true indicates a recapture, and a value of false indicates a non-recapture.

usageMap

Object

Returns {"ProcessingCount": 1} on a successful request. Returns an empty object on a service failure.

usageMap.ProcessingCount

Integer

The count of successfully processed images, which is 1. This field is omitted on a service failure.

4.4 Response examples

Success

{
  "success": true,
  "errorCode": "",
  "errorMessage": "",
  "result": {
    "type": "general",
    "isFake": false
  },
  "usageMap": {
    "ProcessingCount": 1
  }
}

Parameter error

{
  "success": false,
  "errorCode": "InvalidParameter",
  "errorMessage": "The imageUrl must be an image URL that starts with https",
  "result": {},
  "usageMap": {}
}

Processing failure

{
  "success": false,
  "errorCode": "DownstreamUnavailable",
  "errorMessage": "[General Recapture Detection] The response is empty or not a valid JSON object",
  "result": {},
  "usageMap": {}
}

4.5 Error codes

Error code

Description

Recommended action

InvalidParameter

A parameter in the request is invalid.

Check the errorMessage, correct the parameters or image URL, and then retry the call.

DownstreamUnavailable

Indicates a temporary downstream service error. Potential causes include authentication failure, rate limiting, timeout, an empty response, or a response parsing error.

Check the resource and service status based on the errorMessage. For temporary failures, you can retry after a short interval.

After receiving the response, check the success, errorCode, and errorMessage fields to determine the outcome. If the API endpoint returns a platform-level error, refer to the HTTP status code and the platform's error message for details about platform Error Codes.