Forum
Dynamically assigning a related field via API
Hi all,
This is probably a question for Drew unless someone has done something similar before?
Unfortunately due to limitations of categories and not being able to mix and match "and" "or" as you would filters I have had to devise a way of adding locations to a collection called "jobs", if anyone knows of a simple way I'd love to hear it, but I have the following:
I am using 3 separate collections "global region", "country" and "country region" these are then assigned to a job via related fields in the template allowing a user to select one of each.
However I need to be able to insert items in the the "jobs" collection dynamically via the API and an XML feed, and was wondering if the related fields can be assigned dynamically using this method?
If so are there any code examples out there that might shed some light on this?
Many thanks
Lee
There isn't an API for inserting content - which API are you using?
Hi Drew,
I'm not at the moment, but I was under the impression you could insert collection items programmatically using the API?
Is this not the case?
Many thanks
That's not the case currently. There's no API for content creation.
Thanks Drew, I'm a bit confused though, you seemed to imply in one of my threads early on about this subject that it was possible?
https://forum.grabaperch.com/forum/06-24-2015-3rd-party-api-and-collections
Can I just clarify, is it possible to programmatically process and insert an XML feed into a collection?
There's no official API to do that. It's technically possible, of course, and there may well be an API in the future.