Create a section with a relation
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>][<element_type>]=<value>"
-d "relation[<index>]=<section_id>"let factory = MBUploadableElementsFactory(localeIdentifier: "en")
let elements = [factory.createRelationElement(name: ELEMENT_NAME,
blockId: RELATION_BLOCK_ID,
sectionId: RELATION_SECTION_ID)]
MBAdmin.addSectionToBlock(withBlockId: BLOCK_ID,
elements: elements,
success: { sectionId in
},
failure: { error in
})Last updated