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

# FEM - Module Data

## Specify what data fields to return (include)

```json theme={null}
"include": [
        "performance",
        "focus_areas"
    ],
```

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

  * `questions` will return [ALL indicators](/data-dictionary/fem). This can be VERY large. Indicator names are same as in bulk CSV and prefixed by 'questions.'
    * For FEM2023, questions be also be retrieved for whole sections. For example, `"questions.ems"`would return all of the questions in the EMS section.
  * `performance` will return all indicators in the [performance dataset](/data-dictionary/fem#performance)
  * `scores` will return all total, section, and subsection level [scores](/data-dictionary/fem#scores)
  * `ghg` will return all calculated [greenhouse gas emissions](/data-dictionary/fem#ghgs-greenhouse-gases)
  * `usage` will return all quantitative [resource usage metrics](/data-dictionary/fem#resource-usage)
  * `focus_areas` will return all indicators grouped in [critical risks and areas of opportunity](/data-dictionary/fem#focus-areas)
</Note>

Note that this be limited down to individual indicators.

<Card title="Limit response data to only include specific results" icon="book-open" href="/recipes/limit-response-specific-results">View recipe</Card>

## Specify which records to return (query)

```json Example json request for a combination of query parameters theme={null}
"filters":[
   { "field": "version", "operator": "contains", "value": ["fem2020"]},
   { "field": "performance.total_fem_score", "operator": "gte", "value": 60}
   ],
"sort": [
   { "field": "created_on", "value": "desc" }
   ],
"accountIds": ["5310","8e9ac94b-5e25-48fb-b889-0b0db4e15de5"],
"from": 0,
"size": 1
```

<Note title="version">
  Specify a single module category of data to retrieve (`fem2017` / `fem2018` / `fem2019` / `fem2020` / `fem2021`/ `fem2022` / `fem2023`)
</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="performance">
  Use the filters array to query for performance data with specific field values. This is an "and" query that supports the following operators: `contains`, `startswith`, `noteq`, `eq`, `lte`, `gte`, `gt`, `lt`. Fields are identified by `performance.field_id`.

  For example, this would query for any FEM2020 where the `total_fem_score` is greater than or equal to 60.\
  `"filters":[         { "field": "version", "operator": "contains", "value": ["fem2020"]},         { "field": "performance.total_fem_score", "operator": "gte", "value": 60}
           ]`
</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="lastActivityDate">
  Filter for records that have been shared with your account, or updated, 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 /fem
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:
  /fem:
    post:
      operationId: ModuleCsvFem
      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

````