Shape validation mode

  1. Can be applied at the presentation or slide level (the lowest level takes precedence).

  2. Select between the two modes: Strict or Lenient

Strict

  1. The system validates all shapes defined in the payload.

  2. If any shape is missing from the template.pptx, a VALIDATION_ERROR (400) is returned.

Reference: shapes

Download: input.ziparrow-up-right

{
    "presentation": {
        "template": "template.pptx",
        "shape_validation_mode": "strict",
        "slides": [
            {
                "slide_index": 0,
                "shapes": [
                    {
                        "name": "TextBox 1",
                        "text":"Lorem ipsum dolor sit amet, consectetur adipiscing elit"
                    },
                    {
                        "name": "TextBox 500",
                        "text":"Lorem ipsum dolor sit amet, consectetur adipiscing elit"
                    },
                    {
                        "name": "TextBox 600",
                        "text":"Lorem ipsum dolor sit amet, consectetur adipiscing elit"
                    },
                    {
                        "name": "TextBox 4",
                        "text":"Lorem ipsum dolor sit amet, consectetur adipiscing elit"
                    }
                ]
            }
        ]
    }
}

Lenient

  1. Missing shapes are skipped without interrupting execution.

  2. This mode is useful when working with templates that have optional placeholders or evolving structures.

Reference: shapes

Download: input.ziparrow-up-right | output.pptxarrow-up-right


{
    "presentation": {
        "template": "template.pptx",
        "shape_validation_mode": "lenient",
        "slides": [
            {
                "slide_index": 0,
                "shapes": [
                    {
                        "name": "TextBox 1",
                        "text":"Lorem ipsum dolor sit amet, consectetur adipiscing elit"
                    },
                    {
                        "name": "TextBox 500",
                        "text":"Lorem ipsum dolor sit amet, consectetur adipiscing elit"
                    },
                    {
                        "name": "TextBox 600",
                        "text":"Lorem ipsum dolor sit amet, consectetur adipiscing elit"
                    },
                    {
                        "name": "TextBox 4",
                        "text":"Lorem ipsum dolor sit amet, consectetur adipiscing elit"
                    }
                ]
            }
        ]
    }
}

Last updated