Your software
My Mautic version is:3.0
My PHP version is:7.3
My Database type and version is:mysql
Your problem
My problem is:I need a special search when using API to bring in contacts.
Item 1: {"total":1,"contacts":{"1791":{"isPublished":true,"dateAdded":"2021-09-20T00:19:34+00:00","dateModified":
Item 2:"all":{"id":"1791","points":1999,"last_active":null,"title":"Mr","firstname":"James","lastname":"Chambers","
my end point: https://mauticsite.com/api/contacts?search=govtom@cox.net";
As you can see above…i am searching the contacts using the email to find the contact record and that works fine. It pulls up the entire record for that contact… how ever all i need is the 4 digit id of the cient. Is there a way to modify my search command to only pull up the id or am i stuck with wasting the time to pull up the entire record and parse out the id…
In item 1 above you can see it id=1791 right at the beginning… so i could parse that out pretty quick since there will never be but i contact… but i would like to only load the id if possible.
Item 2 shows the actual record id… far down maybe 20,000 bytes deep… but surely i can mod my search to once it finds the record only bring home the id… Is that possible… Thanks.
IF anyone has ideas of another way to complete this task here is what i am trying to achieve…
- Use api to send new contact to the mautic data base…
- immediately follow the contact insertion with a request for his/her id so that i can follow with the command to assign that new lead to a specific segment to start a campaign.
- Of course i need the segemnt id, which i have along with the contact id to be able to use the Api to add the new contact to the segment… Thoughts or ideas for a better way…???
Too bad we cannot assign a lead to a segment via his email as that would kill 2 birds with one stone…