Class TemplateApi


  • @Generated("org.openapitools.codegen.languages.JavaClientCodegen")
    public class TemplateApi
    extends java.lang.Object
    • Constructor Detail

      • TemplateApi

        public TemplateApi()
      • TemplateApi

        public TemplateApi​(ApiClient apiClient)
    • Method Detail

      • getApiClient

        public ApiClient getApiClient()
        Get the API client
        Returns:
        API client
      • setApiClient

        public void setApiClient​(ApiClient apiClient)
        Set the API client
        Parameters:
        apiClient - an instance of API client
      • templateAddUser

        public TemplateGetResponse templateAddUser​(java.lang.String templateId,
                                                   TemplateAddUserRequest templateAddUserRequest)
                                            throws ApiException
        Add User to Template Gives the specified Account access to the specified Template. The specified Account must be a part of your Team.
        Parameters:
        templateId - The id of the Template to give the Account access to. (required)
        templateAddUserRequest - (required)
        Returns:
        TemplateGetResponse
        Throws:
        ApiException - if fails to make API call
        Http Response Details
        Status Code Description Response Headers
        200 successful operation * X-RateLimit-Limit -
        * X-RateLimit-Remaining -
        * X-Ratelimit-Reset -
        4XX failed_operation -
      • templateAddUserWithHttpInfo

        public ApiResponse<TemplateGetResponse> templateAddUserWithHttpInfo​(java.lang.String templateId,
                                                                            TemplateAddUserRequest templateAddUserRequest)
                                                                     throws ApiException
        Add User to Template Gives the specified Account access to the specified Template. The specified Account must be a part of your Team.
        Parameters:
        templateId - The id of the Template to give the Account access to. (required)
        templateAddUserRequest - (required)
        Returns:
        ApiResponse<TemplateGetResponse>
        Throws:
        ApiException - if fails to make API call
        Http Response Details
        Status Code Description Response Headers
        200 successful operation * X-RateLimit-Limit -
        * X-RateLimit-Remaining -
        * X-Ratelimit-Reset -
        4XX failed_operation -
      • templateCreateEmbeddedDraft

        public TemplateCreateEmbeddedDraftResponse templateCreateEmbeddedDraft​(TemplateCreateEmbeddedDraftRequest templateCreateEmbeddedDraftRequest)
                                                                        throws ApiException
        Create Embedded Template Draft The first step in an embedded template workflow. Creates a draft template that can then be further set up in the template 'edit' stage.
        Parameters:
        templateCreateEmbeddedDraftRequest - (required)
        Returns:
        TemplateCreateEmbeddedDraftResponse
        Throws:
        ApiException - if fails to make API call
        Http Response Details
        Status Code Description Response Headers
        200 successful operation * X-RateLimit-Limit -
        * X-RateLimit-Remaining -
        * X-Ratelimit-Reset -
        4XX failed_operation -
      • templateCreateEmbeddedDraftWithHttpInfo

        public ApiResponse<TemplateCreateEmbeddedDraftResponse> templateCreateEmbeddedDraftWithHttpInfo​(TemplateCreateEmbeddedDraftRequest templateCreateEmbeddedDraftRequest)
                                                                                                 throws ApiException
        Create Embedded Template Draft The first step in an embedded template workflow. Creates a draft template that can then be further set up in the template 'edit' stage.
        Parameters:
        templateCreateEmbeddedDraftRequest - (required)
        Returns:
        ApiResponse<TemplateCreateEmbeddedDraftResponse>
        Throws:
        ApiException - if fails to make API call
        Http Response Details
        Status Code Description Response Headers
        200 successful operation * X-RateLimit-Limit -
        * X-RateLimit-Remaining -
        * X-Ratelimit-Reset -
        4XX failed_operation -
      • templateDelete

        public void templateDelete​(java.lang.String templateId)
                            throws ApiException
        Delete Template Completely deletes the template specified from the account.
        Parameters:
        templateId - The id of the Template to delete. (required)
        Throws:
        ApiException - if fails to make API call
        Http Response Details
        Status Code Description Response Headers
        200 successful operation * X-RateLimit-Limit -
        * X-RateLimit-Remaining -
        * X-Ratelimit-Reset -
        4XX failed_operation -
      • templateDeleteWithHttpInfo

        public ApiResponse<java.lang.Void> templateDeleteWithHttpInfo​(java.lang.String templateId)
                                                               throws ApiException
        Delete Template Completely deletes the template specified from the account.
        Parameters:
        templateId - The id of the Template to delete. (required)
        Returns:
        ApiResponse<Void>
        Throws:
        ApiException - if fails to make API call
        Http Response Details
        Status Code Description Response Headers
        200 successful operation * X-RateLimit-Limit -
        * X-RateLimit-Remaining -
        * X-Ratelimit-Reset -
        4XX failed_operation -
      • templateFiles

        public FileResponse templateFiles​(java.lang.String templateId,
                                          java.lang.String fileType,
                                          java.lang.Boolean getUrl,
                                          java.lang.Boolean getDataUri)
                                   throws ApiException
        Get Template Files Obtain a copy of the current documents specified by the `template_id` parameter. Returns a PDF or ZIP file, or if `get_url` is set, a JSON object with a url to the file (PDFs only). If `get_data_uri` is set, a JSON object with a `data_uri` representing the base64 encoded file (PDFs only) is returned. If the files are currently being prepared, a status code of `409` will be returned instead. In this case please wait for the `template_created` callback event.
        Parameters:
        templateId - The id of the template files to retrieve. (required)
        fileType - Set to `pdf` for a single merged document or `zip` for a collection of individual documents. (optional)
        getUrl - If `true`, the response will contain a url link to the file instead. Links are only available for PDFs and have a TTL of 3 days. (optional, default to false)
        getDataUri - If `true`, the response will contain the file as base64 encoded string. Base64 encoding is only available for PDFs. (optional, default to false)
        Returns:
        FileResponse
        Throws:
        ApiException - if fails to make API call
        Http Response Details
        Status Code Description Response Headers
        200 successful operation * X-RateLimit-Limit -
        * X-RateLimit-Remaining -
        * X-Ratelimit-Reset -
        4XX failed_operation -
      • templateFilesWithHttpInfo

        public ApiResponse<FileResponse> templateFilesWithHttpInfo​(java.lang.String templateId,
                                                                   java.lang.String fileType,
                                                                   java.lang.Boolean getUrl,
                                                                   java.lang.Boolean getDataUri)
                                                            throws ApiException
        Get Template Files Obtain a copy of the current documents specified by the `template_id` parameter. Returns a PDF or ZIP file, or if `get_url` is set, a JSON object with a url to the file (PDFs only). If `get_data_uri` is set, a JSON object with a `data_uri` representing the base64 encoded file (PDFs only) is returned. If the files are currently being prepared, a status code of `409` will be returned instead. In this case please wait for the `template_created` callback event.
        Parameters:
        templateId - The id of the template files to retrieve. (required)
        fileType - Set to `pdf` for a single merged document or `zip` for a collection of individual documents. (optional)
        getUrl - If `true`, the response will contain a url link to the file instead. Links are only available for PDFs and have a TTL of 3 days. (optional, default to false)
        getDataUri - If `true`, the response will contain the file as base64 encoded string. Base64 encoding is only available for PDFs. (optional, default to false)
        Returns:
        ApiResponse<FileResponse>
        Throws:
        ApiException - if fails to make API call
        Http Response Details
        Status Code Description Response Headers
        200 successful operation * X-RateLimit-Limit -
        * X-RateLimit-Remaining -
        * X-Ratelimit-Reset -
        4XX failed_operation -
      • templateGet

        public TemplateGetResponse templateGet​(java.lang.String templateId)
                                        throws ApiException
        Get Template Returns the Template specified by the `template_id` parameter.
        Parameters:
        templateId - The id of the Template to retrieve. (required)
        Returns:
        TemplateGetResponse
        Throws:
        ApiException - if fails to make API call
        Http Response Details
        Status Code Description Response Headers
        200 successful operation * X-RateLimit-Limit -
        * X-RateLimit-Remaining -
        * X-Ratelimit-Reset -
        4XX failed_operation -
      • templateGetWithHttpInfo

        public ApiResponse<TemplateGetResponse> templateGetWithHttpInfo​(java.lang.String templateId)
                                                                 throws ApiException
        Get Template Returns the Template specified by the `template_id` parameter.
        Parameters:
        templateId - The id of the Template to retrieve. (required)
        Returns:
        ApiResponse<TemplateGetResponse>
        Throws:
        ApiException - if fails to make API call
        Http Response Details
        Status Code Description Response Headers
        200 successful operation * X-RateLimit-Limit -
        * X-RateLimit-Remaining -
        * X-Ratelimit-Reset -
        4XX failed_operation -
      • templateList

        public TemplateListResponse templateList​(java.lang.String accountId,
                                                 java.lang.Integer page,
                                                 java.lang.Integer pageSize,
                                                 java.lang.String query)
                                          throws ApiException
        List Templates Returns a list of the Templates that are accessible by you. Take a look at our [search guide](/api/reference/search/) to learn more about querying templates.
        Parameters:
        accountId - Which account to return Templates for. Must be a team member. Use `all` to indicate all team members. Defaults to your account. (optional)
        page - Which page number of the Template List to return. Defaults to `1`. (optional, default to 1)
        pageSize - Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20)
        query - String that includes search terms and/or fields to be used to filter the Template objects. (optional)
        Returns:
        TemplateListResponse
        Throws:
        ApiException - if fails to make API call
        Http Response Details
        Status Code Description Response Headers
        200 successful operation * X-RateLimit-Limit -
        * X-RateLimit-Remaining -
        * X-Ratelimit-Reset -
        4XX failed_operation -
      • templateListWithHttpInfo

        public ApiResponse<TemplateListResponse> templateListWithHttpInfo​(java.lang.String accountId,
                                                                          java.lang.Integer page,
                                                                          java.lang.Integer pageSize,
                                                                          java.lang.String query)
                                                                   throws ApiException
        List Templates Returns a list of the Templates that are accessible by you. Take a look at our [search guide](/api/reference/search/) to learn more about querying templates.
        Parameters:
        accountId - Which account to return Templates for. Must be a team member. Use `all` to indicate all team members. Defaults to your account. (optional)
        page - Which page number of the Template List to return. Defaults to `1`. (optional, default to 1)
        pageSize - Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. (optional, default to 20)
        query - String that includes search terms and/or fields to be used to filter the Template objects. (optional)
        Returns:
        ApiResponse<TemplateListResponse>
        Throws:
        ApiException - if fails to make API call
        Http Response Details
        Status Code Description Response Headers
        200 successful operation * X-RateLimit-Limit -
        * X-RateLimit-Remaining -
        * X-Ratelimit-Reset -
        4XX failed_operation -
      • templateRemoveUser

        public TemplateGetResponse templateRemoveUser​(java.lang.String templateId,
                                                      TemplateRemoveUserRequest templateRemoveUserRequest)
                                               throws ApiException
        Remove User from Template Removes the specified Account's access to the specified Template.
        Parameters:
        templateId - The id of the Template to remove the Account's access to. (required)
        templateRemoveUserRequest - (required)
        Returns:
        TemplateGetResponse
        Throws:
        ApiException - if fails to make API call
        Http Response Details
        Status Code Description Response Headers
        200 successful operation * X-RateLimit-Limit -
        * X-RateLimit-Remaining -
        * X-Ratelimit-Reset -
        4XX failed_operation -
      • templateRemoveUserWithHttpInfo

        public ApiResponse<TemplateGetResponse> templateRemoveUserWithHttpInfo​(java.lang.String templateId,
                                                                               TemplateRemoveUserRequest templateRemoveUserRequest)
                                                                        throws ApiException
        Remove User from Template Removes the specified Account's access to the specified Template.
        Parameters:
        templateId - The id of the Template to remove the Account's access to. (required)
        templateRemoveUserRequest - (required)
        Returns:
        ApiResponse<TemplateGetResponse>
        Throws:
        ApiException - if fails to make API call
        Http Response Details
        Status Code Description Response Headers
        200 successful operation * X-RateLimit-Limit -
        * X-RateLimit-Remaining -
        * X-Ratelimit-Reset -
        4XX failed_operation -
      • templateUpdateFiles

        public TemplateUpdateFilesResponse templateUpdateFiles​(java.lang.String templateId,
                                                               TemplateUpdateFilesRequest templateUpdateFilesRequest)
                                                        throws ApiException
        Update Template Files Overlays a new file with the overlay of an existing template. The new file(s) must: 1. have the same or higher page count 2. the same orientation as the file(s) being replaced. This will not overwrite or in any way affect the existing template. Both the existing template and new template will be available for use after executing this endpoint. Also note that this will decrement your template quota. Overlaying new files is asynchronous and a successful call to this endpoint will return 200 OK response if the request passes initial validation checks. It is recommended that a callback be implemented to listen for the callback event. A `template_created` event will be sent when the files are updated or a `template_error` event will be sent if there was a problem while updating the files. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the API dashboard and retry the request if necessary. If the page orientation or page count is different from the original template document, we will notify you with a `template_error` [callback event](https://app.hellosign.com/api/eventsAndCallbacksWalkthrough).
        Parameters:
        templateId - The ID of the template whose files to update. (required)
        templateUpdateFilesRequest - (required)
        Returns:
        TemplateUpdateFilesResponse
        Throws:
        ApiException - if fails to make API call
        Http Response Details
        Status Code Description Response Headers
        200 successful operation * X-RateLimit-Limit -
        * X-RateLimit-Remaining -
        * X-Ratelimit-Reset -
        4XX failed_operation -
      • templateUpdateFilesWithHttpInfo

        public ApiResponse<TemplateUpdateFilesResponse> templateUpdateFilesWithHttpInfo​(java.lang.String templateId,
                                                                                        TemplateUpdateFilesRequest templateUpdateFilesRequest)
                                                                                 throws ApiException
        Update Template Files Overlays a new file with the overlay of an existing template. The new file(s) must: 1. have the same or higher page count 2. the same orientation as the file(s) being replaced. This will not overwrite or in any way affect the existing template. Both the existing template and new template will be available for use after executing this endpoint. Also note that this will decrement your template quota. Overlaying new files is asynchronous and a successful call to this endpoint will return 200 OK response if the request passes initial validation checks. It is recommended that a callback be implemented to listen for the callback event. A `template_created` event will be sent when the files are updated or a `template_error` event will be sent if there was a problem while updating the files. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the API dashboard and retry the request if necessary. If the page orientation or page count is different from the original template document, we will notify you with a `template_error` [callback event](https://app.hellosign.com/api/eventsAndCallbacksWalkthrough).
        Parameters:
        templateId - The ID of the template whose files to update. (required)
        templateUpdateFilesRequest - (required)
        Returns:
        ApiResponse<TemplateUpdateFilesResponse>
        Throws:
        ApiException - if fails to make API call
        Http Response Details
        Status Code Description Response Headers
        200 successful operation * X-RateLimit-Limit -
        * X-RateLimit-Remaining -
        * X-Ratelimit-Reset -
        4XX failed_operation -