Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Overview

The following document describes the actions you can perform on a device level using the server to server API:

...

The above requests supports setting of multiple devices in a single request when using alias.

 

Request URL

The following request is asynchronous, as such a response of "200" ok indicates that the request was submitted successfully.  

PUT 

https://saas.appoxee.com/api/v3/device

...

Name
Value
X_KEY

Your Appoxee app SDK key

 

Example Request


Set/remove tags by alias 
Code Block
{
    "alias":"danny",
    "actions":
        {
            "tags": {
                "set": ["tag1", "tag2"],
                "remove": ["tag3", "tag4"]
           }
        }
}

 

Set/remove tags by alias to multiple devices
Code Block
{
    "alias":["danny","john","lucas"],
    "actions":
        {
            "tags": {
                "set": ["tag1", "tag2"],
                "remove": ["tag3", "tag4"]
           }
        }
}

 

Set fields by alias 

 

Code Block
 {
    "alias":"danny",
    "actions":
        {
            "set": {
                        "num_of_purchases": 4,
                        "money_spent": 1,
                        "user_name": "danny",
                        "user_birthday": "1975-02-22T00:00:00"
            }
        }
}

 

Set fields by alias for multiple devices

 

Code Block
 {
    "alias":["danny","john","lucas"],
    "actions":
        {
            "set": {
                        "num_of_purchases": 4,
                        "money_spent": 1,
                        "user_name": "danny",
                        "user_birthday": "1975-02-22T00:00:00"
            }
        }
}

 

Increment fields by alias 

 

Code Block
{
    "alias":"danny",
    "actions":
        {
            "inc": {
                        "num_of_purchases": 4,
                        "money_spent": 1
            }
        }
} 

 

Increment fields by alias for multiple devices

 

Code Block
{
    "alias":["danny","john","lucas"],
    "actions":
        {
            "inc": {
                        "num_of_purchases": 4,
                        "money_spent": 1
            }
        }
} 

 

...

 

Code Block
 {
    "key":"898cfd56-7516-4248-aab1-6d14d2ceb355",
    "actions":
        {
            "set": {
                        "alias": "xxxx"
                        }
        }
}

 

Set/remove tags by adid (aka Appoxee Device ID)
Code Block
 {
    "key":"898cfd56-7516-4248-aab1-6d14d2ceb355",
    "actions":
        {
            "tags": {
                "set": ["tag1", "tag2"],
                "remove": ["tag3", "tag4"]
           }
        }
}

 

Set fields by adid (aka Appoxee Device ID) 

 

Code Block
{
    "key":"898cfd56-7516-4248-aab1-6d14d2ceb355",
    "actions":
        {
            "set": {
                        "num_of_purchases": 4,
                        "money_spent": 1,
                        "user_name": "danny",
                        "user_birthday": "1975-02-22T00:00:00"
            }
        }
} 

 

Increment fields by adid (aka Appoxee Device ID)

 

Code Block
 {
    "key":"898cfd56-7516-4248-aab1-6d14d2ceb355",
    "actions":
        {
            "inc": {
                        "num_of_purchases": 4,
                        "money_spent": 1
            }
        }
}

 

...