| POST,OPTIONS | /v1/import/{Type}/commit |
|---|
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 ImportCommitRequest
{
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; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/import/{Type}/commit HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
Type: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
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
}
}
}