Skip to content

Data Models & Enums

This page serves as the single source of truth for all data models and enumeration values used across the JusPredict Backend API. Use these definitions to interpret response data and structure requests correctly.

All numeric values in the API correspond to the following enumeration definitions.

ValueNameDescription
0SUCCESSOperation completed successfully.
1WARNCompleted with non-critical warnings.
2ERROROperation failed.
ValueNameDescription
0UNSPECIFIEDDefault or unknown status.
1CREATEDAccount created, pending activation.
2PENDING_ACTIVATIONWaiting for OTP verification.
3PENDING_PASSWORDUPDATERequired password change.
4ACTIVEAccount is fully functional.
5INACTIVEAccount is manually disabled.
6DISABLEDSystem-level account suspension.
ValueNameDescription
0UNSPECIFIEDStatus unknown.
1UPCOMINGEvent is scheduled but not started.
2ACTIVEEvent is currently live.
3CLOSEDEvent has finished.
4CANCELLEDEvent was aborted.
ValueNameDescription
0UNSPECIFIEDStatus unknown.
1OPENOrder is active in the book.
2PENDINGWaiting for processing.
5PARTIALLY_FILLEDSome volume matched.
6FILLEDEntire volume matched.
7CANCELLEDOrder removed by user.

The standard response wrapper for almost all API calls.

FieldTypeDescription
typeStatusTypeOverall outcome (Success/Warn/Error).
detailsStatusDetails[]Collection of specific error codes and messages.

Detailed diagnostic information for a status.

FieldTypeDescription
typeStatusTypeSeverity of this specific detail.
codeuint64Internal error or warning code.
messagestringHuman-readable diagnostic message.

Detailed user profile information.

FieldTypeDescription
usernamestringUnique system identifier.
emailstringVerified email address.
first_namestringUser’s legal first name.
last_namestringUser’s legal last name.
user_statusUserStatusCurrent account state.
is_masked_emailboolPrivacy flag for email display.

The core object representing a sports match or tournament.

FieldTypeDescription
idstring (uuid)Unique event identifier.
namestringFull name of the event.
statusEventStatusCurrent lifecycle stage of the event.
categoryint32Category ID (1: Sports, 2: Politics, etc).
start_dateint64Start time in epoch seconds.

A specific outcome that can be predicted within an event.

FieldTypeDescription
question_idstring (uuid)Unique question identifier.
namestringThe text of the prediction question.
statusQuestionStatusCurrent availability of the question.
event_idstring (uuid)Parent event identifier.

Full data for a single prediction record.

FieldTypeDescription
prediction_idstring (uuid)Unique identifier for the prediction.
event_namestringName of the related event.
questionstringThe text of the question.
investment_amtstringAmount of credits wagered.
prediction_statusPredictionStatusCurrent state of the prediction.

Tracking data for a prediction order in the book.

FieldTypeDescription
order_idstring (uuid)Unique order identifier.
matched_amtstringPortion of order currently matched.
order_statusOrderStatusCurrent matching state.
order_typeOrderTypeEntry vs Exit order.

Real-time market statistics for a question outcome.

FieldTypeDescription
question_idstring (uuid)Target question identifier.
outcomestringName of the outcome (e.g., “Yes”, “Team A”).
implied_probabilitystringMarket-derived probability (0.0 to 1.0).
invested_amountstringTotal volume for this outcome.

Used for registering user hardware for notifications.

FieldTypeDescription
device_idstringUnique hardware UUID.
os_typeDeviceOSType1: Android, 2: iOS.
fcm_tokenstringFirebase Cloud Messaging token.
ValueNameDescription
0UNSPECIFIEDUnknown OS.
1ANDROIDGoogle Android platform.
2IOSApple iOS platform.

Metadata returned in all paginated list responses.

FieldTypeDescription
current_pageint32The current page index.
page_sizeint32Number of records per page.
total_pagesint32Total available pages.
total_recordsint32Grand total of records across all pages.