GetSessionToken

The purpose of this function is to provide a session token for subsequent calls to the API. The function will require the API key provided by the account holder and the Company Id.

POST body(JSON):

key(string) - The API key as provided by the account holder. Required.
company_id(int) - Unique Company Id in the PDM system. Required.

Example

{
    "key": "A54C18709701456E654F3FE78712E73E",
    "company_id": 9001
}

Response(JSON):

status
    code(int) - See status codes
    details(string) - Response details
session
    session_token(string) - Session Token valid for finite period of time (See expiry date/time)
    expires_local_datetime(date/time) - Expiry Date and time - format: YYYY-MM-DD HH:MM:SS
    expires_utc_datetime(date/time)  Expiry Date and time - format: YYYY-MM-DD HH:MM:SS

Response status codes:

101 = OK
201 = Invalid / inactive company ID
202 = Invalid / inactive API key
204 = IP address not approved
205 = Rate limit exceeded
500 = General service error

Example

{
"status": {
"code": 101,
"details": "OK"
},
"session": {
"session_token": "9001|f3d14b0c-9adb-4afb-acdc-6dd909837101|0001",
"expires_local_datetime": "2017-12-14 18:51:09",
"expires_utc_datetime": "2017-12-14 12:51:09"
}
}