Create an Import Definition
This page contains information about creating an import definition.
You can create an import definition to move information from your system or development environment to Marketing Cloud
This example demonstrates creating an ImportDefinition object. Use the example as an example to create your own API call. You must create the FileTransferActivity in Marketing Cloud. Supply only the parameters to change when updating an ImportDefinition object.
Use the DataFormattingLocale property to specify how dates are formatted in import data. The Marketing Cloud application uses this information to ensure the data is interpreted correctly when it is being loaded. For example, you can use DateFormattingLocale to determine whether '01-09-2010' means January 9th, 2010 or September 1st, 2010. If no LocaleCode is supplied, the call defaults to "en-US".
This sample code shows how to set the value for DateFormattingLocale for Create and Update methods:
This sample code creates an import definition and associates it with a specific data extension.
The envelope below infers mapping from column headings:
The envelope below maps fields via ordinals:
The API returns a response like this for inferred field mappings:
After starting the import definition, the system returns "TaskResultID," capture the "TaskResultID" and check against the system to verify if import is completed or not.