How to modify nested content?

Hi! I’m new to storyblok so bear with me. We got a content type called Event Page which has a block list that can contain a block “occasion box” which in itself has occasions which are also blocks.
This “Event Page” is updated by a webhook that is reacting to when a products in our ecommerce PaaS is changed.

I’ve removed alot here but this is basically how an existing story look:

{
	"story": {
	...
		"content": {
			...
			"sidebar": [{
				"_uid": "123",
				"title": "Choose occasion",
				"component": "occasionsBox",
				"occasions": [{
					"_uid": "456",
					"label": "15, 16, 17 april",
					"onSite": true,
					"component": "occasion",
					"description": "Stockholm"
				}]
			}]
		}
	}
}

I can create an occassion separately but I have yet to figure out how to link these contents together. I’ve tried PUT:ing json like the one above to an existing story that doesn’t previously have an occasionBox but nothing happens.
Also:How would I go about editing the nested content on this story? What’s in the json gives me only the _uid which is a guid and the management api wants a numeric id when updating stories.

Best regards
Andreas

1 Like

Just figured this one out myself. The problem was two fold.

  1. I had an out of schema property which caused a conflict
  2. I hadn’t saved the occasion to the occasionbox prior to saving the occasionbox to the event page
1 Like