# Understand advanced workflows using APIs

Source: https://developer.avalara.com/products/ecm/integration-guides/document-management/yzp3000481837919/

Guide: Exemption Certificate Management (ECM)

# Understand advanced workflows using APIs

Learn how to use and AvaTax APIs to enhance workflows and integrate additional functionality.

If you aren’t able to achieve the workflow you want by using ecommerce plugin general functions and callback functions, consider using the ECM API or the AvaTax API to add more functionality.

Note

Access to the [CertCapture API](https://developer.avalara.com/api-reference/CertCapture/v2/getting-started/) or the [AvaTax API](https://developer.avalara.com/avatax/) is required to fully incorporate all data for the customer record with your website. Avalara doesn’t provide a standard template for a detailed Account page. API instructions and endpoints are available, but your web developer must create any additional buttons, fields, tables, or other UI elements.

A common example of using the APIs to add more functionality is to integrate the ecommerce plugin with the Account page so that customers can upload exemption certificates and view exemption status or certificate details. Once exempt, customers can avoid submitting new certificates for each purchase as long as their certificate is still valid. We recommend placing the ecommerce SDK outside of the checkout workflow to avoid confusion or complexity in the checkout cart.

The simplest integration is using a button or link on the customer's Account page. Customers can use this to create or upload a certificate before they begin an exempt order.

![tax-exemption-certificates](https://knowledge-be.avalara.com/bundle/hxd9079947903116_hxd9079947903116/page/gkb9529962934927.image?_LANG=enus)

In the above workflow, users can add a new certificate or renew an existing certificate using the ecommerce SDK. Another option is to retrieve data through an API call. Using the API to retrieve this additional information is recommended because it allows returning customers to view their exemption status at any time.

The following API endpoints are the most commonly used with the ecommerce plugin:

-   Retrieve customer information: Use this API endpoint to retrieve your customer information, including name, address, and contact information.

    -   **ECM:** Refer to the documentation for the [Retrieve\_Customer API](https://developer.avalara.com/api-reference/CertCapture/v2/methods/Customers/Retrieve_Customer/).

    -   **AvaTax:** Refer to the documentation for the [GetCustomer API](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Customers/GetCustomer/).

-   Update customer contact information: Use this API endpoint to let customers update their contact information using either the `edit_purchaser` function or by sending an API call.

    -   **ECM:** Refer to the documentation for the [Update\_Customer API](https://developer.avalara.com/api-reference/CertCapture/v2/methods/Customers/Update_Customer/).

    -   **AvaTax:** Refer to the documentation for the [UpdateCustomer API](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Customers/UpdateCustomer/).

-   Retrieve certificate information: Use this API endpoint to retrieve a list of the certificates that you have on file for the customer. You can use this information to populate a list of certificates and exemption statuses for the customer, so they know when they need to provide a replacement for an expired or invalid certificate.

    -   **ECM:** Refer to the documentation for the [Retrieve\_Certificate API](https://developer.avalara.com/api-reference/CertCapture/v2/methods/Certificates/Retrieve_Certificate/).

    -   **AvaTax:** Refer to the documentation for the [ListCertificatesForCustomer API](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Customers/ListCertificatesForCustomer/).

-   Retrieve certificate PDF: Use this API endpoint to retrieve the binary data for the PDF, which you can then convert to a PDF.

    -   **ECM:** Refer to the documentation for the [Retrieve\_Certificate\_Pdf API](https://developer.avalara.com/api-reference/CertCapture/v2/methods/Certificates/Retrieve_Certificate_Pdf/).

    -   **AvaTax:** Refer to the documentation for the [DownloadCertificateImage API](https://developer.avalara.com/api-reference%2Favatax%2Frest%2Fv2%2Fmethods%2FCertificates%2FDownloadCertificateImage).

For more information on endpoints, see the [CertCapture API documentation](https://developer.avalara.com/api-reference/CertCapture/v2/getting-started/) and the [AvaTax API documentation](https://developer.avalara.com/api-reference/avatax/rest/v2/).