| POST,OPTIONS | /v1/documentshare |
|---|
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
public static class DocumentShareCreateRequest
{
public UUID AttachmentId = null;
public Integer RecipientContactId = null;
public String RecipientEmail = null;
public String RecipientPhone = null;
public Boolean IsAdhoc = null;
public String SensitivityTier = null;
public Boolean RequireOtp = null;
public String OtpChannel = null;
public String DeliveryChannels = null;
public Integer ExpiresInHours = null;
public Integer MaxViews = null;
public UUID getAttachmentId() { return AttachmentId; }
public DocumentShareCreateRequest setAttachmentId(UUID value) { this.AttachmentId = value; return this; }
public Integer getRecipientContactId() { return RecipientContactId; }
public DocumentShareCreateRequest setRecipientContactId(Integer value) { this.RecipientContactId = value; return this; }
public String getRecipientEmail() { return RecipientEmail; }
public DocumentShareCreateRequest setRecipientEmail(String value) { this.RecipientEmail = value; return this; }
public String getRecipientPhone() { return RecipientPhone; }
public DocumentShareCreateRequest setRecipientPhone(String value) { this.RecipientPhone = value; return this; }
public Boolean getIsAdhoc() { return IsAdhoc; }
public DocumentShareCreateRequest setIsAdhoc(Boolean value) { this.IsAdhoc = value; return this; }
public String getSensitivityTier() { return SensitivityTier; }
public DocumentShareCreateRequest setSensitivityTier(String value) { this.SensitivityTier = value; return this; }
public Boolean isRequireOtp() { return RequireOtp; }
public DocumentShareCreateRequest setRequireOtp(Boolean value) { this.RequireOtp = value; return this; }
public String getOtpChannel() { return OtpChannel; }
public DocumentShareCreateRequest setOtpChannel(String value) { this.OtpChannel = value; return this; }
public String getDeliveryChannels() { return DeliveryChannels; }
public DocumentShareCreateRequest setDeliveryChannels(String value) { this.DeliveryChannels = value; return this; }
public Integer getExpiresInHours() { return ExpiresInHours; }
public DocumentShareCreateRequest setExpiresInHours(Integer value) { this.ExpiresInHours = value; return this; }
public Integer getMaxViews() { return MaxViews; }
public DocumentShareCreateRequest setMaxViews(Integer value) { this.MaxViews = value; return this; }
}
public static class DocumentShareResponse
{
public ResponseStatus ResponseStatus = null;
public ArrayList<DocumentShareExtended> DocumentShare = new ArrayList<DocumentShareExtended>();
public String ShareUrl = null;
public ResponseStatus getResponseStatus() { return ResponseStatus; }
public DocumentShareResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; }
public ArrayList<DocumentShareExtended> getDocumentShare() { return DocumentShare; }
public DocumentShareResponse setDocumentShare(ArrayList<DocumentShareExtended> value) { this.DocumentShare = value; return this; }
public String getShareUrl() { return ShareUrl; }
public DocumentShareResponse setShareUrl(String value) { this.ShareUrl = value; return this; }
}
public static class DocumentShareExtended extends DocumentShare
{
public String AttachmentName = null;
public String RecipientDisplayName = null;
public String RecipientType = null;
public String CreatedByName = null;
public String Status = null;
public String getAttachmentName() { return AttachmentName; }
public DocumentShareExtended setAttachmentName(String value) { this.AttachmentName = value; return this; }
public String getRecipientDisplayName() { return RecipientDisplayName; }
public DocumentShareExtended setRecipientDisplayName(String value) { this.RecipientDisplayName = value; return this; }
public String getRecipientType() { return RecipientType; }
public DocumentShareExtended setRecipientType(String value) { this.RecipientType = value; return this; }
public String getCreatedByName() { return CreatedByName; }
public DocumentShareExtended setCreatedByName(String value) { this.CreatedByName = value; return this; }
public String getStatus() { return Status; }
public DocumentShareExtended setStatus(String value) { this.Status = value; return this; }
}
public static class DocumentShare
{
public Integer DocumentShareId = null;
public UUID DocumentShareUID = null;
public String TokenHash = null;
public UUID AttachmentId = null;
public String SensitivityTier = null;
public Boolean RequireOtp = null;
public String OtpChannel = null;
public String DeliveryChannels = null;
public Integer RecipientContactId = null;
public String RecipientEmail = null;
public String RecipientPhone = null;
public Boolean SmsConsentSnapshot = null;
public UUID CreatedByUserId = null;
public Integer CreatedByAgentId = null;
public Date CreatedAtUtc = null;
public Date ExpiresAtUtc = null;
public Integer MaxViews = null;
public Integer ViewCount = null;
public Date RevokedAtUtc = null;
public UUID RevokedByUserId = null;
public Integer getDocumentShareId() { return DocumentShareId; }
public DocumentShare setDocumentShareId(Integer value) { this.DocumentShareId = value; return this; }
public UUID getDocumentShareUID() { return DocumentShareUID; }
public DocumentShare setDocumentShareUID(UUID value) { this.DocumentShareUID = value; return this; }
public String getTokenHash() { return TokenHash; }
public DocumentShare setTokenHash(String value) { this.TokenHash = value; return this; }
public UUID getAttachmentId() { return AttachmentId; }
public DocumentShare setAttachmentId(UUID value) { this.AttachmentId = value; return this; }
public String getSensitivityTier() { return SensitivityTier; }
public DocumentShare setSensitivityTier(String value) { this.SensitivityTier = value; return this; }
public Boolean isRequireOtp() { return RequireOtp; }
public DocumentShare setRequireOtp(Boolean value) { this.RequireOtp = value; return this; }
public String getOtpChannel() { return OtpChannel; }
public DocumentShare setOtpChannel(String value) { this.OtpChannel = value; return this; }
public String getDeliveryChannels() { return DeliveryChannels; }
public DocumentShare setDeliveryChannels(String value) { this.DeliveryChannels = value; return this; }
public Integer getRecipientContactId() { return RecipientContactId; }
public DocumentShare setRecipientContactId(Integer value) { this.RecipientContactId = value; return this; }
public String getRecipientEmail() { return RecipientEmail; }
public DocumentShare setRecipientEmail(String value) { this.RecipientEmail = value; return this; }
public String getRecipientPhone() { return RecipientPhone; }
public DocumentShare setRecipientPhone(String value) { this.RecipientPhone = value; return this; }
public Boolean isSmsConsentSnapshot() { return SmsConsentSnapshot; }
public DocumentShare setSmsConsentSnapshot(Boolean value) { this.SmsConsentSnapshot = value; return this; }
public UUID getCreatedByUserId() { return CreatedByUserId; }
public DocumentShare setCreatedByUserId(UUID value) { this.CreatedByUserId = value; return this; }
public Integer getCreatedByAgentId() { return CreatedByAgentId; }
public DocumentShare setCreatedByAgentId(Integer value) { this.CreatedByAgentId = value; return this; }
public Date getCreatedAtUtc() { return CreatedAtUtc; }
public DocumentShare setCreatedAtUtc(Date value) { this.CreatedAtUtc = value; return this; }
public Date getExpiresAtUtc() { return ExpiresAtUtc; }
public DocumentShare setExpiresAtUtc(Date value) { this.ExpiresAtUtc = value; return this; }
public Integer getMaxViews() { return MaxViews; }
public DocumentShare setMaxViews(Integer value) { this.MaxViews = value; return this; }
public Integer getViewCount() { return ViewCount; }
public DocumentShare setViewCount(Integer value) { this.ViewCount = value; return this; }
public Date getRevokedAtUtc() { return RevokedAtUtc; }
public DocumentShare setRevokedAtUtc(Date value) { this.RevokedAtUtc = value; return this; }
public UUID getRevokedByUserId() { return RevokedByUserId; }
public DocumentShare setRevokedByUserId(UUID value) { this.RevokedByUserId = value; return this; }
}
}
Java DocumentShareCreateRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=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
}