POST device/enroll
Performs the enroll of the a Device to the informed Environment.
Remarks
C4M Error Code returned:
- null - Device's enrollment has successfully occurred. 
- 403 - Forbidden - The application does not have permission to enroll the device in the environment identified by the given enroll code. 
- 400 - Bad Request - There's no environment with the informed enroll code. 
Request Information
Parameters
| Name | Description | Additional information | 
|---|---|---|
| enrollDto | Device's information and a code bound to the environment, generated on account's creation. | Define this parameter in the request body. | 
Request body formats
application/json, text/json
					Sample:
							
    {
  "alias": "MyDevice",
  "enrollCode": "5F4C788D",
  "hardwareId": "0123456789012345",
  "platform": 0,
  "deviceInformation": {
    "carrier": "VIVO",
    "clientCapabilities": [
      "sample string 1",
      "sample string 2"
    ],
    "deviceDate": {
      "date": "2020-05-15T17:03:27.6960553-03:00",
      "timeZoneId": "E. South America Standard Time",
      "utcOffset": -180
    },
    "imei": "351756053423666",
    "imei2": "351756058473686",
    "locationMode": 1,
    "manufacturer": "Samsung",
    "model": "GT-I9505G",
    "serialNumber": "8988874351756053423666",
    "simCards": [
      {
        "carrier": "Orange",
        "lineNumber": "5132127055",
        "serialNumber": "8988874351756053423666"
      },
      {
        "carrier": "Orange",
        "lineNumber": "5132127055",
        "serialNumber": "8988874351756053423666"
      }
    ],
    "version": "4.1.2",
    "wifiMacAddress": "7c:11:11:11:11:11",
    "receivedDate": "2020-05-15T17:03:27.6960553-03:00"
  }
}
					Response Information
Device automatically created on environment.
Response body formats
application/json, text/json
					Sample:
							
    {
  "consumerKey": "OGRiYmZlYzYtOBCyNC00OTNmLWFlMTgtZWYzMWIzZTRiNjc2",
  "consumerSecret": "OGRiYmZlYzYtOBCyNC00OTNmLWFlMTgtZWYzMWIzZTRiNjc2",
  "activeApplicationId": 1,
  "alias": "MyDevice",
  "creationDate": "2020-05-15T17:03:27.6960553-03:00",
  "enabled": true,
  "groupId": 4,
  "groupName": "sample string 5",
  "hardwareId": "0123456789012345",
  "id": 6,
  "platform": 0,
  "environmentId": 7
}