From ba5c9257171079ba06314686774edd01ddb9d6e5 Mon Sep 17 00:00:00 2001 From: Richie Larison Date: Mon, 4 Mar 2019 10:32:37 -0500 Subject: [PATCH] Developer Documentation for #6538 --- source/includes/_api_endpoint_contacts.md | 30 +++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/source/includes/_api_endpoint_contacts.md b/source/includes/_api_endpoint_contacts.md index dcb7362e413..9cee4b35678 100644 --- a/source/includes/_api_endpoint_contacts.md +++ b/source/includes/_api_endpoint_contacts.md @@ -450,6 +450,36 @@ channel|Channel of DNC. For example 'email', 'sms'... Default is email. Same as [Get Contact](#get-contact). +### Import Contacts from CSV file +```php +importCsv($mapping, $config, $file); +``` +Import contacts from a CSV file + +#### HTTP Request + +To add contacts from a CSV file: + +`POST /contacts/importCsv` + +**Data Parameters** +Name|Description +----|----------- +mapping| JSON mapping of CSV columns in format: {"csv_column": "mautic_field", ...} +config| Import configuration JSON object in format: {'delimiter': ',','enclosure': '"','escape': '\\','batchlimit':'200'} +file| Multipart-encoded CSV file + +#### Response + +`Expected Response Code: 200` +```json +{ + "success": true +} +``` + ### Add UTM Tags ```php