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
using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using CRM.AgencyPlatform.API.Internal;

namespace CRM.AgencyPlatform.API.Internal
{
    public partial class ImportPreviewRequest
    {
        public virtual string Type { get; set; }
    }

    public partial class ImportResult
    {
        public virtual string ImportType { get; set; }
        public virtual string FileName { get; set; }
        public virtual bool DryRun { get; set; }
        public virtual int ImportBatchId { get; set; }
        public virtual int TotalRows { get; set; }
        public virtual int NewRows { get; set; }
        public virtual int UpdatedRows { get; set; }
        public virtual int SkippedRows { get; set; }
        public virtual int ErrorRows { get; set; }
        public virtual List<ImportRowResult> Rows { get; set; } = [];
        public virtual ResponseStatus ResponseStatus { get; set; }
    }

    public partial class ImportRowResult
    {
        public virtual int Line { get; set; }
        public virtual string Action { get; set; }
        public virtual string Field { get; set; }
        public virtual string Message { get; set; }
        public virtual string Summary { get; set; }
    }

}

C# ImportPreviewRequest DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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/json
Content-Type: application/json
Content-Length: length

{"Type":"String"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"ImportType":"String","FileName":"String","DryRun":false,"ImportBatchId":0,"TotalRows":0,"NewRows":0,"UpdatedRows":0,"SkippedRows":0,"ErrorRows":0,"Rows":[{"Line":0,"Action":"String","Field":"String","Message":"String","Summary":"String"}],"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}