1

it's the same issue mentioned in: Create Item using REST API and Branch as template.

Wanted to know if any solution was found for the issue mentioned in the above post.

I am using version Sitecore 10.3 and API response returns the same issue Template is invalid/Bad request. API Response error attached.

enter image description here

p.s. : Couldn't add a comment previous post, so posted a new question. I can add more details

1
  • Can you share the code snippet you are using? May 17, 2023 at 6:26

1 Answer 1

2

That's not possible with Restful Api for ItemService.

The only method that allows create items there is Create Item (read https://doc.sitecore.com/xp/en/developers/103/sitecore-experience-manager/the-restful-api-for-the-itemservice.html for more information). And that method accepts template ID.

When it processes request, it only checks for template with that ID using

database.GetTemplate(new ID(request.Template))

code and this code does not allow template branches.

I guess you can create a Sitecore Support ticket asking them to extend the functionality, but that will be a feature request.

Not the answer you're looking for? Browse other questions tagged or ask your own question.