For the complete documentation index, see llms.txt. This page is also available as Markdown.

Create a section with a multiple or dropdown element

curl https://mburger.cloud/api/blocks/<id>/sections
-X POST 
-H "Accept: application/json" 
-H "Content-Type: application/x-www-form-urlencoded"
-H "X-MBurger-Token: <token>" 
-H "X-MBurger-Version: 3"
-d 'elements[<locale>][dropdown]=<value>'
-d 'elements[<locale>][multiple]=<value>'
let factory = MBUploadableElementsFactory(localeIdentifier: "en")
let elements = [
    factory.createDropdownElement(name: DROPDOWN_ELEMENT_NAME,
                                  value: VALUE_SELECTED),
    factory.createMultipleElement(name: MULTIPLE_ELEMENT_NAME,
                                  values: [SELECTED_ELEMENT1, SELECTED_ELEMENT2])
]
        
MBAdmin.addSectionToBlock(withBlockId: BLOCK_ID,
                          elements: elements,
                          success: { sectionId in
                                    
                          },
                          failure: { error in
                                    
                          })

Value of

"elements[<locale>][multiple]"

must be an array of string

Last updated