Skip to content

POST /api/v3/digital-boards/{lcuid}/analytics/record-play

Summary

POST digital-board/{id}/analytics/record-play

Description

Record a single play and impression(s) for a single creative on a digital board

Tags: analytics

Parameters

Header Parameters

Name Type Required Description Example
Authorization string ✓ Yes Bearer {AuthToken}
Content-Type string ✓ Yes application/json
Accept string ✓ Yes application/json
AppIdV3 string ✓ Yes LCUID-LAP-********-****-****-****-************

Request Body

Required: Yes

Content Type: application/json

Schema

Type: object

Required fields: creative_id, play_datetime, play_duration

Properties:

  • creative_id (string) (required): The creative id that you are recording a play for This is a composite id for the campaign/creative that encodes both the campaign ID and the creative id into a single composite id for the playback reporting url. The format of this ID may change, and the version of this ID is in the prefix (e.g. C1- is version 1) See: Campaign Puller for the pull endpoints that will provide the creative id.
  • play_datetime (string) (required): The play datetime. Must be a valid date.
  • play_duration (number) (required): The play duration in seconds for how long the creative was on-screen.
  • impressions (number): The number of impressions that this play received If not provided, the system will calculate the impressions based on the digital board's average daily impressions.

Responses

Response: 200

Description: Sample Response

Content Type: application/json

Schema

Type: object

Properties:

  • success (boolean): true if the play was recorded
Example Response
{
    "success": true
}

Example Implementations

Bash (cURL)

curl --request POST \
    "https://api.lucit.app/api/v3/digital-boards/LCUID-LB-506fc585-77be-11ec-acb9-c2cdb617d190/analytics/record-play" \
    --header "Authorization: Bearer {AuthToken}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "AppIdV3: LCUID-LAP-********-****-****-****-************" \
    --data "{
    \"creative_id\": \"C1-4DYY-LP-4Hco\",
    \"play_datetime\": \"2022-02-02 12:00:00\",
    \"play_duration\": 8,
    \"impressions\": 2.7
}"

JavaScript (Fetch API)

const url = new URL(
    "https://api.lucit.app/api/v3/digital-boards/LCUID-LB-506fc585-77be-11ec-acb9-c2cdb617d190/analytics/record-play"
);

const headers = {
    "Authorization": "Bearer {AuthToken}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "AppIdV3": "LCUID-LAP-********-****-****-****-************",
};

let body = {
    "creative_id": "C1-4DYY-LP-4Hco",
    "play_datetime": "2022-02-02 12:00:00",
    "play_duration": 8,
    "impressions": 2.7
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

PHP (Guzzle)

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api.lucit.app/api/v3/digital-boards/LCUID-LB-506fc585-77be-11ec-acb9-c2cdb617d190/analytics/record-play',
    [
        'headers' => [
            'Authorization' => 'Bearer {AuthToken}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'AppIdV3' => 'LCUID-LAP-********-****-****-****-************',
        ],
        'json' => [
            'creative_id' => 'C1-4DYY-LP-4Hco',
            'play_datetime' => '2022-02-02 12:00:00',
            'play_duration' => 8.0,
            'impressions' => 2.7,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Python (Requests)

import requests
import json

url = 'https://api.lucit.app/api/v3/digital-boards/LCUID-LB-506fc585-77be-11ec-acb9-c2cdb617d190/analytics/record-play'
payload = {
    "creative_id": "C1-4DYY-LP-4Hco",
    "play_datetime": "2022-02-02 12:00:00",
    "play_duration": 8,
    "impressions": 2.7
}
headers = {
  'Authorization': 'Bearer {AuthToken}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'AppIdV3': 'LCUID-LAP-********-****-****-****-************'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

← Back to digital-boards index | Back to main index