Trendsic Platform Service

<back to all web services

ImportPreviewRequest

Requires Authentication
The following routes are available for this service:
POST,OPTIONS/v1/import/{Type}/preview
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;

public class dtos
{

    public static class ImportPreviewRequest
    {
        public String Type = null;
        
        public String getType() { return Type; }
        public ImportPreviewRequest setType(String value) { this.Type = value; return this; }
    }

    public static class ImportResult
    {
        public String ImportType = null;
        public String FileName = null;
        public Boolean DryRun = null;
        public Integer ImportBatchId = null;
        public Integer TotalRows = null;
        public Integer NewRows = null;
        public Integer UpdatedRows = null;
        public Integer SkippedRows = null;
        public Integer ErrorRows = null;
        public ArrayList<ImportRowResult> Rows = new ArrayList<ImportRowResult>();
        public ResponseStatus ResponseStatus = null;
        
        public String getImportType() { return ImportType; }
        public ImportResult setImportType(String value) { this.ImportType = value; return this; }
        public String getFileName() { return FileName; }
        public ImportResult setFileName(String value) { this.FileName = value; return this; }
        public Boolean isDryRun() { return DryRun; }
        public ImportResult setDryRun(Boolean value) { this.DryRun = value; return this; }
        public Integer getImportBatchId() { return ImportBatchId; }
        public ImportResult setImportBatchId(Integer value) { this.ImportBatchId = value; return this; }
        public Integer getTotalRows() { return TotalRows; }
        public ImportResult setTotalRows(Integer value) { this.TotalRows = value; return this; }
        public Integer getNewRows() { return NewRows; }
        public ImportResult setNewRows(Integer value) { this.NewRows = value; return this; }
        public Integer getUpdatedRows() { return UpdatedRows; }
        public ImportResult setUpdatedRows(Integer value) { this.UpdatedRows = value; return this; }
        public Integer getSkippedRows() { return SkippedRows; }
        public ImportResult setSkippedRows(Integer value) { this.SkippedRows = value; return this; }
        public Integer getErrorRows() { return ErrorRows; }
        public ImportResult setErrorRows(Integer value) { this.ErrorRows = value; return this; }
        public ArrayList<ImportRowResult> getRows() { return Rows; }
        public ImportResult setRows(ArrayList<ImportRowResult> value) { this.Rows = value; return this; }
        public ResponseStatus getResponseStatus() { return ResponseStatus; }
        public ImportResult setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; }
    }

    public static class ImportRowResult
    {
        public Integer Line = null;
        public String Action = null;
        public String Field = null;
        public String Message = null;
        public String Summary = null;
        
        public Integer getLine() { return Line; }
        public ImportRowResult setLine(Integer value) { this.Line = value; return this; }
        public String getAction() { return Action; }
        public ImportRowResult setAction(String value) { this.Action = value; return this; }
        public String getField() { return Field; }
        public ImportRowResult setField(String value) { this.Field = value; return this; }
        public String getMessage() { return Message; }
        public ImportRowResult setMessage(String value) { this.Message = value; return this; }
        public String getSummary() { return Summary; }
        public ImportRowResult setSummary(String value) { this.Summary = value; return this; }
    }

}

Java ImportPreviewRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + XML

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /v1/import/{Type}/preview HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<ImportPreviewRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <Type>String</Type>
</ImportPreviewRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<ImportResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <DryRun>false</DryRun>
  <ErrorRows>0</ErrorRows>
  <FileName>String</FileName>
  <ImportBatchId>0</ImportBatchId>
  <ImportType>String</ImportType>
  <NewRows>0</NewRows>
  <ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
    <d2p1:ErrorCode>String</d2p1:ErrorCode>
    <d2p1:Message>String</d2p1:Message>
    <d2p1:StackTrace>String</d2p1:StackTrace>
    <d2p1:Errors>
      <d2p1:ResponseError>
        <d2p1:ErrorCode>String</d2p1:ErrorCode>
        <d2p1:FieldName>String</d2p1:FieldName>
        <d2p1:Message>String</d2p1:Message>
        <d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:KeyValueOfstringstring>
            <d5p1:Key>String</d5p1:Key>
            <d5p1:Value>String</d5p1:Value>
          </d5p1:KeyValueOfstringstring>
        </d2p1:Meta>
      </d2p1:ResponseError>
    </d2p1:Errors>
    <d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>String</d3p1:Key>
        <d3p1:Value>String</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
    </d2p1:Meta>
  </ResponseStatus>
  <Rows>
    <ImportRowResult>
      <Action>String</Action>
      <Field>String</Field>
      <Line>0</Line>
      <Message>String</Message>
      <Summary>String</Summary>
    </ImportRowResult>
  </Rows>
  <SkippedRows>0</SkippedRows>
  <TotalRows>0</TotalRows>
  <UpdatedRows>0</UpdatedRows>
</ImportResult>