Loading...

POST   https://api.3seventy.com/api/v2.1/account/{accountId}/action-importContacts

Description

Creates the import action.

Path Parameters

accountId integer The account which holds the import action. required

Request Properties application/json

Schedules array[object] The list of schedules associated with the action required
Execute boolean Set true if the action should be executed on creation required
Url string Points to a BLOB url that contains the file to parse. required
Subscriptions array[object] A list of subscriptions that should be added or modified for each of the contacts in the supplied file. required
OverrideSubscription boolean This will override optout to optin required
  {
     "Url": "https://platformstaging/64-af4b-334ed229caa0/FromProd5-Staging.csv",
     "OverrideSubscription": false,
     "Schedules": [],
     "Execute" : "true",
 	"Subscriptions": []
   }

Response Properties application/json

Id integer The ID of the event.
AccountId integer The account ID that the action reports under.
Created string When this action was first created.
Modified string When this action was last modified.
CreatedBy string Who initially created this action.
ModifiedBy string Who last modified this action
Schedules array[object] The list of schedules associated with the action
Url string Points to a BLOB url that contains the file to parse.
Subscriptions array[object] A list of subscriptions that should be added or modified for each of the contacts in the supplied file.
OverrideSubscription boolean This will override optout to optin
   {
      "Url": "https://platformstaging/64-af4b-334ed229caa0/FromProd5-Staging.csv",
      "TargetAccountId": 0,
      "Subscriptions": [],
      "Map": [],
      "OverrideSubscription": false,
      "Id": 16954,
      "AccountId": 43510,
      "Created": "2015-10-20T20:03:53",
      "Modified": "2015-10-20T20:03:53",
      "CreatedBy": "",
      "ModifiedBy": "",
      "Schedules": []
    }

C#


using System;
using System.Collections.Generic;
using System.Linq;
using ThreeSeventy.Vector.Client;
using ThreeSeventy.Vector.Client.Models;

public class Program
{

private static void Main(string[] args)
{

const int accountId = 4662;

const int actionId = XXXX;

var context = new T70Context();

var actionImportContactRepo = context.Repository<ActionImportContacts>(new { AccountId = accountId });

var item = new ActionImportContacts()
{

AccountId = accountId,

Schedules = XXXX,

Url = "XXX",

Subscriptions = XXXXX

};

actionImportContactRepo.Add(item);

}

}