import body.doc.Rubrica;
import body.doc.RubricaList;
import docs.DocRequests;
import java.util.ArrayList;
String apiToken = "YOUR TOKEN";
String docToken = "DOC TOKEN";
Rubrica rubrica1 = Rubrica.builder()
.page(0)
.relative_position_bottom(52.50)
.relative_position_left(75.71)
.relative_size_x(19.55)
.relative_size_y(9.42)
.type("signature")
.signer_token("TOKEN SIGNER")
.build();
Rubrica rubrica2 = Rubrica.builder()
.page(0)
.relative_position_bottom(13.50)
.relative_position_left(20.71)
.relative_size_x(19.55)
.relative_size_y(9.42)
.type("visto")
.signer_token("TOKEN SIGNER"
.build();
ArrayList<Rubrica> _rubricas = new ArrayList<>();
_rubricas.add(rubrica1);
_rubricas.add(rubrica2);
RubricaList rubricaList = RubricaList.builder()
.rubricas(_rubricas)
.build();
Call the method placeSignatures and receive as a response an integer containing the status code of the response or an error message:
try {
int statusCode = new DocRequests(apiToken).placeSignatures(docToken, rubricaList);
System.out.println(statusCode);
}
catch(Exception exceptionError) {
System.out.println(exceptionError.getMessage());
}
import body.doc.Rubrica;
import body.doc.RubricaList;
import docs.DocRequests;
import java.util.ArrayList;
public class PlaceSignatures {
public static void main(String[] args) throws Exception {
String apiToken = "YOUR TOKEN";
String docToken = "DOC TOKEN";
Rubrica rubrica1 = Rubrica.builder()
.page(0)
.relative_position_bottom(52.50)
.relative_position_left(75.71)
.relative_size_x(19.55)
.relative_size_y(9.42)
.type("signature")
.signer_token("TOKEN SIGNER")
.build();
Rubrica rubrica2 = Rubrica.builder()
.page(0)
.relative_position_bottom(13.50)
.relative_position_left(20.71)
.relative_size_x(19.55)
.relative_size_y(9.42)
.type("visto")
.signer_token("TOKEN SIGNER")
.build();
ArrayList<Rubrica> _rubricas = new ArrayList<>();
_rubricas.add(rubrica1);
_rubricas.add(rubrica2);
RubricaList rubricaList = RubricaList.builder()
.rubricas(_rubricas)
.build();
try {
int statusCode = new DocRequests(apiToken).placeSignatures(docToken, rubricaList);
System.out.println(statusCode);
}
catch(Exception exceptionError) {
System.out.println(exceptionError.getMessage());
}
}
}