Update Subscription API
POST /updateSubscription
Description
This API endpoint allows for updating a user's subscription settings, including the number of simultaneous logins allowed, daily bandwidth limits, and download/upload limits.
Request Body
The request utilizes GraphQL to perform the updateSubscription
mutation.
Mutation:
mutation updateSubscription ($userId: Int, $multiLoginCount: Int, $dailyBandwidth: Float, $downloadUpload: Float) {
updateSubscription (userId: $userId, multiLoginCount: $multiLoginCount, dailyBandwidth: $dailyBandwidth, downloadUpload: $downloadUpload)
}
Variables:
{
"userId": 0,
"multiLoginCount": 0,
"dailyBandwidth": "",
"downloadUpload": ""
}
- userId (Int): The unique identifier of the user whose subscription is being updated.
- multiLoginCount (Int): The updated number of simultaneous logins allowed for the user.
- dailyBandwidth (Float): The updated daily bandwidth limit for the user.
- downloadUpload (Float): The updated download/upload limit for the user.
Response:
-
Success (200 OK):
- If the subscription update is successful, the response will confirm that the user's subscription settings have been updated.
-
Error (4XX/5XX):
- Appropriate error messages and status codes will be returned in cases of invalid data, missing required fields, or server errors.
Note:
Ensure that the userId
corresponds to an existing user whose subscription is being updated. All required fields should be provided and correctly formatted according to the platform's specifications. This API should be used by admins or authorized users with the necessary permissions to update user subscription settings.