Legacy | Get User Tokens

Gets the list of orders for tokens for the specified user.

Restriction: This API is deprecated in the latest Perfecto UI.

Request syntax

Copy
https://mycloud.perfectomobile.com/services/users/<userId>?operation=getTokens&securityToken=value

Parameters

Name Type Default Description
securityToken* string
A unique cryptographic key assigned to an authorized user.
user string

Deprecated. The name of the user running the operation.

Important: All REST API commands require authentication through the Perfecto security token. See also Authentication in new APIs.
password string

Deprecated. The password for the user.

Important: All REST API commands require authentication through the Perfecto security token. See also Authentication in new APIs.
responseFormat string json The format to use for the response:json or xml

* Mandatory parameter

Response

The response includes three sections:

  • List of all token orders placed for the account. Each entry in the list includes the following information:

    Field Description
    agreementType General description of the user agreement used to order the tokens.
    agreementTime Timestamp indicating when order for tokens placed
    sourceType Role that placed the order
    createdByUser User identifier of user that placed the order
    originalQuantity Number of tokens ordered
    price Dollar price of each token
    validUntil Expiration date of the tokens purchased in this order.
    paymentMethod Description of how tokens were payed, or NO_PAYMENT if payment not needed.
    currency Indication of currency used by payment method.
    validFrom Timestamp of when tokens are available.
    currentQuantity Number of available tokens
    status Status of the token allocation.
  • General account information for the specified (by the <userId>) user including the following information:

    Field Description
    name User name
    unlimited false - Indicates account is limited in token allocation
    true - Indicates account has no limits on token allocation
    tokens Number of tokens available
  • General response information, including the following:

    Field Description
    creationTime Time-stamp of the generation of the response in both ISO_DATETIME_FORMAT and in system milliseconds format
    items Number of tokenOrders included in the list
    modelVersion  System build version number
    productVersion System release identifier
    time Time-stamp of the generation of the user information response in ISO_DATETIME_FORMAT

Examples

This example shows the request for getting the list of orders for tokens for user JohnSmith.

Copy

Request

https://mycloud.perfectomobile.com/services/users/JohnSmith?operation=getTokens&securityToken=<your_token> 
Copy
Response
{
    "tokenOrders":[
    {
        "agreementType":"SYSTEM",
        "agreementTime":"2015-07-16",
        "sourceType":"ADMINISTRATION",
        "createdByUser":"johns@perfectomobile.com",
        "originalQuantity":"35",
        "price":"0.0",
        "validUntil":"2016-01-16",
        "paymentMethod":"NO_PAYMENT",
        "currency":"USD",
        "validFrom":"2015-07-16",
        "currentQuantity":"35",
        "status":"NOT_STARTED"    },
    {
        "agreementType":"SYSTEM",
        "agreementTime":"2015-09-02",
        "sourceType":"ADMINISTRATION",
        "createdByUser":"johns@perfectomobile.com",
        "originalQuantity":"198",
        "price":"0.0",
        "validUntil":"2016-03-02",
        "paymentMethod":"NO_PAYMENT",
        "currency":"USD",
        "validFrom":"2015-09-02",
        "currentQuantity":"198",
        "status":"NOT_STARTED"    },],
    "account":{
        "name":"johns@perfectomobile.com",
        "unlimited":true,
        "tokens":965
    },
    "info":{
        "creationTime":{"formatted":"2016-11-20T08:28:29Z","millis":"1479630509711"},
        "items":"2",
        "modelVersion":"2.19.0.0",
        "productVersion":"master",
        "time":"2016-11-20T08:28:29Z"    }
}