Account Details

The accountDetails API call will lookup an existing customer.

JSON request

The uid in this request is the unique internal reference that you used when creating the account.
{
  "action": "accountDetails",
  "uid": 1001
}

JSON response

Success:

{
  "error": "",
  "status": "success",
  "data": "-- Base64 encoded AES-256-CBC encrypted JSON --",
  "action": "accountDetails",
  "version": "1.07",
  "proc_time": 1651314404,
  "proc_id": 34
}

"data" (decrypted)
{
  "uid": 1001,
  "squidID": 5,
  "expires": 1682784918,
  "added": 1651248918,
  "name": "Test Person",
  "email": "test.person@gmail.com",
  "type": "c",
  "card_details": "true",
  "approved": 1651248918,
  "last_access": 1651320490,
  "dataused": "0",
  "dataleft": 10737418240,
  "primary": "true"
}

Failure:

{
  "error": "uid unauthorised or invalid",
  "status": "failure",
  "data": "-- Base64 encoded AES-256-CBC encrypted JSON --",
  "action": "accountDetails",
  "version": "1.07",
  "proc_time": 1651316440,
  "proc_id": 36
}

"data" (decrypted)
{}

Decrypted Data Fields

uid: Your own unique ID for this customer.

squidID: SquidVault's internal unique ID for this customer.

expires: Unix timestamp for the customer's subscription renewal date.

added: Unix timestamp for when the customer was created or access requested.

name: The name that your customer has set for themselves during their first login. If they have not logged in yet this will be empty.

email: The customer's email address.

type: The customer's account type, either 'c' for Consumer or 'b' for Business.

card_details: True, if the customer has provided valid card details.

approved: Unix timestamp for when the customer approved your access. This will be zero if the customer has not yet approved you.

last_access: Unix timestamp for when the customer last logged in. This will be zero if the customer has not yet logged in.

dataused: The amount of data in bytes that the customer's Vault currently contains.

dataleft: The amount of data in bytes that the customer's Vault currently has available.

primary: True, if the customer was directly created by you and not pre-existing.

Common errors

uid invalid or missing: The uid is missing from the API call.

uid unauthorised or invalid: The uid is not recognised.

<?php
	print_r(
		request(
			['action'=>'accountDetails', 'uid'=>1001]
		)
	);

    /*############### OUTPUT ##################

	Array (
        [error] => 
        [status] => success
        [data] => {"uid":1001,"squidID":5,"expires":1682784918,"added":1651248918,"name":"Test Person","email":"test.person@gmail.com","type":"c","card_details":"true","approved":1651248918,"last_access":1651320490,"dataused":"0","dataleft":10737418240,"primary":"true"}
        [action] => accountDetails
        [version] => 1.07
        [proc_time] => 1651322513
        [proc_id] => 42
    )   

    #########################################*/

?>
Copy Code