Kajaria Ceramics

Dashboard  /  GMB Call History  /  v1

GMB
Call History API

Returns call records captured against Kajaria dealer showrooms for a given date range. Results can be narrowed by SAP code, encrypted store reference, call ID and call status, with pagination for large result sets.

Endpoint
/api/gmb/gmbtiles
Method
POST
Format
JSON
Auth
API key header

Overview

This endpoint provides call history captured against Kajaria dealer showrooms over a specified date range.

Required Date range Every request must include from_date and to_date in YYYY-MM-DD format.
Optional Narrow the result Use SAP code, store token, call ID or substatus to reduce the matching records.
Large results Use pagination The default page size is 50 and the maximum page size is 500 records.

Endpoint

POST https://dashboard.kajariaceramics.com/api/gmb/gmbtiles
Important. A valid request that finds no matching calls returns 404 No record found, rather than a 200 response with an empty array.

Authentication

The API key is issued separately and identifies the integration.

Headers

Header
Content-Type: application/json
X-API-Key: <your key>

Where custom headers are not practical, the API key may also be supplied in the request body as api_key.

Keep the API key server-side. Do not expose it directly in browser-side JavaScript or public client applications.

Request

Only the date range is mandatory. All other parameters narrow the result.

FieldTypeRequiredDescription
from_datestringRequiredStart date in YYYY-MM-DD format.
to_datestringRequiredEnd date in YYYY-MM-DD format, inclusive.
sap_codestringOptionalDealer SAP code. Unknown codes return 404 SAP code not found.
storelookupstringOptionalEncrypted store token used by the other GMB APIs.
call_log_idstringOptionalExact match for a single call.
substatusstringOptionalFilter by call result. See the substatus section.
pageintegerOptional1-based page number. Defaults to 1.
limitintegerOptionalRecords per page. Defaults to 50, maximum 500.

Example request

JSON
{
  "from_date": "2026-08-01",
  "to_date": "2026-08-24"
}
JSON
{
  "from_date": "2026-08-01",
  "to_date": "2026-08-24",
  "page": 1,
  "limit": 50
}
Filter behavior. call_log_id is applied in addition to the date range. A call outside the requested date range returns no records even when the ID is correct.

Substatus

Three call result values are stored. Two shortcuts are also accepted.

ValueMeaning
AnsweredCall connected to the showroom.
MissedCall rang but was not answered.
OfflineShowroom number was unreachable.
connectedShortcut matching Answered.
missedShortcut matching both Missed and Offline.
Use exact values when separation matters. If you need only Missed calls and want Offline kept separate, use "substatus": "Missed".

Response

200 is returned only when records are found.

JSON
{
  "code": 200,
  "status": true,
  "user": "partner_name",
  "from_date": "2026-08-01",
  "to_date": "2026-08-24",
  "filters": {
    "sap_code": "1051615",
    "call_log_id": null,
    "substatus": "Missed"
  },
  "paging": {
    "total_records": 1284,
    "total_pages": 26,
    "page": 1,
    "limit": 50,
    "returned": 50,
    "has_more": true
  },
  "data": [
    {
      "website_id": 2157,
      "sap_code": "1051615",
      "dealership_name": "Aggarwal Bath Gallery (P) Ltd.",
      "city": "Karnal",
      "district": "Karnal",
      "state": "Haryana",
      "country": "India",
      "pincode": "132001",
      "call_log_id": "Zu1o-g7kBBA4VL9iwRxfL",
      "call_number_with_c_code": "+919996405637",
      "mobile": "9996405637",
      "call_start_time": "2026-08-24 12:12:10",
      "call_duration_minutes": 0.7,
      "call_did_number": "8037838021",
      "call_event_type": "MISSED",
      "substatus": "Missed",
      "call_recording_url": null,
      "zoho_lead_id": null,
      "zoho_synced_at": null,
      "total_calls_from_caller": 0,
      "prev_calls_count": 0,
      "created_at": "2026-08-24 17:43:01"
    }
  ]
}

Dealer fields

FieldTypeDescription
website_idintegerKajaria internal store ID.
sap_codestringDealer SAP code.
dealership_namestringDealer name, or Dealer Name Not Available if not set.
citystring/nullDealer city.
districtstring/nullDealer district.
statestring/nullDealer state.
countrystring/nullDealer country.
pincodestring/nullDealer pincode.

Call fields

FieldTypeDescription
call_log_idstringUnique per call. Recommended key for de-duplication.
call_number_with_c_codestringCaller number including country code.
mobilestringSame caller number without country code, last 10 digits.
call_start_timedatetimeYYYY-MM-DD HH:MM:SS, IST.
call_duration_minutesdecimalCall duration in decimal minutes, e.g. 0.7 is approximately 42 seconds.
call_did_numberstringVirtual/tracking number that was dialled.
call_event_typestringEvent type received from the telephony provider.
substatusstringAnswered, Missed or Offline.
call_recording_urlstring/nullDirect audio URL, or null.
zoho_lead_idstring/nullZoho lead associated with the call, if any.
zoho_synced_atdatetime/nullTime when the call reached Zoho, if synced.
total_calls_from_callerintegerLifetime calls from this caller.
prev_calls_countintegerPrior calls before this call.
created_atdatetimeWhen the record reached the system.

Call recordings

call_recording_url contains a direct audio link when a recording is available.

Privacy. Call records may contain customer phone numbers and audio recordings. Store, display and export them only where access is authorised and necessary.

Paging

Large result sets must be read page by page.

FieldDescription
total_recordsTotal records matching the filters across all pages.
total_pagesCalculated as ceil(total_records / limit).
pageCurrent 1-based page.
returnedNumber of records returned in the current response.
has_moretrue when further pages exist.
Ordering. Records are sorted by call_start_time ascending, oldest first. A complete page-by-page walk therefore produces chronological call history.

Paging example

JavaScript
let page = 1;
let all = [];

while (true) {
  const res = await fetch(
    "https://dashboard.kajariaceramics.com/api/gmb/gmbtiles",
    {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
        "X-API-Key": process.env.KAJARIA_API_KEY
      },
      body: JSON.stringify({
        from_date: "2026-08-01",
        to_date: "2026-08-24",
        sap_code: "1051615",
        page: page,
        limit: 500
      })
    }
  );

  const json = await res.json();

  if (!json.status) throw new Error(json.message);

  all.push(...json.data);

  if (!json.paging.has_more) break;
  page++;
}
Page out of range. Requesting a page beyond total_pages returns 404 Page out of range.

Errors

Non-200 responses return status: false and a message. No data is included.

CodeMessage / Meaning
400Missing or malformed input, including bad dates, invalid JSON or oversized call_log_id.
401API key missing or invalid.
404SAP code not found — code is not present in the dealer master.
404No record found — filters are valid but no calls matched.
404Page out of range — requested page exceeds total_pages.
405HTTP method other than POST was used.
500Server-side error.

No records example

JSON
{
  "code": 404,
  "status": false,
  "message": "No record found"
}
Application handling. Treat 404 No record found as a normal no-data outcome rather than as a system failure. An unrecognised SAP code is separately reported as SAP code not found.

Examples

All calls for a dealer in August

Bash
curl -X POST https://dashboard.kajariaceramics.com/api/gmb/gmbtiles \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_KEY" \
  -d '{
    "from_date": "2026-08-01",
    "to_date": "2026-08-31",
    "sap_code": "1051615"
  }'

Only unanswered calls, network-wide

Bash
curl -X POST https://dashboard.kajariaceramics.com/api/gmb/gmbtiles \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_KEY" \
  -d '{
    "from_date": "2026-08-23",
    "to_date": "2026-08-23",
    "substatus": "missed"
  }'

Only unreachable calls

JSON
{
  "from_date": "2026-08-01",
  "to_date": "2026-08-24",
  "substatus": "Offline"
}

A single call

JSON
{
  "from_date": "2026-08-24",
  "to_date": "2026-08-24",
  "call_log_id": "Zu1o-g7kBBA4VL9iwRxfL"
}

Practical notes

Data sensitivity. Caller phone numbers and call recordings are personal data. Apply appropriate access controls and avoid exposing the raw response directly to unauthorised users or public browser clients.