Skip to main content
Version: 202601

Remove block from a card

DELETE 

/openapi/2026-01/themes/edit-sessions/:oseid/sections/:section_id/blocks

Remove a block from a card by index within an edit session.

Request

Path Parameters

    oseid stringrequired

    Edit session ID

    section_id stringrequired

    Section instance ID inside the document; a global card id (header, footer, announcement, cart_drawer) also works

Bodyrequired

    doc_idstringrequired

    Document (template file) ID

    theme_idstringrequired

    Theme ID (for rendering context url)

    block_indexint32

    0-based index of the block to remove within its parent's blocks (the section root when parent_path is empty)

    parent_pathint32[]

    Ancestor index path from the section root to the target block's parent (each element a 0-based index into a blocks array); empty = top-level. e.g. parent_path=[1,0] with block_index=2 removes section.blocks[1].blocks[0].blocks[2]

    template_namestring

    Template name; defaults to file location without .liquid

    localestring

    Rendering locale; defaults to en_US

Responses

OK

Schema
    codestring

    error code

    messagestring

    error message

    data object
    sectionobject

    The updated section object

    htmlstring

    Rendered section HTML. Empty when the target is a global card (header / footer / ...) — those are not re-rendered per section