It looked like the data was structured wrong, I've broken it out into it's own variable so you can see the general look of how it should be.
In itemdata, the type has to be specific to the list it is going into SP.Data.<ListName>ListItem. It is also a good idea to get the request digest at the time of execution.
You can try something like this: ...
Change your header attribute "XML-RequestDigest" to "X-RequestDigest".