RequestToken

Initiate a login ping to the system to verify whether the API service is up or not.

Authorization

  • Name
    Username
    Type
    Your Username
    Description
  • Name
    Password
    Type
    Your Password
    Description

Header

  • Name
    Content-Type
    Type
    application/json
    Description

Body

  • Name
    raw
    Type
    json
    Description

    JSON

    {
      "ServiceName": "RequestToken",
      "grant_type":"client_credentials",
      "data": {
          "expires_in":"36000"
      }
    }
    

Request

POST
https://YOURENDPOINT.virtualrx.co/jsonapi.php
curl
--location 'https://YOURENDPOINT.virtualrx.co/jsonapi.php' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic WU9VUlVTRVJOQU1FOllPVVJQQVNTV09SRA==' \
--data '{
    "ServiceName": "RequestToken",
    "grant_type":"client_credentials",
    "data": {
        "expires_in":"36000"
    }
}'

Response200 OK

{
  "ResponseDetails": {
      "ServiceName": "RequestToken",
      "SessionId": "B23DBCB4-1E80-9B5A-EF1D-B95F845AD183",
      "StatusCode": "0",
      "StatusName": "StatusOK",
      "StatusDescription": "NA",
      "ServiceDate": "2022-05-18 15:19:17",
      "ServiceId": "B23DBCB4-1E80-9B5A-EF1D-B95F845AD183"
  },
  "ResponseParams": {
      "access_token": "aa9140f0d85abf502f98cfde649c30ae",
      "expires_in": 1652887193,
      "token_type": "Bearer",
      "scope": "null"
  }
}

RequestToken