how to create a package with document visibility by rest API
Wednesday, December 2, 2020 at 09:31amI'd like to know how to set document visibility when create a package by using REST API? could you please share a sample code?
Thanks
Wendy
I'd like to know how to set document visibility when create a package by using REST API? could you please share a sample code?
Thanks
Wendy
Reply to: how to create a package with document visibility by rest API
Wednesday, December 2, 2020 at 09:35amHi Wendy,
Document visibility is not part of the package JSON, therefore you need a separate API to specify it:
POST /api/packages/{packageId}/documents/visibility
Accept: application/json
Content-Type: application/json
Authorization: Basic api_key
{
"configurations": [
{
"documentUid": "doc1",
"roleUids": [
"Signer1"
]
},
{
"documentUid": "doc2",
"roleUids": [
"Signer2"
]
}
]
}
Duo
Reply to: Hi Wendy, Document…
Wednesday, December 2, 2020 at 10:42amThanks Duo for the quick response. I will try it. How to set document visibility by using JAVA SDK call?
Thanks
Wendy
Reply to: how to create a package with document visibility by rest API
Wednesday, December 2, 2020 at 11:46amHere is the equivalent code in Java SDK:
DocumentVisibility visibility = DocumentVisibilityBuilder.newDocumentVisibility()
.addConfiguration(DocumentVisibilityConfigurationBuilder.newDocumentVisibilityConfiguration("doc1").withSignerIds(Arrays.asList("Signer1","Signer2")))
.addConfiguration(DocumentVisibilityConfigurationBuilder.newDocumentVisibilityConfiguration("doc2").withSignerIds(Arrays.asList("Signer1","Signer2")))
.build();
eslClient.configureDocumentVisibility(new PackageId("package_id"), visibility);
Duo
Reply to: how to create a package with document visibility by rest API
Wednesday, September 14, 2022 at 05:07pm