Save relationships between content types using REST API

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Save relationships between content types using REST API

mvelasco
Question
I have two content types and a relationship 1: N
Content types:  Promotion (parent), Version (child)
Relationship Promotion-Version

I didn't have any problem saving "Versions" but every time I save a Promotion I lost all previous relationships with Versions. 
As documentation says https://dotcms.com/docs/latest/save-content-using-the-rest-api "When updating content using the REST API, you must submit all relationships for a piece of content each time you update the content."

I tried with:

  1. {
    1. Promotion-Version:"+identifier:(11f3a625-ec65-4414-9c97-84e8e6dc8ede && 35f3ed74-06f2-4463-a4e9-a37823008c9a)"
    2. acquisitionoffer:"True"
    3. domain:"domain-1"
    4. id:"Test 1.3"
    5. identifier:"76df92aa-a443-41bd-9818-8afddbe860c6"
    6. stInode:"c9cebf62-a542-4197-8f7d-55e004ab8393"
    7. type:"Casino"
 }

11f3a625-ec65-4414-9c97-84e8e6dc8ede and 35f3ed74-06f2-4463-a4e9-a37823008c9a are two version of promotion 76df92aa-a443-41bd-9818-8afddbe860c6 But this didn't work.


--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/7492ab41-8c5e-442b-9693-2e04887c9bdb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.