Lokate Student

Create & Access Account

The following Account API is setup by the school partner at their end. Using this API, school partner will authenticate parents to smoothly transit from lokate student to Partner page.

If the student/parent doesn’t exist in the Partner’s system, the profile needs to be created using the same student data in the API. Please note this is a primary way for student accounts to be created in the partner’s system.

Endpoint

POST  https://ls-lkst.com/safety/api/external/token
Once setup, the school partner may share the base URL along with client id & client secret with lokate student .

Request Headers

NameValue
Content-Typeapplication/json
AuthorizationBasic <base64Encoded(<clientId>:<clientSecret>)>

Example

Content-Type: application/json
Authorization: Basic VGhpc0lzVGhlU2Nob29sc0NsaWVudElEOlRoaXNJc0FTZWNyZXRLZXk=

Authorization Parameters

Use Basic Authorization method and base encode the following parameters in the above format.

NameDescription
clientIdClient ID for the school to be shared by school partner
clientSecretClient Secret Key for the school to be shared by school partner

Request Body

{
        "targetMetadata": {
            "useCase": "AU", // Or any value to indicate the purpose of the visit
            "targetData": {
                //Any data required from lokate student for fulfilling the request
            }
        },
        "studentDetails": {
            "registerNo": "12345",
            "studentName": "Mohamed Alnasri"
        },
        "parentDetails": {
            "email": "parent@lokatestudent.com",
            "phone": "+971 xxxx xxx",
            "parentName": "Saeed Abdulrahman Alnasri"
        }
 }

Request Parameters

  • targetMetadata - Object
  • NameTypeMandatoryDescription
    useCaseStringNon Mandatoryvalue to indicate the purpose of the visit. Example: “AU” for authentication.
    targetDataObjectNon MandatoryAny data required from lokate student for fulfilling the request, IDs, target path etc.

  • studentDetails - Object
  • NameTypeMandatoryDescription
    registerNoStringNon MandatoryRegistration number of the Student.
    studentNameStringNon MandatoryName of the Student.
    • parentDetails – Object
    NameTypeMandatoryDescription
    emailStringMandatoryParent E-Mail ID. (Max 320 character)
    If both are passed, only email will be considered.
    phoneStringNon MandatoryParent’s mobile number with country code. (Max 15 digits)
    parentNameStringNon MandatoryName of the Parent

    Response Body

    200

    {
    “referenceToken”: “generated_authentication_token”,
    “redirectURL”: “https://vendor-base-url/<referenceToken>”,
    “expiresAt”: “2021-09-30T13:03:14.705871Z”
    }

    400

    {
    “error”: “Missing or invalid parameter: [parameter_name]”
    }

    401

    {
    “error”: “Invalid clientId or secretKey”
    }

    Response Parameters

    NameTypeDescription
    referenceTokenStringReference token for the transaction.
    redirectURLStringURL with token attached which can be used to load the vendor's page with the user signed in.
    expiresAtStringExpiry timestamp of the token.