In the add operation you can use two kinds of payload. The first is to use only the code attribute to add an entitlement that already exists as child. The second is to use the name and type attributes. In this case if the child entitlement don't exist, it will be created and added as child.
Entitlements required: tenantadmin [Tenant Administrator], manageAppAccessOwner [Manage Application Entitlements].