DigiOffice Gateway Web Services

<back to all web services

AddDocumentsForBackgroundRegistration

Register documents queueud for registration in background

Requires Authentication
The following routes are available for this service:
POST/api/documentuploads/registerdocuments
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';

class RegisteredDocumentUpload implements IConvertible
{
    int? DocumentUploadID;
    bool? IsSuccess;
    String? Message;

    RegisteredDocumentUpload({this.DocumentUploadID,this.IsSuccess,this.Message});
    RegisteredDocumentUpload.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        DocumentUploadID = json['DocumentUploadID'];
        IsSuccess = json['IsSuccess'];
        Message = json['Message'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'DocumentUploadID': DocumentUploadID,
        'IsSuccess': IsSuccess,
        'Message': Message
    };

    getTypeName() => "RegisteredDocumentUpload";
    TypeContext? context = _ctx;
}

class AddDocumentsForBackgroundRegistrationResponse implements IConvertible
{
    List<RegisteredDocumentUpload>? RegisteredDocumentUploads;

    AddDocumentsForBackgroundRegistrationResponse({this.RegisteredDocumentUploads});
    AddDocumentsForBackgroundRegistrationResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        RegisteredDocumentUploads = JsonConverters.fromJson(json['RegisteredDocumentUploads'],'List<RegisteredDocumentUpload>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'RegisteredDocumentUploads': JsonConverters.toJson(RegisteredDocumentUploads,'List<RegisteredDocumentUpload>',context!)
    };

    getTypeName() => "AddDocumentsForBackgroundRegistrationResponse";
    TypeContext? context = _ctx;
}

class RegistrationValue implements IConvertible
{
    String? Key;
    String? Value;
    String? ShadowValue;

    RegistrationValue({this.Key,this.Value,this.ShadowValue});
    RegistrationValue.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Key = json['Key'];
        Value = json['Value'];
        ShadowValue = json['ShadowValue'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Key': Key,
        'Value': Value,
        'ShadowValue': ShadowValue
    };

    getTypeName() => "RegistrationValue";
    TypeContext? context = _ctx;
}

class Transition implements IConvertible
{
    String? ID;
    String? Reason;
    DateTime? DelayDate;
    String? DelayReason;
    List<int>? UserIDs;
    List<int>? GroupIDs;

    Transition({this.ID,this.Reason,this.DelayDate,this.DelayReason,this.UserIDs,this.GroupIDs});
    Transition.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ID = json['ID'];
        Reason = json['Reason'];
        DelayDate = JsonConverters.fromJson(json['DelayDate'],'DateTime',context!);
        DelayReason = json['DelayReason'];
        UserIDs = JsonConverters.fromJson(json['UserIDs'],'List<int>',context!);
        GroupIDs = JsonConverters.fromJson(json['GroupIDs'],'List<int>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ID': ID,
        'Reason': Reason,
        'DelayDate': JsonConverters.toJson(DelayDate,'DateTime',context!),
        'DelayReason': DelayReason,
        'UserIDs': JsonConverters.toJson(UserIDs,'List<int>',context!),
        'GroupIDs': JsonConverters.toJson(GroupIDs,'List<int>',context!)
    };

    getTypeName() => "Transition";
    TypeContext? context = _ctx;
}

class Process implements IConvertible
{
    int? ID;
    String? Title;
    String? Description;
    String? Note;
    String? Coordinator;
    bool? Urgent;
    List<Transition>? Transitions;

    Process({this.ID,this.Title,this.Description,this.Note,this.Coordinator,this.Urgent,this.Transitions});
    Process.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ID = json['ID'];
        Title = json['Title'];
        Description = json['Description'];
        Note = json['Note'];
        Coordinator = json['Coordinator'];
        Urgent = json['Urgent'];
        Transitions = JsonConverters.fromJson(json['Transitions'],'List<Transition>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ID': ID,
        'Title': Title,
        'Description': Description,
        'Note': Note,
        'Coordinator': Coordinator,
        'Urgent': Urgent,
        'Transitions': JsonConverters.toJson(Transitions,'List<Transition>',context!)
    };

    getTypeName() => "Process";
    TypeContext? context = _ctx;
}

class RegisterDocument implements IConvertible
{
    String? RegistrationProfileID;
    List<RegistrationValue>? Values;
    List<Process>? Processes;
    String? DocumentUploadId;
    String? DocumentId;
    String? StandardDocumentID;
    bool? HasUnsavedChangesInDocument;
    bool? IsOpenedFromNonDMSLocation;

    RegisterDocument({this.RegistrationProfileID,this.Values,this.Processes,this.DocumentUploadId,this.DocumentId,this.StandardDocumentID,this.HasUnsavedChangesInDocument,this.IsOpenedFromNonDMSLocation});
    RegisterDocument.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        RegistrationProfileID = json['RegistrationProfileID'];
        Values = JsonConverters.fromJson(json['Values'],'List<RegistrationValue>',context!);
        Processes = JsonConverters.fromJson(json['Processes'],'List<Process>',context!);
        DocumentUploadId = json['DocumentUploadId'];
        DocumentId = json['DocumentId'];
        StandardDocumentID = json['StandardDocumentID'];
        HasUnsavedChangesInDocument = json['HasUnsavedChangesInDocument'];
        IsOpenedFromNonDMSLocation = json['IsOpenedFromNonDMSLocation'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'RegistrationProfileID': RegistrationProfileID,
        'Values': JsonConverters.toJson(Values,'List<RegistrationValue>',context!),
        'Processes': JsonConverters.toJson(Processes,'List<Process>',context!),
        'DocumentUploadId': DocumentUploadId,
        'DocumentId': DocumentId,
        'StandardDocumentID': StandardDocumentID,
        'HasUnsavedChangesInDocument': HasUnsavedChangesInDocument,
        'IsOpenedFromNonDMSLocation': IsOpenedFromNonDMSLocation
    };

    getTypeName() => "RegisterDocument";
    TypeContext? context = _ctx;
}

/**
* Register documents queueud for registration in background
*/
// @Api(Description="Register documents queueud for registration in background")
// @ApiResponse(Description="All queued documents are linked to a systemtask for background processing", StatusCode=200)
class AddDocumentsForBackgroundRegistration implements IConvertible
{
    /**
    * List of queued documents to register in background
    */
    // @ApiMember(Description="List of queued documents to register in background", IsRequired=true)
    List<RegisterDocument>? Documents;

    AddDocumentsForBackgroundRegistration({this.Documents});
    AddDocumentsForBackgroundRegistration.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Documents = JsonConverters.fromJson(json['Documents'],'List<RegisterDocument>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Documents': JsonConverters.toJson(Documents,'List<RegisterDocument>',context!)
    };

    getTypeName() => "AddDocumentsForBackgroundRegistration";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'digiofficeapigateway.deltares.nl', types: <String, TypeInfo> {
    'RegisteredDocumentUpload': TypeInfo(TypeOf.Class, create:() => RegisteredDocumentUpload()),
    'AddDocumentsForBackgroundRegistrationResponse': TypeInfo(TypeOf.Class, create:() => AddDocumentsForBackgroundRegistrationResponse()),
    'List<RegisteredDocumentUpload>': TypeInfo(TypeOf.Class, create:() => <RegisteredDocumentUpload>[]),
    'RegistrationValue': TypeInfo(TypeOf.Class, create:() => RegistrationValue()),
    'Transition': TypeInfo(TypeOf.Class, create:() => Transition()),
    'Process': TypeInfo(TypeOf.Class, create:() => Process()),
    'List<Transition>': TypeInfo(TypeOf.Class, create:() => <Transition>[]),
    'RegisterDocument': TypeInfo(TypeOf.Class, create:() => RegisterDocument()),
    'List<RegistrationValue>': TypeInfo(TypeOf.Class, create:() => <RegistrationValue>[]),
    'List<Process>': TypeInfo(TypeOf.Class, create:() => <Process>[]),
    'AddDocumentsForBackgroundRegistration': TypeInfo(TypeOf.Class, create:() => AddDocumentsForBackgroundRegistration()),
    'List<RegisterDocument>': TypeInfo(TypeOf.Class, create:() => <RegisterDocument>[]),
});

Dart AddDocumentsForBackgroundRegistration DTOs

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

HTTP + XML

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /api/documentuploads/registerdocuments HTTP/1.1 
Host: digiofficeapigateway.deltares.nl 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<AddDocumentsForBackgroundRegistration xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/IDB.API.DTO.Document.Operations">
  <Documents>
    <RegisterDocument>
      <DocumentId>00000000-0000-0000-0000-000000000000</DocumentId>
      <DocumentUploadId>String</DocumentUploadId>
      <HasUnsavedChangesInDocument>false</HasUnsavedChangesInDocument>
      <IsOpenedFromNonDMSLocation>false</IsOpenedFromNonDMSLocation>
      <Processes xmlns:d4p1="http://schemas.datacontract.org/2004/07/IDB.API.DTO.Workflow">
        <d4p1:Process>
          <d4p1:Coordinator>String</d4p1:Coordinator>
          <d4p1:Description>String</d4p1:Description>
          <d4p1:ID>0</d4p1:ID>
          <d4p1:Note>String</d4p1:Note>
          <d4p1:Title>String</d4p1:Title>
          <d4p1:Transitions>
            <d4p1:Transition>
              <d4p1:DelayDate>0001-01-01T00:00:00</d4p1:DelayDate>
              <d4p1:DelayReason>String</d4p1:DelayReason>
              <d4p1:GroupIDs xmlns:d8p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
                <d8p1:int>0</d8p1:int>
              </d4p1:GroupIDs>
              <d4p1:ID>00000000-0000-0000-0000-000000000000</d4p1:ID>
              <d4p1:Reason>String</d4p1:Reason>
              <d4p1:UserIDs xmlns:d8p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
                <d8p1:int>0</d8p1:int>
              </d4p1:UserIDs>
            </d4p1:Transition>
          </d4p1:Transitions>
          <d4p1:Urgent>false</d4p1:Urgent>
        </d4p1:Process>
      </Processes>
      <RegistrationProfileID>00000000-0000-0000-0000-000000000000</RegistrationProfileID>
      <StandardDocumentID>00000000-0000-0000-0000-000000000000</StandardDocumentID>
      <Values xmlns:d4p1="http://schemas.datacontract.org/2004/07/IDB.API.DTO.Registrationprofile">
        <d4p1:RegistrationValue>
          <d4p1:Key>00000000-0000-0000-0000-000000000000</d4p1:Key>
          <d4p1:ShadowValue>String</d4p1:ShadowValue>
          <d4p1:Value>String</d4p1:Value>
        </d4p1:RegistrationValue>
      </Values>
    </RegisterDocument>
  </Documents>
</AddDocumentsForBackgroundRegistration>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<AddDocumentsForBackgroundRegistrationResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/IDB.API.DTO.Document.Operations">
  <RegisteredDocumentUploads>
    <RegisteredDocumentUpload>
      <DocumentUploadID>0</DocumentUploadID>
      <IsSuccess>false</IsSuccess>
      <Message>String</Message>
    </RegisteredDocumentUpload>
  </RegisteredDocumentUploads>
</AddDocumentsForBackgroundRegistrationResponse>