Перейти к основному содержимому

Reseller Activate Device API

POST /resellerActivateDevice

Description

This API endpoint allows a reseller to activate a device using its unique device ID. The activation will update the device status to active and provide details about the device session.

Request Body

The request utilizes GraphQL to perform the resellerActivateDevice mutation.

Mutation:

mutation resellerActivateDevice ($deviceId: String!) {
resellerActivateDevice (deviceId: $deviceId) {
id
userId
os
deviceId
loginDate
logoutDate
appVersion
deviceModel
deviceName
fcmToken
isActive
isBlocked
}
}

Variables:

{
"deviceId": "<Device_ID>"
}
  • deviceId (String): The unique identifier for the device to be activated.

Response:

  • Success (200 OK):

    • The response includes details about the device session after the activation operation, including the session ID, user ID, device details, and activation status.
    {
    "data": {
    "resellerActivateDevice": {
    "id": <Session_ID>,
    "userId": <User_ID>,
    "os": "<Operating_System>",
    "deviceId": "<Device_ID>",
    "loginDate": "<Login_Date>",
    "logoutDate": "<Logout_Date>",
    "appVersion": "<App_Version>",
    "deviceModel": "<Device_Model>",
    "deviceName": "<Device_Name>",
    "fcmToken": "<FCM_Token>",
    "isActive": <Is_Active>,
    "isBlocked": <Is_Blocked>
    }
    }
    }
  • Error (4XX/5XX):

    • If there is an issue with activating the device, such as an invalid device ID or insufficient permissions, the response will include an appropriate error message and status code.

Note:

Ensure that the deviceId is correct and corresponds to a device that can be activated. The response will reflect the device status after the activation operation.