Skip to content

GET /api/v3/accounts/{lcuid}/default-creative

Summary

GET accounts/{id}/default-creative

Description

Return the default creative for an account based on a location or a size string

Tags: accounts

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:

  • board_identifier (string): The vendor identifier for the board you want a default creative for An image in the proper size will be returned.
  • size (string): Provide a string in widthxheight format to get a creative in that size.

Responses

Response: 200

Description: Sample Response

Content Type: application/json

Schema

Type: object

Properties:

  • success (boolean)
  • creative (object) Type: object

Properties:

  • order_number (integer)
  • status (integer)
  • unique_hash (string)
  • lcuid (string)
  • hash_id (string)
  • options (object) Type: object

    Properties:

    • size_in_bytes (string)
    • dimension_height (integer)
    • dimension_width (integer)
    • hash_md5 (string)
    • public_url (string)
  • xr_status (integer)

  • drive_template_id (string)
Example Response
{
    "success": true,
    "creative": {
        "order_number": 90,
        "status": 1,
        "unique_hash": "8312c149caa516a6370bce9792755a79",
        "lcuid": "LCUID-LP-6e0eb641-5b43-4263-bf4d-44813cd7b221",
        "hash_id": "lch-4DgL",
        "options": {
            "size_in_bytes": null,
            "dimension_height": 768,
            "dimension_width": 1024,
            "hash_md5": "20bb46f0084a9bd04ac0643600d433a4",
            "public_url": "http://localhost:8080/storage/12/5271/img_69823a976ca53_9eee059f05fe3b902ba2.png"
        },
        "xr_status": 1,
        "drive_template_id": "default_creative_template_1024x768"
    }
}

Response: 422

Description: No Default Creative

Content Type: application/json

Schema

Type: object

Properties:

  • ok (boolean)
  • http_code (integer)
  • code (string)
  • message (string)
  • data (array)
  • lucore_error_response (boolean)
Example Response
{
    "ok": false,
    "http_code": 422,
    "code": "no_creative_image",
    "message": "No creative image found or unable to generate",
    "data": [],
    "lucore_error_response": true
}

Example Implementations

Bash (cURL)

curl --request GET \
    --get "https://api.lucit.app/api/v3/accounts/LCUID-LA-506fc585-77be-11ec-acb9-c2cdb617d190/default-creative" \
    --header "Authorization: Bearer {AuthToken}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "AppIdV3: LCUID-LAP-********-****-****-****-************" \
    --data "{
    \"board_identifier\": \"123456\",
    \"size\": \"600x500\"
}"

JavaScript (Fetch API)

const url = new URL(
    "https://api.lucit.app/api/v3/accounts/LCUID-LA-506fc585-77be-11ec-acb9-c2cdb617d190/default-creative"
);

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

let body = {
    "board_identifier": "123456",
    "size": "600x500"
};

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

PHP (Guzzle)

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.lucit.app/api/v3/accounts/LCUID-LA-506fc585-77be-11ec-acb9-c2cdb617d190/default-creative',
    [
        'headers' => [
            'Authorization' => 'Bearer {AuthToken}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'AppIdV3' => 'LCUID-LAP-********-****-****-****-************',
        ],
        'json' => [
            'board_identifier' => '123456',
            'size' => '600x500',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Python (Requests)

import requests
import json

url = 'https://api.lucit.app/api/v3/accounts/LCUID-LA-506fc585-77be-11ec-acb9-c2cdb617d190/default-creative'
payload = {
    "board_identifier": "123456",
    "size": "600x500"
}
headers = {
  'Authorization': 'Bearer {AuthToken}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'AppIdV3': 'LCUID-LAP-********-****-****-****-************'
}

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

← Back to accounts index | Back to main index