Update Device Profile

To update device profile data:

URL: /api/partners/v1/device

Method: POST

URL Params Required: partnerTenantId=[PARTNER_TENANT_ID>, macAddress=[MAC_ADDRESS_OF_DEVICE] OR deviceId=[DEVICE_ID]

Body:
{
  "firstName": "XXXX",
  "lastName": "YYYY",
  "gender": "male",
  "mobileInfo": {
    "number": "+917567387290",
    "verified": true,
    "optedIn": true
  },
  "emailInfo": {
    "address": "xyz@abc.com",
    "verified": true,
    "optedIn": true
  },
  "deviceType": "mobile",
  "addTags": [
    "tag1",
    "tag2",
    "tag3"
  ],
  "removeTags": [
    "tag4",
    "tag5",
    "tag6"
  ],
  "attributes": [
    {
      "name": "Device attribute 1",
      "values": [
        "device attr1",
        "device attr2"
      ]
    },
    {
      "name": "Device attribute 2",
      "values": [
        "device attr3",
        "device attr4"
      ]
    }
  ],
  "socialNetworkInfo": [
    {
      "socialNetwork": "facebook",
      "socialHandle": "facebook-handle-123",
      "socialInfo": {
        "facebook": {
          "id": "facebook-handle-123",
          "firstName": "xxxx",
          "lastName": "yyyy",
          "middleName": "zzzz",
          "name": "XYZ",
          "shortName": "xyz",
          "nameFormat": "xxx",
          "picture": "http://xyz.com",
          "email": "xyzfacebook@gmail.com",
          "attributes": [
            {
              "name": "Facebook attribute 1",
              "values": [
                "facebook attr1",
                "facebook attr2"
              ]
            },
            {
              "name": "Facebook attribute 2",
              "values": [
                "facebook attr3",
                "facebook attr4"
              ]
            }
          ]
        }
      }
    },
    {
      "socialNetwork": "twitter",
      "socialHandle": "twitter-handle-123",
      "socialInfo": {
        "twitter": {
          "id": "twitter-handle-123",
          "name": "XYZ",
          "screenName": "twitter screen name",
          "friendsCount": 10,
          "followersCount": 20,
          "profileImageUrl": "http://xyz.com",
          "profileBannerUrl": "http://xyz.com",
          "location": "location X",
          "statusesCount": 30,
          "email": "xyztwitter@gmail.com",
          "profileVerified": true,
          "utcOffset": "+5:30",
          "timeZone": "UTC",
          "geoEnabled": false,
          "lang": "EN",
          "attributes": [
            {
              "name": "Twitter attribute 1",
              "values": [
                "twitter attr1",
                "twitter attr2"
              ]
            },
            {
              "name": "Twitter attribute 2",
              "values": [
                "twitter attr3",
                "twitter attr4"
              ]
            }
          ]
        }
      }
    },
    {
      "socialNetwork": "linkedIn",
      "socialHandle": "linkedin-handle-123",
      "socialInfo": {
        "linkedIn": {
          "id": "linkedin-handle-123",
          "firstName": "xxxx",
          "lastName": "yyyy",
          "profilePicture": "http://xyz.com",
          "email": "xyzlinkedin@gmail.com",
          "attributes": [
            {
              "name": "LinkedIn attribute 1",
              "values": [
                "linkedin attr1",
                "linkedin attr2"
              ]
            },
            {
              "name": "LinkedIn attribute 2",
              "values": [
                "linkedin attr3",
                "linkedin attr4"
              ]
            }
          ]
        }
      }
    }
  ]
}
Success Response

Code: 200 – Success

Sample Response:
{
	"deviceId": "",
	"userId": "",
	"tags": [],
	"mobile": "",
	"email": "",
	"gender": "",
	"firstName": "",
	"lastName": "",
	"postalCode": "",
	"optIns": [],
	"otherFields": [],
	"macAddress": "",
	"manufacturer": "",
	"os": "",
	"osVersion": "",
	"type": "NOT_AVAILABLE",
	"socialNetworkInfo": []
}
Error Response
  • Code: 400 BAD REQUEST – [ Invalid body json ].

  • Code: 401 UNAUTHORIZED – [API Key/Partner Tenant Id is not authorized].

  • Code: 404 NOT FOUND – [Device not found for given deviceId].