Send file metadata

Prev Next
Post
/v1/EntityImport/

Sends the input file metadata and invokes the import service.

Security
API Key: Authorization
Header parameter nameAuthorization

Add an Authorization header to authenticate requests originating outside of Zilliant's internal network. Set the header to Authorization: OAuth <tokenResponseBase64>.

<tokenResponseBase64> is the Base64-encoded entire JSON response body returned by the Salesforce OAuth token endpoint. Encode the full JSON payload, not only the access_token field.

For details, read Request an access token.

Header parameters
X-Forwarded-Host
string

OAuth host for your environment. Use it for all requests that originate outside Zilliant’s internal network. For details, read X-Forwarded-Host header in Introduction.

Body parameters
Import definition example

In this example, we import a file into the My_Data entity. The definition object includes the data formats used in the input file and instructs the service to use the REPLACE import mode. The fields array includes mapping details of the input file columns to the entity fields.

{
  "entitySystemName": "My_Data",
  "definition": {
    "importMode": "REPLACE",
    "locale": "en-US",
    "fieldDelimiter": ",",
    "dateFormat": "dd-MM-yyyy",
    "dateTimeFormat": "dd-MM-yyyy HH:mm:ss",
    "decimalSeparator": ".",
    "groupingSeparator": ",",
    "currencySymbol": "$",
    "percentSymbol": "%",
    "ignoreSurroundingSpaces": true,
    "fields": [
      {
        "systemName": "Product_Id",
        "csvColumnName": "ProductID"
      },
      {
        "systemName": "Price",
        "csvColumnName": "Price"
      }
    ]
  }
}
Expand All
object
entitySystemName
string Required

Name of the entity to import your file into. Contact your Zilliant representative to get your entity name.

ExampleMy_Data
definition
object

File metadata and mapping definition.

importMode
string

Mode of adding data. Supported values:

  • UPSERT—Insert new data into the entity and update existing records with the new information.
  • INSERT—Add new data to the entity without updating existing records.
  • REPLACE—Substitute existing records with new data.
Valid values[ "UPSERT", "INSERT", "REPLACE" ]
Default"INSERT"
ExampleREPLACE
locale
string

Locale of the input file. For details on supported values, read JDK 11 Supported Locales.

Default"en-US"
Exampleen-US
fieldDelimiter
string

Field delimiter used in the input file. All commonly used delimiters are supported, such as ,, |, \t (the only supported value for tab), ~, ;, and others.

Default","
Example,
dateFormat
string

Date format used in the input file. The format must follow the rules defined in the Java SimpleDateFormat class documentation.

Note: Use MM for months and mm for minutes.

Default"yyyy-MM-dd"
Exampledd-MM-yyyy
dateTimeFormat
string

Date-time format used in the input file. The format must follow the rules defined in the Java SimpleDateFormat class documentation.

Note: Use MM for months and mm for minutes.

Default"yyyy-MM-dd'T'HH:mm:ss.SSS"
Exampledd-MM-yyyy HH:mm:ss
decimalSeparator
string

Decimal separator used in the input file.

Valid values[ ".", "," ]
Default"."
Example.
groupingSeparator
string

Thousands separator used in the input file.

Valid values[ ".", "," ]
Default","
Example,
currencySymbol
string

Currency symbol used in the input file. You can enter any currency symbol supported by Oracle's JDK 11.

Default"$"
Example$
percentSymbol
string

Percent symbol used in the input file.

Default"%"
Example%
ignoreSurroundingSpaces
boolean

Define whether to ignore white spaces when importing data. Supported values:

  • true—Ignore white spaces except for values in quotation marks.
  • false—Preserve leading and trailing spaces.

Note: Regardless of the ignoreSurroundingSpaces parameter value, SQL Server always ignores trailing spaces when checking for unique values in columns defined as business keys. This means that you can't insert two rows with business key values differing only by trailing spaces, such as "myvalue" and "myvalue ".
Valid values[ true, false ]
Defaultfalse
Exampletrue
fields
Array of object

Field mapping from file columns to entity fields.

object
systemName
string

System name of the target entity field. Contact your Zilliant representative to get your entity field names.

ExampleProduct_Id
csvColumnName
string

Column name in the uploaded file.

ExampleProductID
Responses
201

Created. Returns a JSON body with the mappingId.

400

Bad request.

401

Unauthorized. Provide a valid authentication token.

404

Not found.

422

Missing entity system name.