Request

Response

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

    Get Generic Estimate Details

    This task shows you how to retrieve detailed information for a specific generic estimate, including applicability details and technical specifications. Use generic estimate details to understand the underlying data and metadata for environmental impact assessments.

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

    • Call the generic estimate details endpoint for a dataset
    • Understand key fields in a generic estimate (declared unit, jurisdictions, data source information)
    • Use a generic estimate ID from prior results to fetch details

    You use the following operation for this task:

    OperationHTTP Request
    Get Generic Estimate Details GET /v3/datasets/{datasetId}/generic-estimates/details/{genericEstimateId}

    Prerequisites

    Before starting this task, ensure you have:


    Step 1: Call the Generic Estimate Details Endpoint

    Use the access token from Obtain an Access Token, a dataset ID from Get the List of Supported Datasets, and a generic estimate ID from Filter Generic Estimates to retrieve details about a specific generic estimate.

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

    curl -v 'https://developer.api.autodesk.com/sustainability/v3/datasets/<DATASET_ID>/generic-estimates/details/<GENERIC_ESTIMATE_ID>' \
      -H 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \
      -H 'Accept: application/json'
    
    const accessToken = "<YOUR_ACCESS_TOKEN>";
    const datasetId = "<DATASET_ID>";
    const genericEstimateId = "<GENERIC_ESTIMATE_ID>";
    const url = `https://developer.api.autodesk.com/sustainability/v3/datasets/${datasetId}/generic-estimates/details/${genericEstimateId}`;
    
    fetch(url, {
      method: 'GET',
      headers: {
        'Authorization': `Bearer ${accessToken}`,
        'Accept': 'application/json'
      }
    })
    .then(response => response.json())
    .then(data => {
      const estimate = data.genericEstimate;
    
      console.log('=== Generic Estimate Details ===');
      console.log(`ID: ${estimate.id}`);
      console.log(`Name: ${estimate.name}`);
    
      console.log('\n=== Declared Unit ===');
      if (estimate.declaredUnit) {
        console.log(`Quantity: ${estimate.declaredUnit.qty} ${estimate.declaredUnit.unit}`);
      } else {
        console.log('Declared unit not available');
      }
    
      console.log('\n=== Applicability Information ===');
      console.log(`Category IDs: ${(estimate.categoryIds || []).join(', ') || 'N/A'}`);
      console.log(`Jurisdictions: ${(estimate.jurisdictions || []).join(', ') || 'N/A'}`);
      console.log(`Language: ${estimate.language || 'N/A'}`);
    
      console.log('\n=== Data Source Information ===');
      if (estimate.dataSource) {
        console.log(`Name: ${estimate.dataSource.name || 'N/A'}`);
        console.log(`Website: ${estimate.dataSource.url || 'N/A'}`);
      } else {
        console.log('Generic/Industry average data (no specific data source)');
      }
    
      console.log('\n=== Additional Information ===');
      console.log(`Source: ${estimate.source || 'N/A'}`);
      console.log(`Cache Refresh: ${data.cacheRefreshTimestamp || 'N/A'}`);
    })
    .catch(error => console.error('Error:', error));
    
    Show More
    import requests
    
    access_token = "<YOUR_ACCESS_TOKEN>"
    dataset_id = "<DATASET_ID>"
    generic_estimate_id = "<GENERIC_ESTIMATE_ID>"
    url = f"https://developer.api.autodesk.com/sustainability/v3/datasets/{dataset_id}/generic-estimates/details/{generic_estimate_id}"
    
    headers = {
        'Authorization': f'Bearer {access_token}',
        'Accept': 'application/json'
    }
    
    response = requests.get(url, headers=headers)
    
    if response.status_code == 200:
        data = response.json()
        estimate = data['genericEstimate']
    
        print('=== Generic Estimate Details ===')
        print(f"ID: {estimate['id']}")
        print(f"Name: {estimate.get('name', 'N/A')}")
    
        print('\n=== Declared Unit ===')
        declared_unit = estimate.get('declaredUnit')
        if declared_unit and 'qty' in declared_unit and 'unit' in declared_unit:
            print(f"Quantity: {declared_unit['qty']} {declared_unit['unit']}")
        else:
            print('Declared unit not available')
    
        print('\n=== Applicability Information ===')
        category_ids = estimate.get('categoryIds', [])
        print(f"Category IDs: {', '.join(category_ids) if category_ids else 'N/A'}")
        jurisdictions = estimate.get('jurisdictions', [])
        print(f"Jurisdictions: {', '.join(jurisdictions) if jurisdictions else 'N/A'}")
        print(f"Language: {estimate.get('language', 'N/A')}")
    
        print('\n=== Data Source Information ===')
        dataSource = estimate.get('dataSource')
        if dataSource:
            print(f"Name: {dataSource.get('name', 'N/A')}")
            print(f"Website: {dataSource.get('url', 'N/A')}")
        else:
            print('Generic/Industry average data (no specific data source)')
    
        print('\n=== Additional Information ===')
        print(f"Source: {estimate.get('source', 'N/A')}")
        print(f"Cache Refresh: {data.get('cacheRefreshTimestamp', 'N/A')}")
    else:
        print(f"Error: {response.status_code} - {response.text}")
    
    Show More
    using System;
    using System.Net.Http;
    using System.Threading.Tasks;
    using Newtonsoft.Json;
    
    public class GenericEstimateDetailsService
    {
        private readonly HttpClient _httpClient;
    
        public GenericEstimateDetailsService()
        {
            _httpClient = new HttpClient();
        }
    
        public async Task GetGenericEstimateDetailsAsync(string accessToken, string datasetId, string genericEstimateId)
        {
            string url = $"https://developer.api.autodesk.com/sustainability/v3/datasets/{datasetId}/generic-estimates/details/{genericEstimateId}";
    
            _httpClient.DefaultRequestHeaders.Clear();
            _httpClient.DefaultRequestHeaders.Add("Authorization", $"Bearer {accessToken}");
            _httpClient.DefaultRequestHeaders.Add("Accept", "application/json");
    
            try
            {
                HttpResponseMessage response = await _httpClient.GetAsync(url);
                response.EnsureSuccessStatusCode();
    
                string jsonContent = await response.Content.ReadAsStringAsync();
                dynamic data = JsonConvert.DeserializeObject(jsonContent);
    
                var estimate = data.genericEstimate;
    
                Console.WriteLine("=== Generic Estimate Details ===");
                Console.WriteLine($"ID: {estimate.id}");
                Console.WriteLine($"Name: {estimate.name ?? "N/A"}");
    
                Console.WriteLine("\n=== Declared Unit ===");
                if (estimate.declaredUnit != null && estimate.declaredUnit.qty != null && estimate.declaredUnit.unit != null)
                {
                    Console.WriteLine($"Quantity: {estimate.declaredUnit.qty} {estimate.declaredUnit.unit}");
                }
                else
                {
                    Console.WriteLine("Declared unit not available");
                }
    
                Console.WriteLine("\n=== Applicability Information ===");
                string categoryIds = estimate.categoryIds != null ? string.Join(", ", estimate.categoryIds) : "N/A";
                Console.WriteLine($"Category IDs: {categoryIds}");
                string jurisdictions = estimate.jurisdictions != null ? string.Join(", ", estimate.jurisdictions) : "N/A";
                Console.WriteLine($"Jurisdictions: {jurisdictions}");
                Console.WriteLine($"Language: {estimate.language ?? "N/A"}");
    
                Console.WriteLine("\n=== Data Source Information ===");
                if (estimate.dataSource != null)
                {
                    Console.WriteLine($"Name: {estimate.dataSource.name ?? "N/A"}");
                    Console.WriteLine($"Website: {estimate.dataSource.url ?? "N/A"}");
                }
                else
                {
                    Console.WriteLine("Generic/Industry average data (no specific data source)");
                }
    
                Console.WriteLine("\n=== Additional Information ===");
                Console.WriteLine($"Source: {estimate.source ?? "N/A"}");
                Console.WriteLine($"Cache Refresh: {data.cacheRefreshTimestamp ?? "N/A"}");
            }
            catch (Exception ex)
            {
                Console.WriteLine($"Error: {ex.Message}");
            }
        }
    }
    
    Show More

    Step 2: Understanding the Response

    The response returns a genericEstimate object with key fields including identification, applicability, and data source information.

    Example Response

    {
      "genericEstimate": {
        "id": "ge-550e8400-e29b-41d4-a716-446655440000",
        "name": "Ready-Mix Concrete, 4000 psi",
        "categoryIds": [
          "Concrete",
          "Steel"
        ],
        "declaredUnit": {
          "qty": 1,
          "unit": "m3"
        },
        "jurisdictions": [
          "US",
          "CA"
        ],
        "dataSource": {
          "name": "Acme Materials Inc.",
          "url": "https://www.example.com"
        },
        "language": "en",
        "source": "Internal LCIA"
      },
      "cacheRefreshTimestamp": "2021-06-01T00:00:00Z"
    }
    
    Show More

    Key Response Fields:

    • genericEstimate.id: Unique identifier for the generic estimate
    • genericEstimate.name: Display name of the generic estimate
    • genericEstimate.categoryIds: Array of category identifiers (empty array if none specified)
    • genericEstimate.declaredUnit: Functional unit for all measurements (object with qty and unit)
    • genericEstimate.declaredUnit.qty: Quantity value for the declared unit
    • genericEstimate.declaredUnit.unit: Unit of measurement for the declared unit
    • genericEstimate.jurisdictions: Geographic regions where the estimate applies (empty array if none specified)
    • genericEstimate.dataSource: Data source information (null if generic/industry average data)
    • genericEstimate.dataSource.name: Name of the data source
    • genericEstimate.dataSource.url: Website URL of the data source
    • genericEstimate.language: Language code for the generic estimate content (ISO 639-1)
    • genericEstimate.source: URL to the original generic estimate resource or documentation
    • cacheRefreshTimestamp: ISO UTC timestamp indicating when data was last retrieved from the provider and cached (null if data was not cached)

    Practical Uses:

    • Validate generic estimate selection for preliminary analysis
    • Check applicability (jurisdictions, categories) for your project requirements
    • Identify whether data is data source-specific or industry average
    • Access source documentation for audit trails

    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.


    Step 3: Working with Generic Estimate Details

    Understanding Data Source Information:

    • If dataSource is null, the generic estimate represents industry average or generic data
    • If dataSource is present, the estimate is specific to that data source’s products

    Regional Applicability:

    • Check jurisdictions to ensure the estimate is applicable to your project region
    • An empty jurisdictions array may indicate global applicability or unspecified coverage

    Category Context:

    • Use categoryIds to understand what material or product categories this estimate applies to
    • Empty categoryIds arrays may indicate broad or uncategorized estimates

    Data Source and Freshness:

    • Use source to access original documentation for detailed analysis
    • Check cacheRefreshTimestamp to assess data freshness
    • A null timestamp indicates data was retrieved directly from the provider (not cached)

    Next Steps:

    In the next task, you’ll learn how to retrieve the list of industry-specific EPDs, which provide sector-average environmental impact data: Get Industry EPD Filters.

    Common Issues:

    • 404 Not Found: Verify the generic estimate ID is correct and exists in the specified dataset
    • Access Token Expired: If you get authentication errors, you may need to refresh your access token from Obtain an Access Token
    • Null Values: Some fields may be null depending on data availability from the provider