Request

Response

    Beta APIs are subject to change. Please avoid using them in production environments.

    Filter Product EPDs

    This task shows you how to retrieve a filtered list of product EPDs for a dataset. Product EPDs represent specific products and include metadata like declared unit, validity, and jurisdictions.

    By the end of this task, you will know how to:

    • Call the product EPDs filtering endpoint
    • Interpret returned EPD metadata and pagination
    • Prepare for future filtering options

    You use the following operation for this task:

    OperationHTTP Request
    Filter Product EPDs for Dataset POST /v3/datasets/{datasetId}/product-epds/list:filter

    Prerequisites

    Before starting this task, ensure you have:

    Warning

    Filter support varies by dataset. Before building filter expressions, complete Get Product EPD Filters to discover which filters are supported and which operators and values are allowed.


    Step 1: Call the Product EPDs Endpoint

    Use the access token from Obtain an Access Token and a dataset ID from Get the List of Supported Datasets to call the product EPDs endpoint. Filtering is provided via a request body object and may expand over time.

    Replace <YOUR_ACCESS_TOKEN> and <DATASET_ID> with your values.

    curl -v 'https://developer.api.autodesk.com/sustainability/v3/datasets/<DATASET_ID>/product-epds/list:filter' \
      -X 'POST' \
      -H 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -d '{
        "filters": {}
      }'
    
    Show More
    const accessToken = "<YOUR_ACCESS_TOKEN>";
    const datasetId = "<DATASET_ID>";
    const url = `https://developer.api.autodesk.com/sustainability/v3/datasets/${datasetId}/product-epds/list:filter`;
    
    const filterCriteria = {
      filters: {}
    };
    
    fetch(url, {
      method: 'POST',
      headers: {
        'Authorization': `Bearer ${accessToken}`,
        'Content-Type': 'application/json',
        'Accept': 'application/json'
      },
      body: JSON.stringify(filterCriteria)
    })
    .then(response => response.json())
    .then(data => {
      console.log(`Found ${data.results.length} product EPDs:`);
    
     data.results.forEach((epd, index) => {
       console.log(`\nProduct EPD ${index + 1}:`);
       console.log(`  ID: ${epd.id}`);
       console.log(`  Name: ${epd.name}`);
       console.log(`  Jurisdictions: ${(epd.jurisdictions || []).join(', ')}`);
       console.log(`  Date of Issue: ${epd.dateOfIssue || 'N/A'}`);
       console.log(`  Valid Until: ${epd.validUntil || 'N/A'}`);
       console.log(`  Version: ${epd.version || 'N/A'}`);
       console.log(`  Declaration URL: ${epd.declarationUrl || 'N/A'}`);
       console.log(`  Declared Unit: ${epd.declaredUnit?.qty} ${epd.declaredUnit?.unit}`);
       console.log(`  Category IDs: ${(epd.categoryIds || []).join(', ') || 'N/A'}`);
     });
    
      if (data.pagination && data.pagination.nextUrl) {
        console.log(`\nMore results available. Next page: ${data.pagination.nextUrl}`);
      }
    })
    .catch(error => console.error('Error:', error));
    
    Show More
    import requests
    
    access_token = "<YOUR_ACCESS_TOKEN>"
    dataset_id = "<DATASET_ID>"
    url = f"https://developer.api.autodesk.com/sustainability/v3/datasets/{dataset_id}/product-epds/list:filter"
    
    headers = {
        'Authorization': f'Bearer {access_token}',
        'Content-Type': 'application/json',
        'Accept': 'application/json'
    }
    
    filter_data = { "filters": {} }
    
    response = requests.post(url, headers=headers, json=filter_data)
    
    if response.status_code == 200:
        data = response.json()
        print(f"Found {len(data['results'])} product EPDs:")
    
       for index, epd in enumerate(data['results'], 1):
           print(f"\nProduct EPD {index}:")
           print(f"  ID: {epd['id']}")
           print(f"  Name: {epd.get('name', 'N/A')}")
           print(f"  Jurisdictions: {', '.join(epd.get('jurisdictions', []))}")
           print(f"  Date of Issue: {epd.get('dateOfIssue', 'N/A')}")
           print(f"  Valid Until: {epd.get('validUntil', 'N/A')}")
           print(f"  Version: {epd.get('version', 'N/A')}")
           print(f"  Declaration URL: {epd.get('declarationUrl', 'N/A')}")
           du = epd.get('declaredUnit') or {}
           if 'qty' in du and 'unit' in du:
               print(f"  Declared Unit: {du['qty']} {du['unit']}")
           print(f"  Category IDs: {', '.join(epd.get('categoryIds', [])) or 'N/A'}")
    
        if data.get('pagination') and data['pagination'].get('nextUrl'):
            print(f"\nMore results available. Next page: {data['pagination']['nextUrl']}")
    else:
        print(f"Error: {response.status_code} - {response.text}")
    
    Show More
    using System;
    using System.Net.Http;
    using System.Text;
    using System.Threading.Tasks;
    using Newtonsoft.Json;
    
    public class ProductEpdService
    {
        private readonly HttpClient _httpClient;
    
        public ProductEpdService()
        {
            _httpClient = new HttpClient();
        }
    
        public async Task GetProductEpdsAsync(string accessToken, string datasetId)
        {
            string url = $"https://developer.api.autodesk.com/sustainability/v3/datasets/{datasetId}/product-epds/list:filter";
    
            _httpClient.DefaultRequestHeaders.Clear();
            _httpClient.DefaultRequestHeaders.Add("Authorization", $"Bearer {accessToken}");
            _httpClient.DefaultRequestHeaders.Add("Accept", "application/json");
    
            var filterData = new { filters = new { } };
            string jsonContent = JsonConvert.SerializeObject(filterData);
            var content = new StringContent(jsonContent, Encoding.UTF8, "application/json");
    
            try
            {
                HttpResponseMessage response = await _httpClient.PostAsync(url, content);
                response.EnsureSuccessStatusCode();
    
                string responseContent = await response.Content.ReadAsStringAsync();
                dynamic data = JsonConvert.DeserializeObject(responseContent);
    
                Console.WriteLine($"Found {data.results.Count} product EPDs:");
    
               for (int i = 0; i < data.results.Count; i++)
               {
                   var epd = data.results[i];
                   Console.WriteLine($"\nProduct EPD {i + 1}:");
                   Console.WriteLine($"  ID: {epd.id}");
                   Console.WriteLine($"  Name: {epd.name ?? "N/A"}");
                   Console.WriteLine($"  Jurisdictions: {string.Join(", ", epd.jurisdictions ?? new string[]{ })}");
                   Console.WriteLine($"  Date of Issue: {epd.dateOfIssue ?? "N/A"}");
                   Console.WriteLine($"  Valid Until: {epd.validUntil ?? "N/A"}");
                   Console.WriteLine($"  Version: {epd.version ?? "N/A"}");
                   Console.WriteLine($"  Declaration URL: {epd.declarationUrl ?? "N/A"}");
                   if (epd.declaredUnit != null)
                   {
                       Console.WriteLine($"  Declared Unit: {epd.declaredUnit.qty} {epd.declaredUnit.unit}");
                   }
                   Console.WriteLine($"  Category IDs: {string.Join(", ", epd.categoryIds ?? new string[]{})}");
               }
    
                if (data.pagination?.nextUrl != null)
                {
                    Console.WriteLine($"\nMore results available. Next page: {data.pagination.nextUrl}");
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine($"Error: {ex.Message}");
            }
        }
    }
    
    Show More

    Step 2: Understanding the Response

    The response includes EPD metadata and pagination. Use IDs for downstream detail endpoints as they become available.

    Example Response

    {
      "results": [
        {
          "id": "b03dba1dca5b49acb1a5aa4daab546b4",
          "name": "Standard Concrete Block",
          "jurisdictions": ["US-CA", "US-NY"],
          "dateOfIssue": "2023-01-15",
          "validUntil": "2028-01-15",
          "version": "1.0",
          "declarationUrl": "https://example.com/epd/b03dba1dca5b49acb1a5aa4daab546b4",
          "declaredUnit": { "qty": 1, "unit": "m3" },
          "categoryIds": ["cat-masterformat-030000"]
        }
      ],
      "pagination": {
        "offset": 0,
        "limit": 100,
        "totalResults": 150,
        "nextUrl": "https://developer.api.autodesk.com/.../product-epds/list:filter?offset=100&limit=100"
      },
      "appliedFilters": {},
      "ignoredFilters": {}
    }
    
    Show More

    Key Response Fields:

    • results: Array of product EPDs
    • id: Unique identifier for the product EPD
    • name: Display name of the EPD
    • jurisdictions: Regions where the EPD applies (may be empty array)
    • dateOfIssue / validUntil: Validity period (may be null)
    • version: EPD document version (may be null)
    • declarationUrl: Link to the declaration document (may be null)
    • declaredUnit.qty / declaredUnit.unit: Declared unit for measurements
    • categoryIds: Category identifiers for the EPD (required field)
    • pagination: Supports paging large result sets
    • appliedFilters: Map of filter keys to the requested vs. applied filter values (with optional warnings when a value was dropped)
    • appliedFilters.*.requested: The filter value the client asked for (object with op and value)
    • appliedFilters.*.applied: The filter value the connector actually applied (object with op and value)
    • appliedFilters.*.warnings: Optional human-readable notes about values that could not be applied
    • ignoredFilters: Map of unrecognised filter keys to the reason they were ignored
    • ignoredFilters.*.reason: Human-readable explanation of why the filter key was not used

    Step 3: Working with Product EPDs

    Practical Uses:

    • Product discovery and filtering for project needs
    • Validity and jurisdiction checks
    • Building lists for comparison and selection

    Pagination Handling:

    Use pagination.nextUrl to iterate through large collections until it is absent.

    Filtering Notes:

    Filtering is submitted in the request body via filters and may expand over time. For now, sending an empty object returns all results permitted for your dataset.

    Troubleshooting:

    If you encounter any errors while making this request, please refer to the Error Handling section of this guide for detailed information about common error codes and their solutions.