DigiOffice Gateway Web Services

<back to all web services

AddUploadFile

Add a uploadfile with metadata.

Requires Authentication
The following routes are available for this service:
POST/api/DMS/AddUploadFile
"use strict";
export class MetaDataField {
    /** @param {{ID?:string,DocumentVeldID?:string,Name?:string,Label?:string,Datatype?:string,PrintLabel?:string,Entity?:string,PrintValue?:string,RegistrationValue?:string,SPSiteColumnName?:string,ShadowName?:string,ShadowDatatype?:string,ShadowSPSiteColumnName?:string,ShadowSPSiteColumnRegistrationValue?:string,ShadowRegistrationValue?:string,IsKeyField?:boolean,KopierenBijNieuweVersie?:boolean}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {?string} */
    ID;
    /** @type {?string} */
    DocumentVeldID;
    /** @type {string} */
    Name;
    /** @type {string} */
    Label;
    /** @type {string} */
    Datatype;
    /** @type {string} */
    PrintLabel;
    /** @type {string} */
    Entity;
    /** @type {string} */
    PrintValue;
    /** @type {string} */
    RegistrationValue;
    /** @type {string} */
    SPSiteColumnName;
    /** @type {string} */
    ShadowName;
    /** @type {string} */
    ShadowDatatype;
    /** @type {string} */
    ShadowSPSiteColumnName;
    /** @type {string} */
    ShadowSPSiteColumnRegistrationValue;
    /** @type {string} */
    ShadowRegistrationValue;
    /** @type {boolean} */
    IsKeyField;
    /** @type {boolean} */
    KopierenBijNieuweVersie;
}
export class AddUploadFile {
    /** @param {{RegistrationProfileID?:string,NavigationPath?:string,FileName?:string,FileDate?:string,FileContent?:string,Description?:string,DocumentUpload?:boolean,Source?:string,MetaDataFields?:MetaDataField[],DocumentID?:string,MainDocumentID?:string,SubDocumentIDs?:string[]}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {string}
     * @description Registration profile ID */
    RegistrationProfileID;
    /**
     * @type {string}
     * @description Registration navigation path */
    NavigationPath;
    /**
     * @type {string}
     * @description File name */
    FileName;
    /**
     * @type {string}
     * @description File date */
    FileDate;
    /**
     * @type {string}
     * @description File content */
    FileContent = [];
    /**
     * @type {string}
     * @description File description */
    Description;
    /**
     * @type {boolean}
     * @description Keep document in uploads (false; register immediately) */
    DocumentUpload;
    /**
     * @type {string}
     * @description Source of the file */
    Source;
    /**
     * @type {MetaDataField[]}
     * @description MetaDataFields */
    MetaDataFields;
    /**
     * @type {?string}
     * @description Document ID */
    DocumentID;
    /**
     * @type {?string}
     * @description Main Document ID */
    MainDocumentID;
    /**
     * @type {string[]}
     * @description Sub Document IDs */
    SubDocumentIDs;
}
/** @typedef {number} */
export var MessageType;
(function (MessageType) {
    MessageType[MessageType["Information"] = 1] = "Information"
    MessageType[MessageType["Warning"] = 2] = "Warning"
    MessageType[MessageType["Error"] = 3] = "Error"
    MessageType[MessageType["Success"] = 4] = "Success"
})(MessageType || (MessageType = {}));
export class InformationMessageBase {
    /** @param {{Type?:MessageType,Summary?:string,FullMessage?:string,FieldName?:string,KeepOpen?:boolean}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {MessageType} */
    Type;
    /** @type {string} */
    Summary;
    /** @type {string} */
    FullMessage;
    /** @type {string} */
    FieldName;
    /** @type {boolean} */
    KeepOpen;
}
export class InformationMessages extends Array {
    constructor(init) { super(init); Object.assign(this, init) }
}
export class AddUploadFileResponse {
    /** @param {{DocumentId?:string,DocumentUploadId?:number,DocumentNr?:string,Messages?:InformationMessages}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {?string} */
    DocumentId;
    /** @type {?number} */
    DocumentUploadId;
    /** @type {string} */
    DocumentNr;
    /** @type {InformationMessages} */
    Messages;
}

JavaScript AddUploadFile 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/DMS/AddUploadFile HTTP/1.1 
Host: dogw.klokgroep.nl 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<AddUploadFile xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/IDB.API.DTO.Document.Operations">
  <Description>String</Description>
  <DocumentID>00000000-0000-0000-0000-000000000000</DocumentID>
  <DocumentUpload>false</DocumentUpload>
  <FileContent>AA==</FileContent>
  <FileDate>0001-01-01T00:00:00</FileDate>
  <FileName>String</FileName>
  <MainDocumentID>00000000-0000-0000-0000-000000000000</MainDocumentID>
  <MetaDataFields xmlns:d2p1="http://schemas.datacontract.org/2004/07/IDB.API.DMS">
    <d2p1:MetaDataField>
      <d2p1:Datatype>String</d2p1:Datatype>
      <d2p1:DocumentVeldID>00000000-0000-0000-0000-000000000000</d2p1:DocumentVeldID>
      <d2p1:Entity>String</d2p1:Entity>
      <d2p1:ID>00000000-0000-0000-0000-000000000000</d2p1:ID>
      <d2p1:IsKeyField>false</d2p1:IsKeyField>
      <d2p1:KopierenBijNieuweVersie>false</d2p1:KopierenBijNieuweVersie>
      <d2p1:Label>String</d2p1:Label>
      <d2p1:Name>String</d2p1:Name>
      <d2p1:PrintLabel>String</d2p1:PrintLabel>
      <d2p1:PrintValue>String</d2p1:PrintValue>
      <d2p1:RegistrationValue>String</d2p1:RegistrationValue>
      <d2p1:SPSiteColumnName>String</d2p1:SPSiteColumnName>
      <d2p1:ShadowDatatype>String</d2p1:ShadowDatatype>
      <d2p1:ShadowName>String</d2p1:ShadowName>
      <d2p1:ShadowRegistrationValue>String</d2p1:ShadowRegistrationValue>
      <d2p1:ShadowSPSiteColumnName>String</d2p1:ShadowSPSiteColumnName>
      <d2p1:ShadowSPSiteColumnRegistrationValue>String</d2p1:ShadowSPSiteColumnRegistrationValue>
    </d2p1:MetaDataField>
  </MetaDataFields>
  <NavigationPath>String</NavigationPath>
  <RegistrationProfileID>00000000-0000-0000-0000-000000000000</RegistrationProfileID>
  <Source>String</Source>
  <SubDocumentIDs xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:guid>00000000-0000-0000-0000-000000000000</d2p1:guid>
  </SubDocumentIDs>
</AddUploadFile>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<AddUploadFileResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/IDB.API.DTO.Document.Operations">
  <DocumentId>00000000-0000-0000-0000-000000000000</DocumentId>
  <DocumentNr>String</DocumentNr>
  <DocumentUploadId>0</DocumentUploadId>
  <Messages xmlns:d2p1="http://schemas.datacontract.org/2004/07/IDB.Core.Diagnostics.Interfaces">
    <d2p1:InformationMessageBase i:nil="true" />
  </Messages>
</AddUploadFileResponse>