PDF Generator

How to export data from ION in the form of a PDF

We understand how important it is to quickly and securely share information from ION with external partners—whether that’s suppliers, auditors, or regulators. This guide outlines a simple way to export data from ION using a tool we also use internally: Carbone.io.

There are many options available for generating PDFs—tools like DocHub, PDFMonkey, Docmosis, PDFShift, and even Google Sheets can all serve this need. For the purpose of this example, we’ll focus on using Carbone.io due to its flexibility, ease of integrating with structured data, and ability to automate generation of the PDFs due to its accessible API.

Note: This method does not protect ITAR-restricted data. For more information, please refer to our disclaimer.


Step 1: Start with an Example PDF

Start with an example PDF you already use today—ideally one that includes all the data you want to share in the format your recipients expect. This could be a purchase order, audit log, or build report.


Step 2: Define the Data Query

Using the ION GraphQL Explorer, create the API query you need to retrieve all of the information that appears in your example PDF. Identify a real object in ION—such as a purchase order, run, or quality issue—as a sample to build and test your query against.

Ensure the query returns data in a structured JSON format that matches the fields and structure expected by the template you will create in Step 3. Below is an example of a query and the response.

API Call:

{
  partKit(id:780){
    _updated
    id
    deliveryLocation{
      address
    }
    partKitItems{
      part{
        partNumber
        revision
        description
      }
      quantity
    }
  }
}

JSON Response:

{
  "data": {
    "partKit": {
      "_updated": "2025-05-08T00:33:40.275245",
      "id": 780,
      "deliveryLocation": {
        "address": "600 Wilshire Blvd,\nSuite 1500,\nLos Angeles, CA 90017"
      },
      "partKitItems": [
        {
          "part": {
            "partNumber": "7777-03",
            "revision": "C",
            "description": "Wheel assembly"
          },
          "quantity": 4
        },
        {
          "part": {
            "partNumber": "1111-545-01",
            "revision": "B",
            "description": "Mounting screw"
          },
          "quantity": 8
        },
        {
          "part": {
            "partNumber": "7777-02",
            "revision": "B",
            "description": "Car body"
          },
          "quantity": 1
        },
        {
          "part": {
            "partNumber": "SA",
            "revision": "1",
            "description": "Spoiler Assembly"
          },
          "quantity": 2
        }
      ]
    }
  }
}

Step 3: Create the Template and Test

Use the example PDF from Step 1 as a guide to create a .docx or .odt template file. Your goal is to recreate the layout and structure of the PDF using Carbone's templating syntax.

For each field in your JSON response from Step 2, insert a dynamic placeholder in the template to represent the data. For example, if you're working with a part kit, your template might include placeholders like {data.partKit.id}, or {data.partKit.deliveryLocation.address}. Below is an example of a template we created to generate a packing list.

If you need more information on how to configure complex templates with Carbone.io, we recommend checking out their quickstart guide!

Once your template is ready, upload it to Carbone.io and pair it with the JSON data to generate the final PDF. You can preview and adjust formatting as needed until the output matches your expectations.

We recommend adding a few dynamic placeholders at a time in order to test and quickly debug if needed.

Each template created will have an ID and Carbone has an API key that you can use to automatically call it's API and generate these reports. Here is an example of the Carbone.io studio which enables us to determine if the template is rendering the data correct.


Conclusion

This approach helps you generate clear, professional documents using the latest data in ION, with minimal overhead. It's flexible, supports complex formatting, and can be adapted for a variety of export use cases. You can use the template ID and Carbone API key to setup automated workflows that upload PDFs to ION based on an event that is triggered.

Let us know if you’d like help getting started or want to set this up as part of an automated workflow.

Last updated

Was this helpful?