Skip to content

POST /api/v3/drive-templates/{lcuid}/preview

Summary

POST /drive-templates/{lcuid}/preview

Description

Compose one or more preview HTML documents for the persisted drive template identified by lcuid. No writes are performed.

Tags: templates

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

Content Type: application/json

Schema

Type: object

Properties:

  • inventory_item_lcuid (string): Optional LCUID of an inventory item to use for macro substitution.
  • digital_board_lcuid (string): Optional LCUID of a digital board to use for macro substitution.
  • digital_board_formats (array): List of digital board format codes. Required (along with digital_board_lcuid as an alternative) when type is null or IMAGE. Not required when type is HTML.
  • Array items: string
  • type (string): Optional type filter ("HTML" or "IMAGE"). Omitted = all available types. v1 supports HTML only.

Responses

Response: 200

Example Implementations

Bash (cURL)

curl --request POST \
  --url "https://api.lucit.app/api/v3/drive-templates/{lcuid}/preview" \
  --header "Authorization: Bearer {AuthToken}" \
  --header "Content-Type: application/json" \
  --header "Accept: application/json" \
  --header "AppIdV3: LCUID-LAP-********-****-****-****-************"

JavaScript (Fetch API)

const url = "https://api.lucit.app/api/v3/drive-templates/{lcuid}/preview";

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

fetch(url, {
  method: "POST",
  headers: headers
})
  .then(response => response.json())
  .then(data => console.log(data))
  .catch(error => console.error('Error:', error));

PHP (Guzzle)

<?php

require_once 'vendor/autoload.php';

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.lucit.app/api/v3/drive-templates/{lcuid}/preview', [
  'headers' => [
    'Authorization' => 'Bearer {AuthToken}',
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
    'AppIdV3' => 'LCUID-LAP-********-****-****-****-************',
  ]
]);

$body = $response->getBody();
$data = json_decode($body, true);
print_r($data);

Python (Requests)

import requests
import json

url = "https://api.lucit.app/api/v3/drive-templates/{lcuid}/preview"

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

response = requests.post(url, headers=headers)
print(response.json())

← Back to drive-templates index | Back to main index