> ## Documentation Index
> Fetch the complete documentation index at: https://developer.worldly.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Facility Data Manager - Data Dictionary

Facility data manager from Worldly provides monthly details about a factory's production volume, energy, water, waste, wastewater and air emissions.

Each month of data is provided as a unique assessment. To make accessing different types of data more efficient, these APIs allow you to construct queries for selected assessments or groups of assessments, and also to specify which data elements are returned to you.

Below are the primary categories of data that are available.

## Assessment Metadata

| Field              | Description                                                                                                                                                                                                                                                                                                                                 | Type      |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- |
| id                 | The unique identifier for the assessment (ex. dctsurvey:64775c17-fb48-444c-b9d4-fcb4ca9ecb0e)                                                                                                                                                                                                                                               | string    |
| statusHistory      | Array of dates for the most status transition for status                                                                                                                                                                                                                                                                                    | array     |
| status             | The current status for the assessment — NS, ASI, ASC, VRP, VRQ, VRE, VRC, VRF, VRD, VRI, ASD                                                                                                                                                                                                                                                | string    |
| version            | The type and version of the assessment. In this case, the version will always be "dct".                                                                                                                                                                                                                                                     | string    |
| accountId          | The UUID of the account that owns the assessment                                                                                                                                                                                                                                                                                            | string    |
| accountName        | The name of the account that owns the assessment                                                                                                                                                                                                                                                                                            | string    |
| sacId              | The short ID (Higg/Worldly ID) of the account that owns the assessment                                                                                                                                                                                                                                                                      | string    |
| country            | The name of the country in which the account is located                                                                                                                                                                                                                                                                                     | string    |
| selfPosted         | Indicates if the self-assessment has been completed and posted                                                                                                                                                                                                                                                                              | Boolean   |
| verifiedPosted     | Indicates if the verified-assessment has been completed and posted                                                                                                                                                                                                                                                                          | Boolean   |
| verified           | Indicates if verification is enabled as an option for the assessment                                                                                                                                                                                                                                                                        | Boolean   |
| createdOn          | The unix timestamp when the assessment was created in Worldly                                                                                                                                                                                                                                                                               | timestamp |
| lastUpdated        | The unix timestamp when the assessment was last updated                                                                                                                                                                                                                                                                                     | timestamp |
| location           | An array of location attributes, such as address, placeid, and lat/long                                                                                                                                                                                                                                                                     | array     |
| oarId              | Optional open supply hub identifier for the account that owns the assessment                                                                                                                                                                                                                                                                | string    |
| ffcId              | Optional FFC id for the account that owns the assessment                                                                                                                                                                                                                                                                                    | string    |
| taxId              | Optional tax identifier for the account that owns the assessment                                                                                                                                                                                                                                                                            | string    |
| socialCreditId     | Optional Chinese social credit id for the account that owns the assessment                                                                                                                                                                                                                                                                  | string    |
| customId           | Optional custom identifier for the account that owns the assessment, as provided by the account who the assessment has been shared with                                                                                                                                                                                                     | string    |
| parentCompanyId    | The UUID of the account that is identified as the parent to the account that owns the assessment                                                                                                                                                                                                                                            | string    |
| parentCompanyName  | The name of the parent company account                                                                                                                                                                                                                                                                                                      | string    |
| parentCompanySacId | The short ID of the parent company account                                                                                                                                                                                                                                                                                                  | string    |
| tags               | An array of custom text strings for the assessment, as provided by the account who the assessment has been shared with                                                                                                                                                                                                                      | array     |
| statusNotes        |                                                                                                                                                                                                                                                                                                                                             | string    |
| verifierBodyName   | The name of the verifier company                                                                                                                                                                                                                                                                                                            | string    |
| verifierType       | The type of verification                                                                                                                                                                                                                                                                                                                    | string    |
| verifierStartDate  | The date on which verification started                                                                                                                                                                                                                                                                                                      | date      |
| verifierEndDate    | The date on which verification ended                                                                                                                                                                                                                                                                                                        | date      |
| factorydataname    | The name of the assessment submission. The name is auto-generated and reflects the month and year corresponding with the reporting period covered by the submission. (ex: "Dec 2023"). In the event that there are multiple submissions for the same calendar month, these are incremented with an integer (ex. "Dec 2023 1", "Dec 2023 2". | string    |
| dctVersion         | The specific version of the assessment. Generally anything prior to May 2024 will be version 1.0.0.                                                                                                                                                                                                                                         | string    |
| questions          | An array of all the question responses for the entire assessment.                                                                                                                                                                                                                                                                           | array     |
| calculations       | An array of the calculated results.                                                                                                                                                                                                                                                                                                         | array     |

## Questions

This key can be used in the body of the API request to retrieve the raw responses to any and all questions contained in the assessment.

```json All theme={null}
{
    "include": [
        "questions"
    ],
    "from": 0,
    "size": 1
}
```

```json Specific Questions theme={null}
{
    "include": [
        "questions.reportingmonth",
        "questions.reportingyear",
        "questions.report_sections",
        "questions.sitecountry",
        "questions.sipfacilitytype",
        "questions.reportingmonth",
        "questions.ensourcefacility"
    ],
    "dctVersion": "2.0.0",
    "from": 0,
    "size": 1
}
```

Supported subcategories:

```
questions >> top of hierarchy, so would return ALL questions
questions.reporting
questions.site
questions.production
questions.energy
question.energy.purchased
questions.energy.biomass
questions.water
questions.wastewater
questions.waste
questions.air
```

***

To tailor data collection to each facility, the system requires some initial information about the characteristics of the facility. While this information can be modified with each submission to account for changes in facility operations over time, for most facilities this is a one-time data-entry activity during their first data submission. Thereafter, each submission is focused on the critical quantitative data for that reporting period, since the facility setup information is pre-populated.

### Site

This is the general information that is collected in this section:

* Country in which the facility is located
* Primary types of manufacturing activities at the location
* Categories of products and materials produced at the location
* The industry and sector for the types of products the facility produces
* The sources of energy used at the location
* The sources of water used at the location
* The types of waste generated at the location (hazardous and non-hazardous)
* The types of refrigerants used at the location
* The types of facility and manufacturing processes in use at the location
* Information about if the location has a valid operating license
* Information about any environmental permits that are required for the location
* The types of wastewater treatment in use at the location
* The general types of chemicals used at the location

### Reporting Details

Based on the setup information about the facility and its operations, the system automatically configures the necessary fields for ongoing quantitative data collection.

For each monthly submission, the number of operating days and the number of employees are required.

The facility then selects which types of additional data will be reported for the month.

* Production Volume
* Energy
* Water
* Wastewater
* Waste
* Air

Similar to the overall site information, these selections are saved as a default, or can be modified as needed for each month.

### Production Volume

For each major facility type that was selected during setup, the facility will enter the quantity produced and the unit of measure. The unit of measure is pieces/pairs for finished product assembly, and weight in kg for all other types.

### Energy

The energy section is dynamic based on the sources of energy used at the facility. Usage can be separately reported between domestic use, production processes, and company-owned vehicles.

If the facility is reporting energy, they will submit the quantities used for each source. The system provides pre-configured options for the units of measure for each source for standardization and data quality.

Purchased electricity can be reported down to the level of individual meters, if available.

### Water

The water section is dynamic based on the sources of water used at the facility. Usage can also be separately reported between domestic and production use.

If the facility is reporting water, they will submit the quantities for each source. The system provides pre-configured options for the units of measure for each source for standardization and data quality.

Water use can be reported down to the level of individual meters, if available.

### Wastewater

Wastewater generation can be reported separately between industrial and domestic.

If the facility is reporting wastewater, they will submit the quantities industrial, domestic, or combined wastewater in cubic meters (m3).

### Waste

Waste can be reported separately between hazardous and non-hazardous.

If the facility is reporting waste, they will submit the quantities for each source, as well as the disposal method. The system provides pre-configured options for the units of measure for each source for standardization and data quality.

### Air Emissions

Air emissions can be reported for specific refrigerants.

If the facility is reporting air emissions, they will submit the quantities for each refrigerant used. The system provides pre-configured options for the units of measure for each source for standardization and data quality.

## Calculations

This key can be used in the body of the API request to retrieve any and all of the calculated outputs from the assessment.

```json All theme={null}
{
    "include": [
        "calculations" //all calculations
    ],
    "dctVersion": "2.0.0",
    "from": 0,
    "size": 1
}
```

```json Purchased Energy theme={null}
{
    "include": [
        "calculations.energy.purchased" //all calculated results for purchased energy sources
    ],
    "dctVersion": "2.0.0",
    "from": 0,
    "size": 1
}
```

```json Specific Calculations theme={null}
{
    "include": [
        "calculations.ensourcematerialProductionelectricpurch_totaluse_mj" //the total energy for purchased electricity used for production processes
        "calculations.ensourcematerialProductionelectricpurch_totaluse_kgco2e" //the total GHGs for purchased electricity used for production processes
    ],
    "dctVersion": "2.0.0",
    "from": 0,
    "size": 1
}
```

Supported subcategories:

```
calculations >> top of hierarchy, so would return ALL calculations 
calculations.ghg
calculations.energy
calculations.energy.purchased
calculations.energy.renewable
calculations.energy.biomass
calculations.energy.nonRenewable
calculations.water
calculations.wastewater
calculations.waste
calculations.air
```

## Performance

This key can be used in the body of the API request to retrieve the best available data (validated or self), common units of measure  (MJ, L), and simplified and readable column names.

```json All theme={null}
{
    "include": [
        "performance" 
    ],
    "from": 0,
    "size": 10
}
```

```json Purchased Energy theme={null}
{
    "include": [
        "calculations.energy.purchased" //all calculated results for purchased energy sources
    ],
    "dctVersion": "2.0.0",
    "from": 0,
    "size": 1
}
```

```json Specific Calculations theme={null}
{
    "include": [
        "calculations.ensourcematerialProductionelectricpurch_totaluse_mj" //the total energy for purchased electricity used for production processes
        "calculations.ensourcematerialProductionelectricpurch_totaluse_kgco2e" //the total GHGs for purchased electricity used for production processes
    ],
    "dctVersion": "2.0.0",
    "from": 0,
    "size": 1
}
```

## Allocations

This key will include the production allocation and MJ impact for your specific brand for each FDM submission . Allocation data is proprietary information - your allocated portion will never be seen by another brand.

```json All theme={null}
{
    "include": [
        "allocations" 
    ],
    "from": 0,
    "size": 10
}
```

```json Purchased Energy theme={null}
{
    "include": [
        "calculations.energy.purchased" //all calculated results for purchased energy sources
    ],
    "dctVersion": "2.0.0",
    "from": 0,
    "size": 1
}
```

```json Specific Calculations theme={null}
{
    "include": [
        "calculations.ensourcematerialProductionelectricpurch_totaluse_mj" //the total energy for purchased electricity used for production processes
        "calculations.ensourcematerialProductionelectricpurch_totaluse_kgco2e" //the total GHGs for purchased electricity used for production processes
    ],
    "dctVersion": "2.0.0",
    "from": 0,
    "size": 1
}
```

***

The system automatically calculates impacts based on the data submitted by factories for analysis, insights, and reduction target tracking.

* Energy usage is available in megajoules (MJ)
* Energy use intensity is available in megaJoules per unit of production
* Energy and Air Emissions impacts are available in GHGs (kgCO2e)
* Water usage and Wastewater generated are available in liters (L)
* Waste generated is available in kilograms (KG)

## Example Data

Here is an example request and response from the module-data endpoint for a single monthly submission, with ALL available data.

### Request

```json theme={null}
curl --request POST \
     --url https://api-v2.production.higg.org/api/v1/moduledata/dct \
     --header 'Accept: application/json' \
     --header 'Content-Type: application/json' \
     --header 'x-api-key: <<apiKey>>'
     --header 'x-developer-request-token: <<apiKey>>'
     -d '{
    "include": [
        "questions",
        "calculations",
    ],
    "assessmentIds": ["dctsurvey:07c63d76-064c-4ba8-835b-e04aaaf9b4dc"],
    "from": 0,
    "size":1
}'
```
