Skip to main content

Signing multiple hashes in Postman with one SAD

This guide uses the Client Credential Flow authentication method. It explains which API calls must be executed and the number of times execution is required to sign several hashes with one SAD (Signature Activation Data).

참고

In this method, you are required to precalculate the number of hashes you want with "3 - PDF Service: Register Document" and "4 – PDF Service Create Hash" API calls before executing "6 - DTM: extendTransaction" and "7 - DTM: CSC Signatures SignHash".

The signature in the "7 - DTM: CSC Signatures SignHash" response corresponds to the order of the hashes sent in its API call request. 

You can execute "8 - PDF Service: Embed Signature" API call repeatedly up to 200 times per cycle to embed signatures in the documents.

To sign a hash, execute the individual API calls below:

참고

The access token is valid for one hour but can be extended by DigiCert​​®​​ up to 24 hours.

  1. In the Postman window, select Collections (left menu) > PDF Service 2.0 > DTM CSC Credential List.

  2. In the right window, switch to the Authorization tab.

  3. Select Get New Access Token.

  4. In the new popup window, select Proceed.

  5. To apply access token, select Use Token.

To get a list of credentials (certificates) stored in your DigiCert ONE account:

  1. Open the collection PDFService-2-0-SealSign CADES - API-Token Flow - Visible Signature works.

  2. Select 1 - DTM CSC Credential List > Send.

Your DigiCert ONE CredentialIDs (certificates) used are displayed in the body.

To get an overview of the functions used in DigiCert ONE:

  • Select 2 - DTM CSC Credential Info > Send.

You can see the functions used in DigiCert ONE.

To register a document:

  1. Select 3 - PDF Service: Register Document.

  2. Configure "tsa_url" variable value by entering the URL of the timestamp authority you will use to sign documents.

  3. Select Send.

To change signature appearance, use the configurations below:

Configuration

Description

type (optional)

Depending on the type, you are able to create a certified MDP (document modification detection and prevention) document. Default is not certified and shows a green tick. Certified shows a ribbon with a seal.

Examples:

NOT_CERTIFIED

CERTIFIED_NO_CHANGES_ALLOWED

CERTIFIED_FORM_FILLING

CERTIFIED_FORM_FILLING_AND_ANNOTATIONS

preservation_size (optional)

Enter preservation size of the space for embedding the signature in bytes. Value should be a multiple of 1024. (Format: int32).

signature_rectangle (optional)

Set the position and size of the digital signature annotation. The default is an invisible signature. The position is defined by four values for the lower-left corner (x, y) and dimensions (w, h) of the rectangle. The units are PDF points (1 point = 1/72 inch, A4 = 595 x 842 points, letter = 612 x 792 points, 1 cm = 28.3465 points) measured from the lower left corner of the page. If either the width or height is zero or negative, an invisible signature is created, i.e. no visible appearance is created for the signature.

(Format: int32).

page: Enter page on which the signature is added.

x: Enter x value of lower-left corner.

y: Enter y value of lower-left corner.

w: Enter width dimension of rectangle.

h: Enter height dimension of rectangle.

signature_text1 (optional)

Enter specific signature text instead of standard. (Example: signer's name).

reason (optional)

Enter reason.

contact (optional)

Enter contact.

font_text1 (optional)

Enter name of the font.

font_size_text1 (optional)

Enter font size of signature text 1. If attribute is not present default of 16pt is used. (Format: int32).

signature_text2 (optional)

Enter specific signature text instead of standard. (Example: signer’s name, reason and/or signing time).

font_text2 (optional)

Enter name of the font.

font_size_text2 (optional)

Enter font size of signature text 2. If attribute is not present default of 8pt is used. (Format: int32).

signature_fill_color (optional)

Enter background color in RGB. The default is 16761024 (red = 192, green = 192, blue = 255).

Color value is calculated as follows:

color red + green * 256 + blue * 256 * 256. To keep the rectangle transparent, set the value to -1. (Format: int32).

signature_stroke_color (optional)

Enter the color of the signature’s border line as RGB value. The default is 8405056 (red = 64, green = 64, blue = 128).

Color value is calculated as follows:

color red + green * 256 + blue * 256 * 256. To keep it transparent, set the value to -1. (Format: int32).

signature_line_width (optional)

Enter the thickness of the line surrounding the visual signature in points. (Format: int32).

background_image (optional)

Insert the image to be embedded in the signature field. (Base64 encoded). (Example: "dGVzdA==”).

To create a hash:

  1. Attach document.

  2. Select 4 - PDF Service: Create Hash > Send.

  3. Repeat Step 3. Register document and Step 4. Create hash consecutively until you reach the number of hashes you want to calculate.

You will receive DocumentIDs and their corresponding hashes.

작은 정보

Upload different PDF documents after each execution of "Step 3. Register document" to calculate hashes and test with different documents.

To generate a SAD (Signature Activation Data) and start authorization via the Go>Sign Mobile application:

  1. Select 5 - DTM: CSC Credential Authorize > Send.

  2. Navigate to Go>Sign Mobile application > Authorization request > Authorize.

You will receive a valid SAD required for signing the hash. This is required in "Embed signature step".

참고

In the DigiCert ONE demo environment, default values for reauthorization via Go>Sign Mobile application are set to "250,000 hashes or 30 days".

In the DigiCert ONE production environment, default values for reauthorization via Go>Sign Mobile application are to "1 million hashes or 95 days".

To sign the hash:

  • Select 7 - DTM: CSC Signatures SignHash > Send.

You receive one signature per hash sent.

To sign a new hash:

  1. Select 8 - PDF Service: Embed Signature.

  2. The SAD created in Authorize credential step will be updated automatically.

  3. Select Send.

  4. Repeat this step for each signature individually in the order in which you received them in "4 - PDF Service: Create Hash".

To download the PDF and check the validity of the signature:

  • Select Save as example (bottom right) > Save response to file.