DigiOffice API Services Services

<back to all web services

ImportData

Import entity data into DigiOffice (v1)

Requires Authentication
The following routes are available for this service:
PUT/api/importdata
Imports System
Imports System.IO
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports IDB.API.General

Namespace Global

    Namespace IDB.API.General

        '''<Summary>
        '''Import entity data into DigiOffice (v1)
        '''</Summary>
        <Api(Description:="Import entity data into DigiOffice (v1)")>
        Public Partial Class ImportData
            '''<Summary>
            '''Entityname in which the data will be imported
            '''</Summary>
            <ApiMember(Description:="Entityname in which the data will be imported", IsRequired:=true)>
            Public Overridable Property EntityType As String

            '''<Summary>
            '''Reports errors with a reference to this field (for example ID)
            '''</Summary>
            <ApiMember(Description:="Reports errors with a reference to this field (for example ID)")>
            Public Overridable Property ErrorField As String

            '''<Summary>
            '''Should import continue on errors? (Default true)
            '''</Summary>
            <ApiMember(Description:="Should import continue on errors? (Default true)")>
            Public Overridable Property ContinueOnError As Boolean

            '''<Summary>
            '''Rows to be imported
            '''</Summary>
            <ApiMember(Description:="Rows to be imported", IsRequired:=true)>
            Public Overridable Property Rows As List(Of Row) = New List(Of Row)

            '''<Summary>
            '''Additional values to be imported on every row
            '''</Summary>
            <ApiMember(Description:="Additional values to be imported on every row")>
            Public Overridable Property FixedValues As List(Of FixedValue)

            Public Partial Class Row
                Public Overridable Property Fields As List(Of ImportField)
            End Class

            Public Partial Class ImportField
                Public Overridable Property Name As String
                Public Overridable Property Value As String
            End Class

            Public Partial Class FixedValue
                Public Overridable Property Name As String
                Public Overridable Property Value As String
            End Class
        End Class

        Public Partial Class ImportResult
            Public Overridable Property TotalRows As Integer
            Public Overridable Property TotalAdded As Integer
            Public Overridable Property TotalUpdated As Integer
            Public Overridable Property SuccesfullRows As Integer
            Public Overridable Property ErrorRows As Integer
            Public Overridable Property Errors As List(Of String)
        End Class
    End Namespace
End Namespace

VB.NET ImportData 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.

PUT /api/importdata HTTP/1.1 
Host: test-do-services.klokgroep.nl 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"EntityType":"String","ErrorField":"String","ContinueOnError":false,"Rows":[{"Fields":[{"Name":"String","Value":"String"}]}],"FixedValues":[{"Name":"String","Value":"String"}]}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"TotalRows":0,"TotalAdded":0,"TotalUpdated":0,"SuccesfullRows":0,"ErrorRows":0,"Errors":["String"]}