POST api/Import/SetImpFileFieldMapByFileID?fileID={fileID}

SetImpFileFormatByFileID

Request Information

URI Parameters

NameDescriptionTypeAdditional information
fileID

fileID

string

Required

Body Parameters

dicDBFileFields

Dictionary of string [key] and string [value]

Request Formats

application/json, text/json

Sample:
{
  "sample string 1": "sample string 2",
  "sample string 3": "sample string 4"
}

application/xml, text/xml

Sample:
<ArrayOfKeyValueOfstringstring xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
  <KeyValueOfstringstring>
    <Key>sample string 1</Key>
    <Value>sample string 2</Value>
  </KeyValueOfstringstring>
  <KeyValueOfstringstring>
    <Key>sample string 3</Key>
    <Value>sample string 4</Value>
  </KeyValueOfstringstring>
</ArrayOfKeyValueOfstringstring>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

SetImpFileFormatByFileID

API_Data_TxtImportFileInfo
NameDescriptionTypeAdditional information
Success

boolean

None.

Error

ErrorInfo

None.

Data

TxtImportFileInfo

None.

Response Formats

application/json, text/json

Sample:
{
  "Success": true,
  "Error": {
    "ErrorCode": 1,
    "ErrorMessage": "sample string 1"
  },
  "Data": {
    "UserID": 1,
    "FileName": "sample string 2",
    "FileID": "sample string 3",
    "txtPreView": "sample string 4",
    "tempFileName": "sample string 5",
    "tempFilePath": "sample string 6",
    "fileFields": [
      "sample string 1",
      "sample string 2"
    ],
    "dbFields": [
      "sample string 1",
      "sample string 2"
    ],
    "dbFileFieldMap": {
      "sample string 1": "sample string 2",
      "sample string 3": "sample string 4"
    },
    "FieldSplit": "sample string 7",
    "TxtSplit": "sample string 8",
    "bFirstRowIsName": 9,
    "bOverWriteIfSameLoginOrMail": 10,
    "bLogFailOrSkip": 11,
    "HeaderRowCount": 12
  }
}

application/xml, text/xml

Sample:
<API_Data_TxtImportFileInfo xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TechExcel.DTKService.Model.Common">
  <Data xmlns:d2p1="http://schemas.datacontract.org/2004/07/TechExcel.DTKService.Logic.Admin">
    <d2p1:FieldSplit>sample string 7</d2p1:FieldSplit>
    <d2p1:FileID>sample string 3</d2p1:FileID>
    <d2p1:FileName>sample string 2</d2p1:FileName>
    <d2p1:HeaderRowCount>12</d2p1:HeaderRowCount>
    <d2p1:TxtSplit>sample string 8</d2p1:TxtSplit>
    <d2p1:UserID>1</d2p1:UserID>
    <d2p1:bFirstRowIsName>9</d2p1:bFirstRowIsName>
    <d2p1:bLogFailOrSkip>11</d2p1:bLogFailOrSkip>
    <d2p1:bOverWriteIfSameLoginOrMail>10</d2p1:bOverWriteIfSameLoginOrMail>
    <d2p1:dbFields xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:string>sample string 1</d3p1:string>
      <d3p1:string>sample string 2</d3p1:string>
    </d2p1:dbFields>
    <d2p1:dbFileFieldMap xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>sample string 1</d3p1:Key>
        <d3p1:Value>sample string 2</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>sample string 3</d3p1:Key>
        <d3p1:Value>sample string 4</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
    </d2p1:dbFileFieldMap>
    <d2p1:fileFields xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:string>sample string 1</d3p1:string>
      <d3p1:string>sample string 2</d3p1:string>
    </d2p1:fileFields>
    <d2p1:tempFileName>sample string 5</d2p1:tempFileName>
    <d2p1:tempFilePath>sample string 6</d2p1:tempFilePath>
    <d2p1:txtPreView>sample string 4</d2p1:txtPreView>
  </Data>
  <Error>
    <ErrorCode>1</ErrorCode>
    <ErrorMessage>sample string 1</ErrorMessage>
  </Error>
  <Success>true</Success>
</API_Data_TxtImportFileInfo>