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
import java.math.*
import java.util.*
import java.io.InputStream
import net.servicestack.client.*


/**
* Import entity data into DigiOffice (v1)
*/
@Api(Description="Import entity data into DigiOffice (v1)")
open class ImportData
{
    /**
    * Entityname in which the data will be imported
    */
    @ApiMember(Description="Entityname in which the data will be imported", IsRequired=true)
    open var EntityType:String? = null

    /**
    * Reports errors with a reference to this field (for example ID)
    */
    @ApiMember(Description="Reports errors with a reference to this field (for example ID)")
    open var ErrorField:String? = null

    /**
    * Should import continue on errors? (Default true)
    */
    @ApiMember(Description="Should import continue on errors? (Default true)")
    open var ContinueOnError:Boolean? = null

    /**
    * Rows to be imported
    */
    @ApiMember(Description="Rows to be imported", IsRequired=true)
    open var Rows:ArrayList<Row> = ArrayList<Row>()

    /**
    * Additional values to be imported on every row
    */
    @ApiMember(Description="Additional values to be imported on every row")
    open var FixedValues:ArrayList<FixedValue>? = null
}

open class Row
{
    open var Fields:ArrayList<ImportField>? = null
}

open class ImportField
{
    open var Name:String? = null
    open var Value:String? = null
}

open class FixedValue
{
    open var Name:String? = null
    open var Value:String? = null
}

open class ImportResult
{
    open var TotalRows:Int? = null
    open var TotalAdded:Int? = null
    open var TotalUpdated:Int? = null
    open var SuccesfullRows:Int? = null
    open var ErrorRows:Int? = null
    open var Errors:ArrayList<String>? = null
}

Kotlin ImportData DTOs

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

HTTP + OTHER

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

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