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

# Get Materials

Use this endpoint to search the BOM (Bill of Materials) material catalog. This returns the materials available for use in product compositions, including both default PIC materials and any MSI-linked custom materials.

### Request body params

| Name         | Type            | Description                                                        |
| :----------- | :-------------- | :----------------------------------------------------------------- |
| `textSearch` | `string`        | Search materials by name.                                          |
| `ids`        | `Array<string>` | Filter by specific material IDs.                                   |
| `from`       | `number`        | **\[DEFAULT: 0]** Pagination start index.                          |
| `size`       | `number`        | **\[DEFAULT: 50]** Number of results to return (max 50).           |
| `sort`       | `object`        | Sorting configuration `{ field: string, order: "asc" \| "desc" }`. |

### Implementation Details

* **Pagination**: Maximum page size is capped at 50 results.
* **Material types**: Results include both default PIC materials and custom MSI materials that have been imported into your account.


## OpenAPI

````yaml api-reference/openapi/french-eco.json POST /materials/search
openapi: 3.0.0
info:
  title: pic-api
  version: 1.0.0
servers:
  - url: https://api-v2.production.higg.org/pic-api/v1
    description: Production
  - url: https://api-v2.demo.higg.org/pic-api/v1
    description: Demo
security:
  - sec0: []
    sec1: []
paths:
  /materials/search:
    post:
      summary: Get Materials
      operationId: GetMaterials
      requestBody:
        $ref: '#/components/requestBodies/CorpRepApiSearchRequest'
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/CorpReportApiPaginatedResponseCorpRepMaterialsLightResponse
components:
  requestBodies:
    CorpRepApiSearchRequest:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CorpRepApiSearchRequest'
      required: true
  schemas:
    CorpReportApiPaginatedResponseCorpRepMaterialsLightResponse:
      description: API Search responses
      properties:
        from:
          type: number
          format: double
        size:
          type: number
          format: double
        total:
          type: number
          format: double
        results:
          items:
            $ref: '#/components/schemas/CorpRepMaterialsLightResponse'
          type: array
      required:
        - from
        - results
        - size
        - total
      type: object
      additionalProperties: false
    CorpRepApiSearchRequest:
      properties:
        from:
          type: number
          format: double
          nullable: true
        size:
          type: number
          format: double
          nullable: true
        ids:
          items:
            type: string
          type: array
          nullable: true
        sort:
          $ref: '#/components/schemas/SortType'
        textSearch:
          type: string
          nullable: true
      type: object
      additionalProperties: false
    CorpRepMaterialsLightResponse:
      properties:
        _id:
          type: string
        name:
          type: string
        type:
          type: string
        materialMsiId:
          type: string
          nullable: true
        version:
          type: string
        description:
          type: string
        isSelected:
          type: boolean
          nullable: true
        code:
          type: string
          nullable: true
        dataSource:
          type: string
        isCustomMaterial:
          type: boolean
        imported:
          type: boolean
      required:
        - _id
        - dataSource
        - description
        - imported
        - isCustomMaterial
        - name
        - type
        - version
      type: object
      additionalProperties: false
    SortType:
      description: API Search requests
      properties:
        field:
          type: string
        order:
          type: string
          enum:
            - asc
            - desc
      required:
        - field
        - order
      type: object
      additionalProperties: false
  securitySchemes:
    sec0:
      type: apiKey
      in: header
      name: x-api-key
    sec1:
      type: apiKey
      in: header
      name: x-developer-request-token

````