Your software
My Mautic version is: 3.0.2
My PHP version is: 7.3.20
I am using mautic/mautic:v3 docker image
Your problem
I am trying to create an automated pipeline for daily contact import however I cannot find API methods that I can use to achieve this. mautic:import seems to only run queued background imports that are already created from the Web UI and in my case I do not want to create imports from Web UI. I want to import quite big amount of contacts every day, add new ones and update existing ones with custom fields used for segmentation so updating every single contact with separate request is also out of question.
I heard about MauticCustomImportBundle, however it seems broken on mautic 3.x.
Is there any way to achieve what I want in current version? I would really appreciate any help.
You can use the Bulk Create endpoint:
{{MauticDomain}}/api/contacts/batch/new
but that means that youll need to parse your file records to JSON array:
[{firstname:“Test”,lastname:“Testname1”,email:“test1@test.dk”},{firstname:“Test”,lastname:“Testname2”,email:“test2@test.dk”}];
Thank you for reply.
Converting file to JSON does not seems problematic for me. I tried this API and everything worked flawlessly for a small data batch so far. I am not able to find that endpoint in documentation for some reason. Thank you for help!