> ## 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.

# DCT - Module Data

> Returns CSV-format module data for DCT assessments. This endpoint is not yet in the upstream Swagger.

## Overview

This endpoint can be used to retrieve any of the monthly data submissions from facilities that are shared with you on Worldly. For additional details about what kinds of data are included, see more at [the data dictionary](/data-dictionary/factory).

This endpoint is paginated for performance purposes and returns each submission in JSON.

This endpoint supports a variety of query and include options, outlined below.

## Specify what data fields to return (include)

<Note title="Include Options">
  Specify an array of which groups of indicators to retrieve for an assessment.

  * `questions` will return [ALL questions](/data-dictionary/factory#questions). Can be narrowed to questions by section.
  * `calculations` will return all quantitative [calculations](/data-dictionary/factory#calculations). Can be narrowed to calculation by section.
  * `performance`will include the best available submission data (validated or self-submitted), common unit conversions (e.g., MJ, L), and GHG emissions for the key sources and totals.
  * `allocations`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.
</Note>

Note that this can also be limited down to individual indicators.

```json Example Include Statement theme={null}
"include": [
        "questions.site",
        "calculations.ghg.ensourceelectricpurchtotalghg"
    ],
```

## Specify which records to return (query)

<Note title="reportingPeriodStart and reportingPeriodEnd">
  Timestamps in unix time for the reporting month and reporting year.

  For example, to retrieve assessments for the period Jan - Mar 2024:

  `"reportingPeriodStart": 1704096000,
     "reportingPeriodEnd": 1711954800,`
</Note>

<Note title="version">
  Like FSLM, this does not have a fixed cadence so the version is always `dct`
</Note>

<Note title="dctVersion">
  Assessments from the pilot period in 2023 were version `1.0`. The current version is `2.0`.
</Note>

<Note title="status">
  An array of assessment statuses to query for.
</Note>

<Note title="verified">
  Boolean filter for verified (true) or unverified (false) assessments
</Note>

<Note title="accountIds">
  Specify an array of account identifiers to retrieve assessments for. The following Worldly account identifiers are supported as being queryable: `sacId` (0-6 digit number auto-assigned to every Worldly account), `accountId` (longer UUID auto-assigned to every Worldly account), `oarId` (15-character unique identifier assigned to each facility in the [Open Supply Hub](https://info.opensupplyhub.org/)), `ffcId` (a unique identifier assigned to every user on the Fair Factories Clearinghouse platform; numeric and no longer than 9 digits) `taxId` (a government issued tax identifier), `socialCreditId` (a state-issued identifier in China), `customId` (a custom identifier that can be assigned to another Worldly account, only visible to the author).

  For example:\
  `"accountIds": ["accountId","sacID","oarID","ffcId","taxId","socialCreditId","customId"]`
</Note>

<Note title="assessmentIds">
  Specify an array of specific assessments to retrieve data from. If not specified, retrieves all assessments of specified `rfi_pid` (subject to other query specifiers). Note that this can have unintuitive side-effects if you specify assessment ID's that do not come from the specified Account ID's.
</Note>

<Note title="lastUpdated">
  Filter for records that have been updated since the provided timestamp. Timestamp must be in unix time in milliseconds.
</Note>

<Note title="lastStatusChange">
  Filter for records that have changed status since the provided timestamp. Timestamp must be in unix time in milliseconds
</Note>

<Note title="from">
  Integer value of where to start the window of results. If not specified, defaults to 0.
</Note>

<Note title="size">
  Integer value of how many results to return. If not specified, defaults to 10.\
  **Note: Maximum number of results returned is 30.**
</Note>

## Sort the responses

<Note title="created_on">
  Sort the returned data by the date on which the assessment was created. Supports `ASC` and `DESC`.

  Example: `"sort": [{ "field": "created_on", "value": "desc" }],`
</Note>


## OpenAPI

````yaml api-reference/openapi/module-data.json POST /dct
openapi: 3.0.0
info:
  title: module-csv
  version: 1.0.0
servers:
  - url: https://api-v2.production.higg.org/api/v1/modulecsv
    description: Production
  - url: https://api-v2.demo.higg.org/api/v1/modulecsv
    description: Demo
security:
  - sec0: []
    sec1: []
paths:
  /dct:
    post:
      summary: DCT - Get Module CSV Data
      description: >-
        Returns CSV-format module data for DCT assessments. This endpoint is not
        yet in the upstream Swagger.
      operationId: GetModuleCsvData-dct
      requestBody:
        $ref: '#/components/requestBodies/QueryObject'
      responses:
        '204':
          description: No content
components:
  requestBodies:
    QueryObject:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/QueryObject'
  schemas:
    QueryObject:
      properties:
        from:
          type: number
          format: double
          nullable: true
        size:
          type: number
          format: double
          nullable: true
        oarIds:
          items:
            type: string
          type: array
          nullable: true
        assessmentIds:
          items:
            type: string
          type: array
          nullable: true
        accountIds:
          items:
            type: string
          type: array
          nullable: true
        accountSacIds:
          items:
            type: string
          type: array
          nullable: true
        version:
          $ref: '#/components/schemas/AssessmentRfiPid'
        status:
          items:
            $ref: '#/components/schemas/AssessmentStatus'
          type: array
          nullable: true
        verified:
          type: boolean
          nullable: true
        include:
          items:
            type: string
          type: array
          nullable: true
        lastUpdated:
          type: number
          format: double
          nullable: true
        lastActivityDate:
          type: number
          format: double
          nullable: true
        lastStatusChange:
          type: number
          format: double
          nullable: true
        lastASCStatusDate:
          type: number
          format: double
          nullable: true
        greaterThanYear:
          type: number
          format: double
          nullable: true
        cafVersion:
          $ref: '#/components/schemas/CAFVersion'
        dctVersion:
          type: string
          nullable: true
        filters:
          items:
            $ref: '#/components/schemas/KendoFilterFilter'
          type: array
          nullable: true
        nextPage:
          type: string
          nullable: true
        facilityPosted:
          type: boolean
          nullable: true
        sipfacilitytype:
          items:
            type: string
          type: array
          nullable: true
        sort:
          items:
            $ref: '#/components/schemas/QueryObjectSort'
          type: array
          nullable: true
        verificationPosted:
          type: number
          format: double
          nullable: true
        rfi_pid:
          $ref: '#/components/schemas/AssessmentRfiPid'
        wildcardSearch:
          properties:
            sacId:
              type: string
            accountName:
              type: string
            oarId:
              type: string
            tags:
              type: string
            accountId:
              type: string
            customId:
              type: string
            ffcId:
              type: string
          type: object
          nullable: true
        reportingPeriodStart:
          type: number
          format: double
          nullable: true
        reportingPeriodEnd:
          type: number
          format: double
          nullable: true
        isBaseMaterialFilter:
          type: boolean
          nullable: true
      type: object
      additionalProperties: false
    AssessmentRfiPid:
      description: >-
        This interface was referenced by `Exports`'s JSON-Schema via the
        `definition` "assessmentRfiPid".
      enum:
        - fem2017
        - fem2018
        - fem2019
        - fem2020
        - fem2021
        - fem2022
        - fem2023
        - fem2024
        - fem2025
        - fem2026
        - fslm
        - brm2019
        - brm2020
        - brm2021
        - brm2022
        - brm2023
        - brm2024
        - brm2025
        - dct
        - one2022
        - ffc
      type: string
    AssessmentStatus:
      description: >-
        This interface was referenced by `Exports`'s JSON-Schema via the
        `definition` "assessmentStatus".
      enum:
        - NS
        - ASI
        - ASC
        - VRP
        - VRQ
        - VRE
        - VRC
        - VRD
        - VRF
        - VRI
        - ASD
      type: string
    CAFVersion:
      enum:
        - '2.0'
        - '1.7'
        - '1.6'
        - '1.5'
        - '1.4'
        - '1.3'
      type: string
    KendoFilterFilter:
      properties:
        field:
          type: string
        operator:
          type: string
        value:
          type: object
      required:
        - field
        - operator
        - value
      type: object
      additionalProperties: false
    QueryObjectSort:
      properties:
        field:
          type: string
        value:
          $ref: '#/components/schemas/SortQueryObject'
      required:
        - field
        - value
      type: object
      additionalProperties: false
    SortQueryObject:
      enum:
        - asc
        - desc
      type: string
  securitySchemes:
    sec0:
      type: apiKey
      in: header
      name: x-api-key
    sec1:
      type: apiKey
      in: header
      name: x-developer-request-token

````