Skip to main content

Programmatic Access to Session Data

The Entrupy Android SDK provides authentication data in three ways: the Detail View Controller for individual item details, fetchSessionDetails for your own UI, and the Entrupy API from your backend.

Overview​

Authentication data flows through three channels:

  • SDK UI (client-side): The Detail View displays authentication results and item details scoped to the logged-in user.
  • fetchSessionDetails (client-side): Returns the full result for one Entrupy ID, so you can show parts of it in your own screens.
  • Entrupy API (server-side): Your backend receives authentication results and status updates via webhooks, and can query the API for cross-user reporting and data synchronization.

1. SDK UI Components​

Detail View​

For individual item details, launch the Detail View using an Entrupy ID:

import com.entrupy.sdk.app.EntrupyApp

fun showItemDetails(entrupyId: String) {
EntrupyApp.sharedInstance().displayDetailViewForItem(entrupyId)
}

The Detail View displays:

  • Authentication result (Authentic, Unknown, Not Supported, etc.)
  • Item metadata (brand, item type, style)
  • Processing status and timeline
  • Certificate access (for authentic items)
  • Flag status and support features

2. Fetch Session Details by Entrupy ID​

Use fetchSessionDetails to get the full result of one item, including its timeline. The user must be logged in.

import com.entrupy.sdk.app.EntrupyApp
import com.entrupy.sdk.listeners.SessionDetailsCallback
import com.entrupy.sdk.model.EntrupyCaptureResult

fun loadSessionDetails(entrupyId: String) {
EntrupyApp.sharedInstance().fetchSessionDetails(
entrupyId,
object : SessionDetailsCallback {
override fun onSessionDetailsFetched(result: EntrupyCaptureResult) {
val brand = result.properties?.brand?.displayName
val header = result.status?.result?.display?.header
println("${result.entrupyId}: $brand, $header")
}

override fun onSessionDetailsError(errorCode: Int, description: String) {
println("Fetch failed ($errorCode): $description")
}
},
)
}

How the callback behaves:

  • Exactly one of the two methods is called, on the main thread. The one exception is SDK_NOT_INITIALIZED, which is reported right away on the calling thread.
  • If you call EntrupyApp.cleanup() while a fetch is running, the fetch is dropped and neither method is called.

Error Codes​

errorCode is one of the EntrupyErrorCode constants (com.entrupy.sdk.listeners.EntrupyErrorCode):

CodeWhen
SDK_NOT_INITIALIZEDEntrupyApp.init was not called yet
BAD_REQUESTThe Entrupy ID is empty, or the backend answered 400
UNAUTHORIZED_ACCESSThe user is not logged in, or the backend answered 401
FORBIDDENThe session ended during the fetch, or the user cannot see this item. This is also the answer for an Entrupy ID that does not exist
NOT_FOUND, TOO_MANY_REQUESTSThe backend answered 404 or 429
SERVICE_UNAVAILABLEThe backend answered 503
INTERNAL_SERVER_ERRORThe backend answered any other 5xx
UNKNOWN_ERRORAny other status, such as 409 or 422, or no HTTP status at all, for example when the device is offline

description is the backend's own message when it sent one, and a short English message otherwise.

3. Authentication Data Model​

fetchSessionDetails returns an EntrupyCaptureResult (com.entrupy.sdk.model). Only the SDK creates it. Any field the backend can leave out is nullable or an empty list, so check for null before you use a value.

PropertyDescription
entrupyIdThe Entrupy ID of the item, for example T8GV7QKJ
sessionUuidThe capture session identifier
propertiesBrand, model and category (function) of the item
statusThe result (status.result), the flag state (status.flag) and linked marketplaces (status.integrations)
moreDetailsThe certificate links and whether Market Edge is supported
textFieldsText inputs and barcodes submitted with the item, for example customer_item_id
imagesThe item photo and the uploaded images, with thumbnail links
eventTimesWhen the capture started, and when the item was submitted, received and given a result
timestampThe submission time
eventsThe item's timeline, newest first, for example "Flag Set"
userThe user who submitted the item
priceWhether to show the pricing widget
batchRequestThe open retake request, when there is one

Each timestamp has a display string (UTC) and an epoch value in seconds.

Result Status Values​

status.result.id is an EntrupyResultStatusId:

import com.entrupy.sdk.model.EntrupyResultStatusId
ValueDescription
AUTHENTICItem authenticated as genuine
UNKNOWNUnable to determine authenticity. Shown to users as "Unidentified"
NOT_SUPPORTEDItem type not supported for authentication
NEEDS_REVIEWEntrupy is still reviewing the item. Make no assumption about when the result arrives
INVALIDInvalid submission
ANALYZEDAnalysis complete
RECEIVEDSubmission received, processing
NO_RESULTNo result yet
MATCHMatch found in reference data
NO_MATCHNo match found in reference data
REGISTEREDItem registered in the system
CANCELEDAuthentication canceled
DATA_REQUIREDAdditional data required
NOT_AVAILABLEResult not available
REGISTRATION_INVALIDRegistration is invalid
REGISTRATION_NOT_SUPPORTEDRegistration type not supported
MATCH_FOUNDMatch found
NO_MATCH_FOUNDNo match found
OTHERA value this SDK version does not know. Read status.result.rawId for the value the backend sent

Use status.result.display.header for the text to show, for example "Authentic".

Flag Values​

status.flag.id is an EntrupyFlagId:

ValueDescription
NONEThe result has not been flagged
FLAGGEDThe result is currently flagged. status.flag.flagInfo holds the reason
RESOLVEDEntrupy resolved the flag
OTHERA value this SDK version does not know. Read status.flag.rawId for the value the backend sent

status.flag.isFlaggable tells you whether the user can flag the result. For flag actions, see Customer Support Integration.

4. Server-Side Data Access​

For backend data access, reporting, and cross-user queries, use the Entrupy API:

  • Webhooks: Receive real-time notifications for result updates, flag changes, and other events.
  • API queries: Retrieve authentication details, search across users, and synchronize with your internal systems.
  • Data mapping: Use customer_item_id to map Entrupy authentications to your internal records.

Refer to Essential Backend Integration Tasks for setup details.

Best Practices​

  • Use SDK UI for full workflows. The Detail View provides a maintained, consistent experience, with the timeline, retakes and flags.
  • Use fetchSessionDetails for small pieces of your own UI, like a status line in a list or a result on your item screen.
  • Use the API for backend operations. Reporting, cross-user search, and data synchronization should go through your backend.
  • Map IDs consistently. Store the entrupyId alongside your customer_item_id for reliable cross-referencing.

Next Steps​