post_import_dataset
 
 
Overview
Imports a dataset. To get the column mappings call the get_dataset_columns function. E.g. If according to get_dataset_columns Surname is in col1, and in the file you are importing, the surname is in column 2, you should specify col1=2.
 
Parameters
 
NameTypeRequiredComments
Col1..Col25IntegerAt least one of these columns is required.Get the column mappings by calling the 'get_dataset_columns' function. If get_dataset_columns says that the surname column in your dataset is col3, and in the file you are importing the surname is in column 5, you should specify 'Col3=5'
DatasetIDIntegerYesThe id of the dataset you want to import to
EmailColIntegerAt least one of EmailCol or MobileCol is required.This is the 1 based column number where the email address resides in the file you are importing
FileUrlStringYesThe url where the file resides that you want to import from. It should be a complete url e.g. http://www.thedomain.com/file.csv
ImportModeIntegerNo, will default to 0 (Update only) when not specified.Use this to specify the import mode.
0 = Update only
1 = Add and update
2 = Add only
IsCsvBooleanOnly if the file does not have an explicit ".csv" extensionUse this flag if your csv file is dynamically generated i.e. not an explicit file with an explicit extension
MailingListIDIntegerIf you are importing email addresses, this is required.The id of the mailing list you want to import to
MobileColIntegerAt least one of EmailCol or MobileCol is required.This is the 1 based column number where the mobile number resides in the file you are importing
MobileListIDIntegerIf you are importing mobile numbers, this is required.The id of the mailing list you want to import to
SheetnameStringOnly if you are importing an Excel file.The is the name of the sheet in your Excel file you want to import into the dataset
Returns
0|Error (Different descriptions for the error).
1|Dataset import successfull,DatasetImported=x,DatasetUpdated=x,MailingListImported=x,MobileListImported=x
2|Dataset import queued
Example
https://www.graphicmail.com/api.aspx?Username=user@mydomain.com&Password=123456&Function=post_import_dataset&EmailCol=2&MobileCol=3&Col1=1&Col3=4&DatasetID=123&MailingListID=456&ImportMode=1&MobileListID=789&FileUrl=http://www.thedomain.com/file.xls&IsCsv=false