DigiOffice Gateway Web Services

<back to all web services

GetDocumentByNumber

Get the details of a document by reference number

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

class Document implements ICustomProperties, IConvertible
{
    String? ID;
    String? RootDocumentID;
    String? RegistrationprofileID;
    String? Title;
    String? FullTitle;
    String? Number;
    String? Version;
    String? ExternalNumber;
    String? ExternalVersion;
    String? InternalNumber;
    String? InternalInvoiceNumber;
    int? PersonID;
    int? RelationID;
    String? RelationTitle;
    int? ProjectID;
    String? ProjectTitle;
    String? Extension;
    DateTime? Date;
    int? CommentsCount;
    bool? HasComments;
    bool? HasPreview;
    String? ExtraField;
    bool? IsFavorite;
    String? DocumentcategoryText;
    int? FileSize;
    DateTime? FileDate;
    String? Hash;
    String? HashType;
    String? FileUrl;
    String? StandardDocumentUrl;
    bool? IsCorporateIdentity;
    String? UserTitle;
    bool? IsFrozen;
    int? InternalCompanyID;
    String? DirectUrl;
    bool? AllowDigitalSigningOnlyOnPrimaryVersions;
    bool? IsPrimaryVersion;
    String? FileExtension;
    Map<String,dynamic?>? CustomProperties;

    Document({this.ID,this.RootDocumentID,this.RegistrationprofileID,this.Title,this.FullTitle,this.Number,this.Version,this.ExternalNumber,this.ExternalVersion,this.InternalNumber,this.InternalInvoiceNumber,this.PersonID,this.RelationID,this.RelationTitle,this.ProjectID,this.ProjectTitle,this.Extension,this.Date,this.CommentsCount,this.HasComments,this.HasPreview,this.ExtraField,this.IsFavorite,this.DocumentcategoryText,this.FileSize,this.FileDate,this.Hash,this.HashType,this.FileUrl,this.StandardDocumentUrl,this.IsCorporateIdentity,this.UserTitle,this.IsFrozen,this.InternalCompanyID,this.DirectUrl,this.AllowDigitalSigningOnlyOnPrimaryVersions,this.IsPrimaryVersion,this.FileExtension,this.CustomProperties});
    Document.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ID = json['ID'];
        RootDocumentID = json['RootDocumentID'];
        RegistrationprofileID = json['RegistrationprofileID'];
        Title = json['Title'];
        FullTitle = json['FullTitle'];
        Number = json['Number'];
        Version = json['Version'];
        ExternalNumber = json['ExternalNumber'];
        ExternalVersion = json['ExternalVersion'];
        InternalNumber = json['InternalNumber'];
        InternalInvoiceNumber = json['InternalInvoiceNumber'];
        PersonID = json['PersonID'];
        RelationID = json['RelationID'];
        RelationTitle = json['RelationTitle'];
        ProjectID = json['ProjectID'];
        ProjectTitle = json['ProjectTitle'];
        Extension = json['Extension'];
        Date = JsonConverters.fromJson(json['Date'],'DateTime',context!);
        CommentsCount = json['CommentsCount'];
        HasComments = json['HasComments'];
        HasPreview = json['HasPreview'];
        ExtraField = json['ExtraField'];
        IsFavorite = json['IsFavorite'];
        DocumentcategoryText = json['DocumentcategoryText'];
        FileSize = json['FileSize'];
        FileDate = JsonConverters.fromJson(json['FileDate'],'DateTime',context!);
        Hash = json['Hash'];
        HashType = json['HashType'];
        FileUrl = json['FileUrl'];
        StandardDocumentUrl = json['StandardDocumentUrl'];
        IsCorporateIdentity = json['IsCorporateIdentity'];
        UserTitle = json['UserTitle'];
        IsFrozen = json['IsFrozen'];
        InternalCompanyID = json['InternalCompanyID'];
        DirectUrl = json['DirectUrl'];
        AllowDigitalSigningOnlyOnPrimaryVersions = json['AllowDigitalSigningOnlyOnPrimaryVersions'];
        IsPrimaryVersion = json['IsPrimaryVersion'];
        FileExtension = json['FileExtension'];
        CustomProperties = JsonConverters.fromJson(json['CustomProperties'],'Map<String,dynamic?>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ID': ID,
        'RootDocumentID': RootDocumentID,
        'RegistrationprofileID': RegistrationprofileID,
        'Title': Title,
        'FullTitle': FullTitle,
        'Number': Number,
        'Version': Version,
        'ExternalNumber': ExternalNumber,
        'ExternalVersion': ExternalVersion,
        'InternalNumber': InternalNumber,
        'InternalInvoiceNumber': InternalInvoiceNumber,
        'PersonID': PersonID,
        'RelationID': RelationID,
        'RelationTitle': RelationTitle,
        'ProjectID': ProjectID,
        'ProjectTitle': ProjectTitle,
        'Extension': Extension,
        'Date': JsonConverters.toJson(Date,'DateTime',context!),
        'CommentsCount': CommentsCount,
        'HasComments': HasComments,
        'HasPreview': HasPreview,
        'ExtraField': ExtraField,
        'IsFavorite': IsFavorite,
        'DocumentcategoryText': DocumentcategoryText,
        'FileSize': FileSize,
        'FileDate': JsonConverters.toJson(FileDate,'DateTime',context!),
        'Hash': Hash,
        'HashType': HashType,
        'FileUrl': FileUrl,
        'StandardDocumentUrl': StandardDocumentUrl,
        'IsCorporateIdentity': IsCorporateIdentity,
        'UserTitle': UserTitle,
        'IsFrozen': IsFrozen,
        'InternalCompanyID': InternalCompanyID,
        'DirectUrl': DirectUrl,
        'AllowDigitalSigningOnlyOnPrimaryVersions': AllowDigitalSigningOnlyOnPrimaryVersions,
        'IsPrimaryVersion': IsPrimaryVersion,
        'FileExtension': FileExtension,
        'CustomProperties': JsonConverters.toJson(CustomProperties,'Map<String,dynamic?>',context!)
    };

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

/**
* Get the details of a document by reference number
*/
// @Api(Description="Get the details of a document by reference number")
class GetDocumentByNumber implements IConvertible
{
    String? Number;
    String? Version;

    GetDocumentByNumber({this.Number,this.Version});
    GetDocumentByNumber.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Number = json['Number'];
        Version = json['Version'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Number': Number,
        'Version': Version
    };

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

TypeContext _ctx = TypeContext(library: 'digiofficeapigateway.deltares.nl', types: <String, TypeInfo> {
    'Document': TypeInfo(TypeOf.Class, create:() => Document()),
    'Map<String,dynamic?>': TypeInfo(TypeOf.Class, create:() => Map<String,dynamic?>()),
    'GetDocumentByNumber': TypeInfo(TypeOf.Class, create:() => GetDocumentByNumber()),
});

Dart GetDocumentByNumber 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.

POST /api/documents/number HTTP/1.1 
Host: digiofficeapigateway.deltares.nl 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"Number":"String","Version":"String"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"ID":"00000000-0000-0000-0000-000000000000","RootDocumentID":"00000000-0000-0000-0000-000000000000","RegistrationprofileID":"00000000-0000-0000-0000-000000000000","Title":"String","FullTitle":"String","Number":"String","Version":"String","ExternalNumber":"String","ExternalVersion":"String","InternalNumber":"String","InternalInvoiceNumber":"String","PersonID":0,"RelationID":0,"RelationTitle":"String","ProjectID":0,"ProjectTitle":"String","Extension":"String","Date":"0001-01-01T00:00:00.0000000","CommentsCount":0,"HasComments":false,"HasPreview":false,"ExtraField":"String","IsFavorite":false,"DocumentcategoryText":"String","FileSize":0,"FileDate":"0001-01-01T00:00:00.0000000","Hash":"String","HashType":"String","FileUrl":"String","StandardDocumentUrl":"String","IsCorporateIdentity":false,"UserTitle":"String","IsFrozen":false,"InternalCompanyID":0,"DirectUrl":"String","AllowDigitalSigningOnlyOnPrimaryVersions":false,"IsPrimaryVersion":false,"FileExtension":"String","CustomProperties":{"String":{}}}