Help

How To: Use API to Automatically Download Response PDFs

Summary

How to use API to automatically Download Response PDFs.

 

Solution

This API provides Districts the option to bulk download Response PDFs. The purpose of this document is to detail how a district can use this API to bulk download responses. Please note that the audience for this document is District developers, preferably with background in API connections and authentication with OAuth.

 

The developers can access the API through this Swagger

 

The steps are listed below:

  1. The district/school would need a one-time code from the Permission Click team. This is a manual task and someone from the Permission Click team with an admin access would have to create and provide this code.

  2. After receiving the one-time code, the district developer would initiate a POST to https://auth{environment}.permissionclick.com/oauth/token?grant_type=authorization_code&code={code} with the one time embedded in the URL. This would initiate the authorization workflow and access_token and a refresh_token will be returned.

  3. Use access_token in Authorization: Bearer header on API calls.

  4. When access_token is expired, POST to https://auth{environment}.permissionclick.com/oauth/refresh-token, with application/x-www-form-urlencoded content type and form variable refresh_token using last valid Refresh Token to get a new Access Token.


Once the developers are in possession of a valid access_token they can use the following APIs:

 

  1. Document API: Document API is a way to list all approved forms. Even if the developers don’t know the Form ID, they can use this API to list all form that are valid because they will need those to get approved responses. The “shardcode” needs to match the country code for the organization. The result would a JSON blob with the following:
    • Document version
    • Document ID
    • Name
    • Organization

  2. Listing Available responses: Under the Response API section, the developer would have to access the link. By providing the document ID, shardCode, startDate and endDate, developers would be able to get a JSON blob containing an array of:

    • Response ID
    • Response Version ID
    • Document Version ID
    • ODF URL
    • Date Signed

 

To get the actual response PDF, they would go to this section on Response API. If they run this section by providing the ResponseVersionID, shardCode and DocumentID they will be able to access the PDF file of the response. The district developers can now use the result PDF to upload it a secured location of their liking.

 

 

Was this Article Helpful?

  • Kudo this article if you found it helpful. It will help others find this resource.
  • Comment directly on this article to request clarification or share feedback about the content of the article.
  • Use the product-specific forum for questions not directly related to this article.

Summary

How to use API to automatically Download Response PDFs.

 

Solution

This API provides Districts the option to bulk download Response PDFs. The purpose of this document is to detail how a district can use this API to bulk download responses. Please note that the audience for this document is District developers, preferably with background in API connections and authentication with OAuth.

 

The developers can access the API through this Swagger

 

The steps are listed below:

  1. The district/school would need a one-time code from the Permission Click team. This is a manual task and someone from the Permission Click team with an admin access would have to create and provide this code.

  2. After receiving the one-time code, the district developer would initiate a POST to https://auth{environment}.permissionclick.com/oauth/token?grant_type=authorization_code&code={code} with the one time embedded in the URL. This would initiate the authorization workflow and access_token and a refresh_token will be returned.

  3. Use access_token in Authorization: Bearer header on API calls.

  4. When access_token is expired, POST to https://auth{environment}.permissionclick.com/oauth/refresh-token, with application/x-www-form-urlencoded content type and form variable refresh_token using last valid Refresh Token to get a new Access Token.


Once the developers are in possession of a valid access_token they can use the following APIs:

 

  1. Document API: Document API is a way to list all approved forms. Even if the developers don’t know the Form ID, they can use this API to list all form that are valid because they will need those to get approved responses. The “shardcode” needs to match the country code for the organization. The result would a JSON blob with the following:
    • Document version
    • Document ID
    • Name
    • Organization

  2. Listing Available responses: Under the Response API section, the developer would have to access the link. By providing the document ID, shardCode, startDate and endDate, developers would be able to get a JSON blob containing an array of:

    • Response ID
    • Response Version ID
    • Document Version ID
    • ODF URL
    • Date Signed

 

To get the actual response PDF, they would go to this section on Response API. If they run this section by providing the ResponseVersionID, shardCode and DocumentID they will be able to access the PDF file of the response. The district developers can now use the result PDF to upload it a secured location of their liking.

 

 

Was this Article Helpful?

  • Kudo this article if you found it helpful. It will help others find this resource.
  • Comment directly on this article to request clarification or share feedback about the content of the article.
  • Use the product-specific forum for questions not directly related to this article.

Summary

How to use API to automatically Download Response PDFs.

 

Solution

This API provides Districts the option to bulk download Response PDFs. The purpose of this document is to detail how a district can use this API to bulk download responses. Please note that the audience for this document is District developers, preferably with background in API connections and authentication with OAuth.

 

The developers can access the API through this Swagger

 

The steps are listed below:

  1. The district/school would need a one-time code from the Permission Click team. This is a manual task and someone from the Permission Click team with an admin access would have to create and provide this code.

  2. After receiving the one-time code, the district developer would initiate a POST to https://auth{environment}.permissionclick.com/oauth/token?grant_type=authorization_code&code={code} with the one time embedded in the URL. This would initiate the authorization workflow and access_token and a refresh_token will be returned.

  3. Use access_token in Authorization: Bearer header on API calls.

  4. When access_token is expired, POST to https://auth{environment}.permissionclick.com/oauth/refresh-token, with application/x-www-form-urlencoded content type and form variable refresh_token using last valid Refresh Token to get a new Access Token.


Once the developers are in possession of a valid access_token they can use the following APIs:

 

  1. Document API: Document API is a way to list all approved forms. Even if the developers don’t know the Form ID, they can use this API to list all form that are valid because they will need those to get approved responses. The “shardcode” needs to match the country code for the organization. The result would a JSON blob with the following:
    • Document version
    • Document ID
    • Name
    • Organization

  2. Listing Available responses: Under the Response API section, the developer would have to access the link. By providing the document ID, shardCode, startDate and endDate, developers would be able to get a JSON blob containing an array of:

    • Response ID
    • Response Version ID
    • Document Version ID
    • ODF URL
    • Date Signed

 

To get the actual response PDF, they would go to this section on Response API. If they run this section by providing the ResponseVersionID, shardCode and DocumentID they will be able to access the PDF file of the response. The district developers can now use the result PDF to upload it a secured location of their liking.

 

 

Was this Article Helpful?

  • Kudo this article if you found it helpful. It will help others find this resource.
  • Comment directly on this article to request clarification or share feedback about the content of the article.
  • Use the product-specific forum for questions not directly related to this article.
Version history
Last update:
‎05-31-2024 11:27 AM
Updated by:
Contributors
Labels (1)