Skip to main content

Log reference

Your game server sends the ten log types to Alogame. Alogame validates every record against the schema declared for your game, stores it, and builds the KPI Dashboard from it. This page covers what applies to every log type: how records are sent, the shared rules, the result codes and the deadlines. The columns of each log type are in Log types.

How records are sent​

Each record is a JSON array of values in column order, not an object. A realtime batch is a JSON array of 1 to 1000 records, with no envelope around it:

[
["acc-1001", "role-1", "Hero", "VN", "2026-11-02 10:15:00", "google", "s1", "10.0.0.1", "Android", "14", "dev-1", "Pixel 8"]
]

A full-log file holds the same records, one JSON array per line (gzip NDJSON). See Sending logs.

  • game_id and log_type are part of the URL path.
  • client_id and schema_version are query parameters of the same URL, for batches and for files, never part of the body. client_id is optional, 1 to 64 characters; use default unless Alogame told you that your game runs several client builds with separate schemas. schema_version is required, an integer ≥ 1. Version 1 is the column list on this page. A later version may only append columns at the end; a record must then carry exactly the columns of its version.

Rules that apply to every log type​

Four rules teams most often get wrong
  • Every timestamp is GMT+7, yyyy-MM-dd HH:mm:ss.
  • A record is a JSON array in column order, not an object.
  • recharge is sent only for completed payments.
  • recharge.is_first_charge is inverted: 0 = first charge, 1 = not the first.
  • Time zone is GMT+7. Every timestamp is yyyy-MM-dd HH:mm:ss in GMT+7. A day is a calendar day in GMT+7, 00:00:00 to 23:59:59.
  • country_code is empty or an upper-case ISO 3166-1 alpha-2 code. If you do not know the player's country: send the market's code when your game is released in exactly one market; send the country that the Alogame SDK derives from the player's IP when it is released in more than one.
  • server_id is null when your game has no servers.
  • Duplicate keys ignore case and accents. aB3 and Ab3 are the same key, so are Kiếm and Kiem; the two records count as duplicates.
  • role_name — plain text may contain letters, digits, spaces, _, - and .. Any other character makes Alogame store role_name as null and count the record as an INVALID_ROLE_NAME anomaly; the record is still accepted. If Alogame registered your game with Base64 role names, send role_name Base64-encoded (UTF-8); Alogame stores the value exactly as you sent it (still Base64); the data team decodes it when reading.
  • Numbers may be JSON numbers or strings. Prefer strings for money values so no precision is lost.
  • Column names in the original VNG document that differ between tables are normalised: os_platform (not platform_os), product_id, ingame_value, action_id, payment_channel. Alogame accepts the original spellings when your schema is declared: platform_os for os_platform, item_id for recharge.product_id, ingame _value, payment_chanel, and reason_id or action_id/ reason_id for money_flow.action_id.

Results and rejection codes​

A realtime batch returns 200 with the outcome of each record:

{ "accepted": 998, "duplicate": 1, "flagged": 1, "rejected": [{ "index": 17, "reason_code": "INVALID_TIMESTAMP" }] }

accepted includes records with an anomaly; flagged is how many of the stored records had one. A rejected record is kept by Alogame with its reason, never counted in KPIs, and does not affect the other records of the request. Fix the source and resend the corrected record.

reason_codeMeaning
FIELD_COUNT_MISMATCHThe record does not have exactly the number of columns of its schema_version.
MISSING_REQUIRED_FIELDA required column is empty.
INVALID_TIMESTAMPA timestamp is not yyyy-MM-dd HH:mm:ss (or date of ad_revenue is not yyyy-MM-dd), or is not a real date.
INVALID_VALUEA number, enum, currency code or length is invalid, or the record is not a JSON array.
INVALID_COUNTRY_CODEcountry_code is not an ISO 3166-1 alpha-2 code.
UNKNOWN_SCHEMA_VERSIONAlogame has no schema for this client_id + schema_version + log type. Every record of a batch is rejected. A file is refused with 422 before any byte is accepted, and nothing is stored.
LOG_TYPE_NOT_DECLAREDYou sent mission or ad_revenue but your game has not declared that log type. Every record of a batch is rejected. A file is refused with 422 before any byte is accepted, and nothing is stored.

Anomalies that do not reject the record: INVALID_ROLE_NAME and BALANCE_MISMATCH (money_flow only). The record is stored and counted in KPIs, and Alogame's data team sees a per-day count of these anomalies and can ask you to fix the source; nothing extra is stored on the record. A record that points to an id not yet registered with Alogame (product, item or action) is also accepted; Alogame lists such ids for the data team.

Deadlines​

  • Realtime logs register, login, logout, recharge and ccu must reach Alogame within 15 minutes of the event time. Alogame can change this time for your game, or switch realtime off for a game that sends only files.
  • Send money_flow, item_flow, user_snapshot, mission and ad_revenue at least once per day.
  • Full log: for each of the eight required log types, send the full log of day D after D ends (from 00:00 GMT+7 of D+1) and before 06:00 GMT+7 of D+1. If no file of a required log type arrives in that window, Alogame raises an alert. A day is closed at 06:00 GMT+7 of the next day, whichever files arrived, and shows as final at the next scheduled refresh, about 08:00 GMT+7; a later file still updates the days it contains. Alogame does not check that a file is complete. See Sending logs.