Skip to content

GET /api/v3/campaigns/constants/build-statuses

Summary

GET /campaigns/constants/build-statuses

Description

Returns a list of build statuses constants and their values. These are the build_status property of a campaign and are used to show the current rendering status of the creatives for this campaign.

A status of READY indicates thall creatives are ready. See the list of statuses in the response for all possible values

Tags: campaigns

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-********-****-****-****-************

Responses

Response: 200

Description: Sample Response

Content Type: application/json

Schema

Type: object

Properties:

  • success (boolean)
  • build_statuses (array)
  • Array items: object Type: object

    Properties:

    • name (string)
    • value (integer)
Example Response
{
    "success": true,
    "build_statuses": [
        {
            "name": "DELETED",
            "value": 0
        },
        {
            "name": "SETUP",
            "value": 1
        },
        {
            "name": "READY",
            "value": 2
        },
        {
            "name": "RUNNING",
            "value": 3
        },
        {
            "name": "ERROR",
            "value": 4
        },
        {
            "name": "RUNNABLE",
            "value": 5
        },
        {
            "name": "RETRY",
            "value": 6
        },
        {
            "name": "QUEUED",
            "value": 7
        },
        {
            "name": "EMPTY",
            "value": 8
        }
    ]
}

Example Implementations

Bash (cURL)

curl --request GET \
    --get "https://api.lucit.app/api/v3/campaigns/constants/build-statuses" \
    --header "Authorization: Bearer {AuthToken}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "AppIdV3: LCUID-LAP-********-****-****-****-************"

JavaScript (Fetch API)

const url = new URL(
    "https://api.lucit.app/api/v3/campaigns/constants/build-statuses"
);

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

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

PHP (Guzzle)

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.lucit.app/api/v3/campaigns/constants/build-statuses',
    [
        'headers' => [
            'Authorization' => 'Bearer {AuthToken}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'AppIdV3' => 'LCUID-LAP-********-****-****-****-************',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Python (Requests)

import requests
import json

url = 'https://api.lucit.app/api/v3/campaigns/constants/build-statuses'
headers = {
  'Authorization': 'Bearer {AuthToken}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'AppIdV3': 'LCUID-LAP-********-****-****-****-************'
}

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

Example Responses

200 Response

{
    "success": true,
    "build_statuses": [
        {
            "name": "DELETED",
            "value": 0
        },
        {
            "name": "SETUP",
            "value": 1
        },
        {
            "name": "READY",
            "value": 2
        },
        {
            "name": "RUNNING",
            "value": 3
        },
        {
            "name": "ERROR",
            "value": 4
        },
        {
            "name": "RUNNABLE",
            "value": 5
        },
        {
            "name": "RETRY",
            "value": 6
        },
        {
            "name": "QUEUED",
            "value": 7
        },
        {
            "name": "EMPTY",
            "value": 8
        }
    ]
}

← Back to campaigns index | Back to main index