[API-51] Relate resources when creating or updating them

https://gointegro.atlassian.net/browse/API-51