Page MenuHomeDatingVIP

account.downgradeuseraccess
Updated 2,666 Days AgoPublic

Sets user's access to Free directly in users table.
This method is used for imported users that can have Premium access, but we do not have any subscriptions or transaction data (ie we do not know when user's access should be downgraded).
The party that keeps record whether user should be Premium or not, should call this method via API.

Example:

/api.json?cmd=account.downgradeuseraccess&user_id=4153050&comment=Lorem+ipsum

Required params:

user_id	(integer)
comment	(string)

Example calls and responses:

Success

Request:

/api.json?cmd=account.downgradeuseraccess&user_id=4153096&comment=Lorem+ipsum

Response:

{
  "result": {
      "downgraded": true
  }
}

Error - missing user_id

Request:

/api.json?cmd=account.downgradeuseraccess&comment=Comment

Response:

{
  "meta": {
      "app": [
          {
              "code": "app_error_missing_param",
              "params": "user_id",
              "sticky": false,
              "text": "Missing parameter: user_id"
          }
      ]
  },
  "result": {
      "downgraded": false
  }
}

Error - missing comment

Request:

/api.json?cmd=account.downgradeuseraccess&user_id=4153096

Response:

{
  "meta": {
      "app": [
          {
              "code": "app_error_missing_param",
              "params": "comment",
              "sticky": false,
              "text": "Missing parameter: comment"
          }
      ]
  },
  "result": {
      "downgraded": false
  }
}
Last Author
boris
Last Edited
Jan 6 2017, 08:29

Event Timeline

boris edited the content of this document. (Show Details)
boris shifted this object from the Restricted Space space to the S6 Everyone space.Aug 8 2018, 08:13