Retrieve account data, stats, and locks for a specific user to transfer to a new application.

Resource URL

https://api.chastikey.com/v0.5/transferdata.php

Parameters

ParameterDescriptionOptionalDefault
ClientID ClientID is assigned to the API project that you create within the ChastiKey app.
ClientSecret ClientSecret is assigned to the API project that you create within the ChastiKey app. It can be re-generated within the app if needed.
Username The username of the account that is transferring data.
Passcode The passcode provided by the user transferring their account. This is a unique 8 digit code that changes every 2 minutes.

Example

POST https://api.chastikey.com/v0.5/transferdata.php

Request

  
    $curl = curl_init();

    curl_setopt_array($curl, array(
        CURLOPT_URL => "https://api.chastikey.com/v0.5/transferdata.php",
        CURLOPT_HTTPHEADER => array(
            "ClientID: gvg3n9gzxmao21gpz143ij0yhn4gqalw",
            "ClientSecret: h3px2ifybw076n9qp3vr2gk5uvaolsks"
        ),
        CURLOPT_CUSTOMREQUEST => "POST",
        CURLOPT_POSTFIELDS => array(
            "Username" => "JohnDoe",
            "Passcode" => "63559172"
        ),
        CURLOPT_RETURNTRANSFER => TRUE,
        CURLOPT_FRESH_CONNECT => TRUE
    ));

    $response = curl_exec($curl);
    $err = curl_error($curl);

    curl_close($curl);

    if ($err) {
        echo "cURL Error #:".$err;
    } else {
        echo $response;
    }  

Success Response

  {
    "response": {
        "status": 200,
        "message": "the request has succeeded",
        "timestampGenerated": 1630440794
    },
    "userData": {
        "id": 137793,
        "username": "JohnDoe",
        "mainRole": "Lockee",
        "timestampJoined": 1581002701
    },
    "keyholderData": {
        "averageRating": 4,
        "keyholderLevel": 2,
        "noOfKeyholderRatings": 12,
        "timestampFirstKeyheld": 1582388234,
        "totalLocksManaged": 20
    },
    "keyholderLocks": [
        {
            "id": 42860,
            "shareID": "HUZE8CW24R3M8N9",
            "lockName": "",
            "autoResetFrequencyInSeconds": 0,
            "blockTestLocks": 0,
            "blockUsersAlreadyLocked": 0,
            "blockUsersWithStatsHidden": 0,
            "cardInfoHidden": 0,
            "checkInFrequencyInSeconds": 0,
            "contactKeyholderBeforeLoading": 0,
            "cumulative": 1,
            "emergencyReleaseDisabled": 0,
            "fixed": 0,
            "forceTrust": 0,
            "keyholderDecisionDisabled": 0,
            "keysDisabled": 0,
            "lateCheckInWindowInSeconds": 0,
            "lockees": [],
            "maxAutoResets": 0,
            "maxDoubleUps": 0,
            "maxFakes": 1,
            "maxFreezes": 0,
            "maxGreens": 1,
            "maxMinutes": 0,
            "maxReds": 5,
            "maxResets": 0,
            "maxStickies": 0,
            "maxUsers": 0,
            "maxYellows": 0,
            "maxYellowsAdd": 0,
            "maxYellowsMinus": 0,
            "minDoubleUps": 0,
            "minFakes": 1,
            "minFreezes": 0,
            "minGreens": 1,
            "minMinutes": 0,
            "minReds": 5,
            "minResets": 0,
            "minStickies": 0,
            "minYellows": 0,
            "minYellowsAdd": 0,
            "minYellowsMinus": 0,
            "multipleGreensRequired": 0,
            "regularity": 0.25,
            "requireContactFirst": 0,
            "resetFrequencyInSeconds": 0,
            "startLockFrozen": 0,
            "temporarilyDisabled": 0,
            "timerHidden": 0
        },
        {
            "id": 47992,
            "shareID": "H5ELVA7ZMW2G5JS",
            "lockName": "test",
            "autoResetFrequencyInSeconds": 1800,
            "blockTestLocks": 0,
            "blockUsersAlreadyLocked": 0,
            "blockUsersWithStatsHidden": 0,
            "cardInfoHidden": 0,
            "checkInFrequencyInSeconds": 0,
            "contactKeyholderBeforeLoading": 1,
            "cumulative": 1,
            "emergencyReleaseDisabled": 0,
            "fixed": 0,
            "forceTrust": 0,
            "keyholderDecisionDisabled": 0,
            "keysDisabled": 0,
            "lateCheckInWindowInSeconds": 0,
            "lockees": [
                {
                    "lockeeID": 170042,
                    "lockGroupID": 1595684333,
                    "lockID": 159568433301
                }
            ],
            "maxAutoResets": 20,
            "maxDoubleUps": 0,
            "maxFakes": 0,
            "maxFreezes": 0,
            "maxGreens": 10,
            "maxMinutes": 0,
            "maxReds": 0,
            "maxResets": 0,
            "maxStickies": 10,
            "maxUsers": 0,
            "maxYellows": 0,
            "maxYellowsAdd": 0,
            "maxYellowsMinus": 0,
            "minDoubleUps": 0,
            "minFakes": 0,
            "minFreezes": 0,
            "minGreens": 10,
            "minMinutes": 0,
            "minReds": 0,
            "minResets": 0,
            "minStickies": 10,
            "minYellows": 0,
            "minYellowsAdd": 0,
            "minYellowsMinus": 0,
            "multipleGreensRequired": 1,
            "regularity": 0.25,
            "requireContactFirst": 1,
            "resetFrequencyInSeconds": 1800,
            "startLockFrozen": 1,
            "temporarilyDisabled": 0,
            "timerHidden": 0
        },
    ],
    "lockeeData": {
        "averageLockeeRating": 5,
        "averageTimeLockedInSeconds": 82440,
        "cumulativeSecondsLocked": 329761,
        "lockeeLevel": 1,
        "longestCompletedLockInSeconds": 309016,
        "noOfLockeeRatings": 35,
        "totalNoOfCompletedLocks": 40
    },
    "lockeeLocks": [
        {
            "lockGroupID": 1630438522,
            "lockID": 1630438522,
            "shareID": "BOT03",
            "lockName": "",
            "autoResetFrequencyInSeconds": 0,
            "autoResetsPaused": 0,
            "blockBotFromUnlocking": 0,
            "blockUsersAlreadyLocked": 0,
            "botChosen": 3,
            "cardInfoHidden": 0,
            "cardsLastPicked": "Sticky,,,,,,,,,,,,,,,,,,,,,",
            "chancesAccumulatedBeforeFreeze": 0,
            "checkInFrequencyInSeconds": 0,
            "combination": "5347170000",
            "cumulative": 1,
            "doubleUpCards": 0,
            "fake": 0,
            "fixed": 0,
            "flagChosen": 0,
            "freezeCards": 0,
            "goAgainCards": 0,
            "goAgainCardsPercentage": "5.51",
            "greenCards": 1,
            "greenCardsPickedSinceReset": 0,
            "inititalDoubleUpCards": 0,
            "inititalFreezeCards": 0,
            "inititalGreenCards": 1,
            "inititalMinutes": 0,
            "inititalRedCards": 5,
            "inititalResetCards": 0,
            "inititalStickyCards": 1,
            "inititalYellowAdd1Cards": 3,
            "inititalYellowAdd2Cards": 1,
            "inititalYellowAdd3Cards": 1,
            "inititalYellowMinus1Cards": 0,
            "inititalYellowMinus2Cards": 3,
            "keyholderAllowsFreeUnlock": 0,
            "keyholderDecisionDisabled": 0,
            "keyholderDisabledKey": 0,
            "keyholderID": 3950,
            "keysDisabled": 0,
            "lateCheckInWindowInSeconds": 0,
            "lockFrozenByCard": 0,
            "lockFrozenByKeyholder": 0,
            "maxAutoResets": 0,
            "maxMinutes": 0,
            "maxRedCards": 5,
            "minMinutes": 0,
            "minRedCards": 1,
            "minutes": 0,
            "multipleGreensRequired": 0,
            "noOfTimesAutoReset": 0,
            "noOfTurns": 1,
            "readyToUnlock": 0,
            "redCards": 5,
            "regularity": 1,
            "removedByKeyholder": 0,
            "resetCards": 0,
            "stickyCards": 1,
            "timerHidden": 0,
            "timestampCardUnfreezes": 0,
            "timestampFrozenByCard": 0,
            "timestampFrozenByKeyholder": 0,
            "timestampLastAutoReset": 0,
            "timestampLastCardReset": 0,
            "timestampLastCheckedIn": 0,
            "timestampLastFullReset": 0,
            "timestampLastPicked": 0,
            "timestampLocked": 1630438522,
            "timestampUnfrozen": 0,
            "totalTimeFrozen": 0,
            "trustKeyholder": 1,
            "yellowAdd1Cards": 3,
            "yellowAdd2Cards": 1,
            "yellowAdd3Cards": 1,
            "yellowMinus1Cards": 0,
            "yellowMinus2Cards": 3
        },
        {
            "lockGroupID": 1630438545,
            "lockID": 1630438545,
            "shareID": "",
            "lockName": "",
            "autoResetFrequencyInSeconds": 0,
            "autoResetsPaused": 0,
            "blockBotFromUnlocking": 0,
            "blockUsersAlreadyLocked": 0,
            "botChosen": 0,
            "cardInfoHidden": 0,
            "cardsLastPicked": "",
            "chancesAccumulatedBeforeFreeze": 0,
            "checkInFrequencyInSeconds": 0,
            "combination": "9072793303",
            "cumulative": 0,
            "doubleUpCards": 0,
            "fake": 0,
            "fixed": 1,
            "flagChosen": 0,
            "freezeCards": 0,
            "goAgainCards": 0,
            "goAgainCardsPercentage": "0",
            "greenCards": 0,
            "greenCardsPickedSinceReset": 0,
            "inititalDoubleUpCards": 0,
            "inititalFreezeCards": 0,
            "inititalGreenCards": 0,
            "inititalMinutes": 1966,
            "inititalRedCards": 0,
            "inititalResetCards": 0,
            "inititalStickyCards": 0,
            "inititalYellowAdd1Cards": 0,
            "inititalYellowAdd2Cards": 0,
            "inititalYellowAdd3Cards": 0,
            "inititalYellowMinus1Cards": 0,
            "inititalYellowMinus2Cards": 0,
            "keyholderAllowsFreeUnlock": 0,
            "keyholderDecisionDisabled": 0,
            "keyholderDisabledKey": 0,
            "keyholderID": 0,
            "keysDisabled": 0,
            "lateCheckInWindowInSeconds": 0,
            "lockFrozenByCard": 0,
            "lockFrozenByKeyholder": 0,
            "maxAutoResets": 0,
            "maxMinutes": 4320,
            "maxRedCards": 0,
            "minMinutes": 0,
            "minRedCards": 0,
            "minutes": 1966,
            "multipleGreensRequired": 0,
            "noOfTimesAutoReset": 0,
            "noOfTurns": 0,
            "readyToUnlock": 0,
            "redCards": 0,
            "regularity": 0,
            "removedByKeyholder": 0,
            "resetCards": 0,
            "stickyCards": 0,
            "timerHidden": 0,
            "timestampCardUnfreezes": 0,
            "timestampFrozenByCard": 0,
            "timestampFrozenByKeyholder": 0,
            "timestampLastAutoReset": 0,
            "timestampLastCardReset": 0,
            "timestampLastCheckedIn": 0,
            "timestampLastFullReset": 0,
            "timestampLastPicked": 0,
            "timestampLocked": 1630438545,
            "timestampUnfrozen": 0,
            "totalTimeFrozen": 0,
            "trustKeyholder": 0,
            "yellowAdd1Cards": 0,
            "yellowAdd2Cards": 0,
            "yellowAdd3Cards": 0,
            "yellowMinus1Cards": 0,
            "yellowMinus2Cards": 0
        }
    ]
}  

Error Response

  {
    "response": {
        "status": 400,
        "message": "required postdata missing: username or passcode",
        "timestampGenerated": 1579566341
    }
}  

Response Status Codes

CodeDescription
200 OK - The request has succeeded. The client can read the result of the request in the body and the headers of the response.
204 No Content - The request has succeeded but returns no message body.
400 Bad Request - The request could not be understood by the server due to malformed syntax. The message body will contain more information.
401 Unauthorized - The request requires user authentication or, if the request included authorization credentials, authorization has been refused for those credentials.
403 Forbidden - The server understood the request, but is either refusing to fulfill it, or the specific data you're requesting is private.
429 Too Many Requests - Rate limiting has been applied.

Resource Information

Rate Limited True
Response Format JSON
Authentication Tokens