Skip to content

Using the API

The API (Application Programming Interface) is a set of methods of communication between third party servers / mobile devices to our backend (database). This would be your channel to work with us server to server and get the data you want.

API Methods#

  1. Get profiles by list
  2. Get profile by app user ID
  3. Get number of scanned images by device ID
  4. Delete user data by device and owner ID
  5. Delete user data by device and app ID
  6. Post profile to database

Get profiles by list#

URL: https://api.pixoneye.com/v1/users/profiles-by-device-ids

Description: Get a list of users' profiles for a given list of device ids.

Method: POST

Headers:

  1. Content-Type: application/json
  2. api_key: API_KEY

Body:

To fetch profiles for a given list of device IDs:

{ "deviceIDs": [ "deviceID1", "deviceID2" , "deviceID3" ], "appID":  "MyApp" }

To fetch profiles for all of the users that belong to a given application:

{ "deviceIDs" : "*",  "appID":  "MyApp"  }

The profiles will be returned in batches. To fetch the next batch of results, repeat the http request with the scrollID parameter returned from previous response:

{ "deviceIDs" : "*",  "appID":  "MyApp", "scrollID": "a587f1ca5c444a86830c276c7b97db0c_L3N0b3JhZ2UvZW11bGF0ZWQvMC9X"  }

Note: the scrollID parameter will remain active for 60 seconds after response has been returned from server.

Response:

{
    profiles: [
    {
        "deviceID": "c1c9a326-4ae8-4a55-aa0b-434f62a126a7",
        "gender": "male",
        "marital-status": "single",
        "parental-status": "without children",
        "age": "under 25",
        "transportation": [
            "car"
        ],
        "pets": [
            "dog"
        ],
        "sports": [
            "active",
            "viewer"
         ],
        "country": "Korea - South",
        "city": "Gwacheon",
        "country-vacations": [ "Italy", "France"],
        "city-vacations": [ "Rome", "Paris" ],
        "life-events": ["about to have a baby", "about to move home"]
    },

    {
        "deviceID": "f533f730-1caa-42c1-9d6b-19214e692aa2",
        "gender": "female",
        "marital-status": "in a relationship",
        "parental-status": "with children",
        "age": "35-45",
        "transportation": [
            "car"
        ],
        "country": "Israel",
        "city": "Tel Aviv",
        "country-vacations": [
            "UK"
        ],
        "city-vacations": [
            "London"
        ]
        "life-events": ["about to travel"]
    },

    {
        "deviceID": "g576f730-1caa-42c1-9a6b-19214e692uu4",
        "gender": "unkown",
        "marital-status": "unkown",
        "parental-status": "with children",
        "age": "unkown",
        "country": "Israel",
        "city": "Tel Aviv",
    },
    .
    .
    .

    ],
    "scrollID": "a587f1ca5c444a86830c276c7b97db0c_L3N0b3JhZ2UvZW11bGF0ZWQvMC9X"
}

Get profile by app user ID#

Notice the list can have one item

URL: https://api.pixoneye.com/v1/users/profile-by-app-user-id/:appUserID/:appID

Description: Get user's profile for a given app user ID and app ID.

Method: GET

URL Parameters:

  1. appUserID: application user ID
  2. appID: application ID

Headers:

  1. Content-Type: application/json
  2. api_key: API_KEY

Response:

{
    profile: {
        "deviceID": "c1c9a326-4ae8-4a55-aa0b-434f62a126a7",
        "gender": "male",
        "marital-status": "single",
        "parental-status": "without children",
        "age": "under 25",
        "transportation": [
            "car"
        ],
        "pets": [
            "dog"
        ],
        "sports": [
            "active",
            "viewer"
         ],
        "country": "Korea - South",
        "city": "Gwacheon",
        "country-vacations": [ "Italy", "France"],
        "city-vacations": [ "Rome", "Paris" ],
        "life-events": ["about to have a baby", "about to move home"]
    }
}

Explanation:

  • API_KEY - a security token provided to API clients per application.

Possible Response Values:

  1. "gender":
    • "male"
    • "female"
    • "unknown"
  2. “marital-status”:
    • “single”
    • ”in a relationship”
    • "unknown"
  3. "parental-status":
    • "without children"
    • “with children”
    • "unknown"
  4. “age”:
    • "under 25"
    • "25-35"
    • "35-45"
    • "45-55"
    • "over 55"
    • "unknown"
  5. "transportation":
    • "car"
  6. "pets":
    • "dog"
  7. "sports":
    • "active"
    • "viewer"
  8. "life-events":
    • "about to have a baby"
    • "about to move home"
    • "about to travel"

Get scanned images by device id#

URL: https://api.pixoneye.com/v1/users/scanned-images-by-device-id/:deviceID/:appID

Description: Get the number of user images that have been scanned by Pixoneye SDK.

Method: GET

Headers:

  1. Content-Type: application/json
  2. api_key: API_KEY

Response:

{
    "count": 2907
}

Explanation:

  • API_KEY - a security token provided to API clients per application.

Delete user data by device and owner ID#

URL: https://api.pixoneye.com/v1/users/delete-user-data-by-owner-id/:deviceID/:ownerID

Description: Delete user images and profile from Pixoneye's storage by device and owner ID. Each owner may own multiple apps.

Method: DELETE

Headers:

  1. Content-Type: application/json
  2. api_key: API_KEY

Response:

Status 200.

Explanation:

  • API_KEY - a security token provided to API clients per application.

Delete user data by device and app ID#

URL: https://api.pixoneye.com/v1/users/delete-user-data-by-app-id/:deviceID/:appID

Description: Delete user images and profile from Pixoneye's storage by device and app ID.

Method: DELETE

Headers:

  1. Content-Type: application/json
  2. api_key: API_KEY

Response:

Status 200.

Explanation:

  • API_KEY - a security token provided to API clients per application.

Post profile to database#

URL: https://api.pixoneye.com/v1/users/post-profile

Description: Post user profile to Pixoneye storage

Method: POST

Headers:

  1. Content-Type: application/json
  2. api_key: API_KEY

Body:

{
    "appID": "MyApp",
    "deviceID": "device-1",
    "parental-status": "without children",
    "gender": "male",
    "country": "Israel",
    "city": "Jerusalem"
}

Response:

Status 201.

Explanation:

  • API_KEY - a security token provided to API clients per application.