Trendsic Platform Service

<back to all web services

DocumentShareCreateRequest

Requires Authentication
The following routes are available for this service:
POST,OPTIONS/v1/documentshare
"use strict";
export class DocumentShare {
    /** @param {{DocumentShareId?:number,DocumentShareUID?:string,TokenHash?:string,AttachmentId?:string,SensitivityTier?:string,RequireOtp?:boolean,OtpChannel?:string,DeliveryChannels?:string,RecipientContactId?:number,RecipientEmail?:string,RecipientPhone?:string,SmsConsentSnapshot?:boolean,CreatedByUserId?:string,CreatedByAgentId?:number,CreatedAtUtc?:string,ExpiresAtUtc?:string,MaxViews?:number,ViewCount?:number,RevokedAtUtc?:string,RevokedByUserId?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    DocumentShareId;
    /** @type {string} */
    DocumentShareUID;
    /** @type {string} */
    TokenHash;
    /** @type {string} */
    AttachmentId;
    /** @type {string} */
    SensitivityTier;
    /** @type {boolean} */
    RequireOtp;
    /** @type {string} */
    OtpChannel;
    /** @type {string} */
    DeliveryChannels;
    /** @type {?number} */
    RecipientContactId;
    /** @type {string} */
    RecipientEmail;
    /** @type {string} */
    RecipientPhone;
    /** @type {boolean} */
    SmsConsentSnapshot;
    /** @type {string} */
    CreatedByUserId;
    /** @type {?number} */
    CreatedByAgentId;
    /** @type {string} */
    CreatedAtUtc;
    /** @type {string} */
    ExpiresAtUtc;
    /** @type {?number} */
    MaxViews;
    /** @type {number} */
    ViewCount;
    /** @type {?string} */
    RevokedAtUtc;
    /** @type {?string} */
    RevokedByUserId;
}
export class DocumentShareExtended extends DocumentShare {
    /** @param {{AttachmentName?:string,RecipientDisplayName?:string,RecipientType?:string,CreatedByName?:string,Status?:string,DocumentShareId?:number,DocumentShareUID?:string,TokenHash?:string,AttachmentId?:string,SensitivityTier?:string,RequireOtp?:boolean,OtpChannel?:string,DeliveryChannels?:string,RecipientContactId?:number,RecipientEmail?:string,RecipientPhone?:string,SmsConsentSnapshot?:boolean,CreatedByUserId?:string,CreatedByAgentId?:number,CreatedAtUtc?:string,ExpiresAtUtc?:string,MaxViews?:number,ViewCount?:number,RevokedAtUtc?:string,RevokedByUserId?:string}} [init] */
    constructor(init) { super(init); Object.assign(this, init) }
    /** @type {string} */
    AttachmentName;
    /** @type {string} */
    RecipientDisplayName;
    /** @type {string} */
    RecipientType;
    /** @type {string} */
    CreatedByName;
    /** @type {string} */
    Status;
}
export class DocumentShareResponse {
    /** @param {{ResponseStatus?:ResponseStatus,DocumentShare?:DocumentShareExtended[],ShareUrl?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {ResponseStatus} */
    ResponseStatus;
    /** @type {DocumentShareExtended[]} */
    DocumentShare = [];
    /** @type {string} */
    ShareUrl;
}
export class DocumentShareCreateRequest {
    /** @param {{AttachmentId?:string,RecipientContactId?:number,RecipientEmail?:string,RecipientPhone?:string,IsAdhoc?:boolean,SensitivityTier?:string,RequireOtp?:boolean,OtpChannel?:string,DeliveryChannels?:string,ExpiresInHours?:number,MaxViews?:number}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    AttachmentId;
    /** @type {number} */
    RecipientContactId;
    /** @type {string} */
    RecipientEmail;
    /** @type {string} */
    RecipientPhone;
    /** @type {boolean} */
    IsAdhoc;
    /** @type {string} */
    SensitivityTier;
    /** @type {boolean} */
    RequireOtp;
    /** @type {string} */
    OtpChannel;
    /** @type {string} */
    DeliveryChannels;
    /** @type {number} */
    ExpiresInHours;
    /** @type {number} */
    MaxViews;
}

JavaScript DocumentShareCreateRequest DTOs

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

HTTP + JSV

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

POST /v1/documentshare HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	AttachmentId: 00000000000000000000000000000000,
	RecipientContactId: 0,
	RecipientEmail: String,
	RecipientPhone: String,
	IsAdhoc: False,
	SensitivityTier: String,
	RequireOtp: False,
	OtpChannel: String,
	DeliveryChannels: String,
	ExpiresInHours: 0,
	MaxViews: 0
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	},
	DocumentShare: 
	[
		{
			AttachmentName: String,
			RecipientDisplayName: String,
			RecipientType: String,
			CreatedByName: String,
			Status: String,
			DocumentShareId: 0,
			DocumentShareUID: 00000000000000000000000000000000,
			TokenHash: String,
			AttachmentId: 00000000000000000000000000000000,
			SensitivityTier: String,
			RequireOtp: False,
			OtpChannel: String,
			DeliveryChannels: String,
			RecipientContactId: 0,
			RecipientEmail: String,
			RecipientPhone: String,
			SmsConsentSnapshot: False,
			CreatedByUserId: 00000000000000000000000000000000,
			CreatedByAgentId: 0,
			CreatedAtUtc: 0001-01-01,
			ExpiresAtUtc: 0001-01-01,
			MaxViews: 0,
			ViewCount: 0,
			RevokedAtUtc: 0001-01-01,
			RevokedByUserId: 00000000000000000000000000000000
		}
	],
	ShareUrl: String
}