Skip to main content
GPSpedia’s backend is powered by Google Apps Script web applications, each exposing a single HTTP endpoint. All API communication uses a unified POST-based protocol — you send a JSON body specifying an action and a payload, and receive a structured JSON response.

Services

Each logical domain maps to a dedicated service endpoint:

AUTH

Handles login and session validation.

CATALOG

Provides vehicle cut points, relay configs, tutorials, navigation data, and dropdowns.

WRITE

Creates and updates vehicle cut records and supplementary information.

USERS

Manages user accounts, roles, and credentials.

FEEDBACK

Records likes, problem reports, contact form submissions, and admin replies.

Universal request format

Every request — regardless of service or action — uses this exact shape:
fetch(SERVICE_ENDPOINT, {
  method: 'POST',
  headers: { 'Content-Type': 'text/plain' },
  body: JSON.stringify({
    action: 'actionName',
    payload: { /* action-specific parameters */ }
  }),
  redirect: 'follow'
});
The Content-Type header must be text/plain (not application/json). Google Apps Script web apps require this to avoid CORS preflight requests.

Universal response format

All endpoints return JSON with a status field: Success
{
  "status": "success",
  "...": "action-specific fields"
}
Error
{
  "status": "error",
  "message": "Human-readable error description",
  "details": {
    "errorMessage": "Internal error detail"
  }
}

Action-to-service mapping

ActionService
loginAUTH
validateSessionAUTH
getCatalogDataCATALOG
getNavigationDataCATALOG
getDropdownDataCATALOG
getSuggestionCATALOG
checkVehicleWRITE
addOrUpdateCutWRITE
addSupplementaryInfoWRITE
getUsersUSERS
createUserUSERS
updateUserUSERS
deleteUserUSERS
changePasswordUSERS
updateProfileUSERS
recordLikeFEEDBACK
reportProblemFEEDBACK
sendContactFormFEEDBACK
getFeedbackItemsFEEDBACK
replyToFeedbackFEEDBACK
markAsResolvedFEEDBACK
getActivityLogsFEEDBACK

Error handling

Always check result.status before accessing response data. A non-200 HTTP status code is not guaranteed — Apps Script may return HTTP 200 with status: 'error' in the body.
const result = await response.json();
if (result.status !== 'success') {
  console.error(result.message, result.details?.errorMessage);
  return;
}
// safe to use result data

Build docs developers (and LLMs) love