Trendsic Platform Service

<back to all web services

ImportCommitRequest

Requires Authentication
The following routes are available for this service:
POST,OPTIONS/v1/import/{Type}/commit
Imports System
Imports System.IO
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports CRM.AgencyPlatform.API.Internal

Namespace Global

    Namespace CRM.AgencyPlatform.API.Internal

        Public Partial Class ImportCommitRequest
            Public Overridable Property Type As String
        End Class

        Public Partial Class ImportResult
            Public Overridable Property ImportType As String
            Public Overridable Property FileName As String
            Public Overridable Property DryRun As Boolean
            Public Overridable Property ImportBatchId As Integer
            Public Overridable Property TotalRows As Integer
            Public Overridable Property NewRows As Integer
            Public Overridable Property UpdatedRows As Integer
            Public Overridable Property SkippedRows As Integer
            Public Overridable Property ErrorRows As Integer
            Public Overridable Property Rows As List(Of ImportRowResult) = New List(Of ImportRowResult)
            Public Overridable Property ResponseStatus As ResponseStatus
        End Class

        Public Partial Class ImportRowResult
            Public Overridable Property Line As Integer
            Public Overridable Property Action As String
            Public Overridable Property Field As String
            Public Overridable Property Message As String
            Public Overridable Property Summary As String
        End Class
    End Namespace
End Namespace

VB.NET ImportCommitRequest DTOs

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

HTTP + CSV

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/csv
Content-Type: text/csv
Content-Length: length

{"Type":"String"}
HTTP/1.1 200 OK
Content-Type: text/csv
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"}}}