Creating a resource from another endpoint
Hey everyone! I’m running into a bit of a challenge and could use your input.
I have an endpoint called locations, and I want to allow users to create leads as part of a POST request to:
The idea is to allow creating a location along with multiple leads in a single request. Here's an example of the payload I’m trying to send:
- What I’ve Tried
Checked Ash JSON API relationship manipulation docs
- Attempted to manually create the leads inside a change block using Ash.Changeset.manage_relationship/4
relevant code:
---
I have an endpoint called locations, and I want to allow users to create leads as part of a POST request to:
{{url}}/api/json/locationThe idea is to allow creating a location along with multiple leads in a single request. Here's an example of the payload I’m trying to send:
- What I’ve Tried
Checked Ash JSON API relationship manipulation docs
- Attempted to manually create the leads inside a change block using Ash.Changeset.manage_relationship/4
relevant code:
---
