Template Details

Get details of a template - Abyssale REST API

Once a template has been designed, all related information can be retrieved. It contains:

  • Its unique identifier (Template ID)

  • The list of available formats (format names are unique within a template)

  • All available attributes by element with the associated value for each format (color, payload, image_url...)

Advanced properties can be retrieved by using the ?i=advanced query URL parameter.

Sample response

{
    "template_id": "7dc0229b-cc0e-4fe5-971d-325164480887",
    "name": "Abyssale demo - FB Feed",
    "type": "static",
    "created_at": 1681215684,
    "updated_at": 1681217794,
    "category_name": "Abyssale Demo",
    "formats": [
        {
            "id": "medium-rectangle",
            "width": 300,
            "height": 250,
            "preview_url": "https://public-example-link.com/preview/87f7f83b-894f-4900-abe2-3e0e769b12d7.png"
        },
        {
            "id": "wide-skyscraper",
            "width": 160,
            "height": 600,
            "preview_url": "https://public-example-link.com/preview/87f7f83b-894f-4900-abe2-3e0e769b12d7-wide-skyscraper.png"
        }
    ],
    "elements": [
        {
            "name": "root",
            "type": "container",
            "attributes": [
                {
                    "id": "background_color",
                    "help": "6 digits hexadecimal background color of the banner (i.e. #F3F3F3)",
                    "values": {
                        "medium-rectangle": "#ffffff",
                        "wide-skyscraper": "#c3bfbf"
                    }
                }
            ],
            "layout": {
                "medium-rectangle": {
                    "x": 0,
                    "y": 0,
                    "width": 300,
                    "height": 250
                },
                "wide-skyscraper": {
                    "x": 0,
                    "y": 0,
                    "width": 160,
                    "height": 600
                }
            }
        },
        {
            "name": "tb-text_0",
            "type": "text",
            "attributes": [
                {
                    "id": "payload",
                    "help": "Text content (i.e. Lorem ipsum)",
                    "values": {
                        "medium-rectangle": "Lorem Ipsum",
                        "wide-skyscraper": "Test"
                    }
                },
                {
                    "id": "color",
                    "help": "6 or 8 digits hexadecimal color of the text (i.e. #EAEAEA)",
                    "values": {
                        "medium-rectangle": "#000000",
                        "wide-skyscraper": "#000000",
                    }
                }
            ],
            "layout": {
                "medium-rectangle": {
                    "x": 20,
                    "y": 40,
                    "width": 200,
                    "height": 50
                },
                "wide-skyscraper": {
                    "x": 10,
                    "y": 20,
                    "width": 100,
                    "height": 100
                }
            }
        },
    ]
}

This sample represents the details of a template (ID: 7dc0229b-cc0e-4fe5-971d-325164480887), which contains:

  • 2 formats: medium-rectangle and wide-skyscraper. Those names can be used in the image generation endpoints to define which formats to create.

  • 2 elements:

    • root (type: container)

      • The root property is always available and corresponds to the root format container.

      • It contains a single background_color attribute:

        • with a #ffffff value on the medium-rectangle format

        • with a #c3bfbf value on the wide-skyscraper format

    • tb-text_0 (type: text). It contains 2 attributes:

      • payload: The text content.

        • Lorem Ipsum on the medium-rectangle format

        • Test on the wide-skyscraper format

      • color: The text color.

        • #000000 for both formats

Last updated