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

# PM Search Products

## Introduction

The Higg PM API is a JSON query API. All parameters are sent as JSON.

The API can be used to download the full account dataset for processing in the third-party system, or the API can be queried on a number of useful parameters to bring back impacts for specific products.

## Search parameters

To return all product data in the account, remove all the search parameters and use \{}. All products will be returned.

The following attributes can optionally be used to query the API.  The products that meet *all* entered criteria will be returned.
See [PM Data Dictionary--Metadata](/data-dictionary/pm) for details about each search parameter.

• Product status
• Product Higg ID
• Product name
• Product type
• Product category
• Created and edited dates
• Product style/model number
• Product barcode (UPC/EAN)
• Account Higg ID (higgID)
• from
• size

To control the number of results returned and loop through the products, you can use the from and size fields. The 'from' field tells the system which position to pull from. Note that the system starts at position 0.  The 'size' determines how many products to return.

```json search parameters theme={null}
{
    "ids":["5f29dc8b5c0f7b000ade8799"],
    "name": "test product",
    "status": true,
    "productType": "Apparel",
    "productCategory": "ApparelAccessory",
    "createdAfter": "2021-01-13T16:38:19.386Z",
    "createdBefore": "2021-08-14T20:38:19.386Z",
    "lastEditedAfter": "2021-01-13T16:38:19.386Z",
    "lastEditedBefore": "2021-12-13T20:38:19.386Z",
    "platformModifiedBy": "User",
    "platformCreatedBy": "Api",
    "productStyleNumber": "test5",
    ""barcodes": ["xyz"],
    "from",
    "size"
}
```

## Search Results

The following metadata about the product is returned in the results.

```json Metadata results theme={null}
"_id": "612eaabf22cedb000a3d14ad",
            "user": {
                "_id": "5dd466601e5f78220d7a69d6",
                "email": "jane.doe@higg.com"
            },
            "account": {
                "_id": "5dd466221e5f78000d7a69d7",
                "name": "Testing account",
                "country": "United States",
                "sacId": 132188,
                "demoaccount": false
            },
            "created_on": 1630448319256,
            "name": "Example test product",
            "modelNumber": "",
            "productType": "Apparel",
            "productCategory": "TShirt",
            "last_edit": 1630450744602,
            "platformModifiedBy": "User",
            "platformCreatedBy": "Api",
            "draft": true,
            "grossWeight": 2.25332,
            "bomNetWeight": 1.6,
            "productNetWeight": 1.85332,
             "barcodes": [
                "xyz"
            ]
```

Additionally the current PM version and date of last update will be returned at the bottom of every JSON response when searching for products

```json Version metadata theme={null}
"pmVersionType": {
    "date": "1662725746475",
    "version": "1.0"
}
```

## Total Product Impacts

The PM API search results return the total product impacts per use and absolute.

"totalPerUseImpacts" are the total product per use impacts.
"scores" are the absolute total product impacts.
"scoresTotalAltProductCare" are the absolute total product impacts using alternative product care. Note these are to help inform brands internally and should not be communicated externally to consumer or other businesses.

```json Absolute total product impacts theme={null}
{
            "scores": {
                "globalWarming": 17.00552806947533,
                "eutrophication": 0.04490413020684799,
                "waterScarcity": 3.350377456618022,
                "abioticDepletion": 325.58721155299037,
                "chemistry": 30.92107462194431,
                "waterConsumption": 86.97061302988197,
                "biogenicCarbon": 0
            },
           
}
```

```json Per use total product impacts theme={null}
"totalPerUseImpacts": {
                "globalWarming": 130.18521594528613,
                "eutrophication": 1.194459802114799,
                "waterScarcity": 74.71715837496521,
                "abioticDepletion": 1539.567828840265,
                "chemistry": 109.12433090092219,
                "waterConsumption": 1759.051660403852,
                "biogenicCarbon": 2.024901411397592
            }
```

```json Alternative Care total product impacts theme={null}
"scoresTotalAltProductCare": {
                "globalWarming": 47.53533822286248,
                "eutrophication": 0.08779177591962424,
                "waterScarcity": 282.2718444562073,
                "abioticDepletion": 527.518912034761,
                "chemistry": 52.670388183469775,
                "waterConsumption": 6473.445153545468,
                "biogenicCarbon": 1.4111983841999505
            },
```

## Stage-level Impacts

The PM API search results returns stage-level impacts per use and absolute.

```json Absolute stage-level impacts theme={null}
"billOfMaterialScores": {
                "globalWarming": 11.732764922188688,
                "eutrophication": 0.003216399161594669,
                "waterScarcity": 2.3474478513545707,
                "abioticDepletion": 281.24726972194765,
                "chemistry": 30.122780552033078,
                "waterConsumption": 68.48564436810128,
                "biogenicCarbon": 0
            },
            "finishedGoodsScores": {
                "globalWarming": 1.9215341078304655,
                "eutrophication": 0.0006229270214909142,
                "waterScarcity": 0.5363360432687502,
                "abioticDepletion": 19.514429145767682,
                "chemistry": 0,
                "waterConsumption": 13.91569269299723,
                "biogenicCarbon": 0
            },
            "logisticsImpacts": {
                "globalWarming": 0.838880067843403,
                "eutrophication": 0.03977490018001727,
                "waterScarcity": 0.1163813165394288,
                "abioticDepletion": 13.786387684232707,
                "chemistry": 0.7982940699112335,
                "waterConsumption": 2.5314787183833287,
                "biogenicCarbon": 0
            },
            "packagingImpacts": {
                "globalWarming": 0,
                "eutrophication": 0,
                "waterScarcity": 0,
                "abioticDepletion": 0,
                "chemistry": 0,
                "waterConsumption": 0,
                "biogenicCarbon": 0
            },
            "productCareImpacts": {
                "globalWarming": 0,
                "eutrophication": 0,
                "waterScarcity": 0,
                "abioticDepletion": 0,
                "chemistry": 0,
                "waterConsumption": 0,
                "biogenicCarbon": 0
            },
            "endOfUseImpacts": {
                "globalWarming": 1.6541450138405167,
                "eutrophication": 0.0010362470360445418,
                "waterScarcity": 0.09150923745223283,
                "abioticDepletion": 0.7946305758184823,
                "chemistry": 0,
                "waterConsumption": 2.03779725040015,
                "biogenicCarbon": 0
            },
            "retailImpacts": {
                "globalWarming": 0.8582039577722553,
                "eutrophication": 0.00025365680770059765,
                "waterScarcity": 0.25870300800303925,
                "abioticDepletion": 10.24449442522385,
                "chemistry": 0,
                "waterConsumption": 0,
                "biogenicCarbon": 0
            }
```

```json Per use stage-level impacts theme={null}
"bomPerUseImpacts": {
                "globalWarming": 0.2962974086547749,
                "eutrophication": 0.000532286573427765,
                "waterScarcity": 3.940036494275986,
                "abioticDepletion": 3.1033405598575405,
                "chemistry": 0.727237818976231,
                "waterConsumption": 89.79602762482553,
                "biogenicCarbon": 0.019872050982260688
            },
            "finishedPerUseImpacts": {
                "globalWarming": 0.004488005757887788,
                "eutrophication": 0.000002739046718795844,
                "waterScarcity": 0.0003001079768681306,
                "abioticDepletion": 0.004398442356296192,
                "chemistry": 0,
                "waterConsumption": 0.006924701933088353,
                "biogenicCarbon": 0
            },
            "packagingPerUseImpacts": {
                "globalWarming": 0.014110582899857251,
                "eutrophication": 0.000005130854057023944,
                "waterScarcity": 0.002852118759663479,
                "abioticDepletion": 0.304496750084583,
                "chemistry": 0.033021656682160075,
                "waterConsumption": 0.08274411309681197,
                "biogenicCarbon": 0.0010041472908125708
            },
            "logisticsPerUseImpacts": {
                "globalWarming": 0.014604428139568268,
                "eutrophication": 0.0006013067134077442,
                "waterScarcity": 0.09992534706239292,
                "abioticDepletion": 0.1660180886462699,
                "chemistry": 0.018906288098645276,
                "waterConsumption": 2.267686860982366,
                "biogenicCarbon": 0
            },
            "retailPerUseImpacts": {
                "globalWarming": 0.00657228144752936,
                "eutrophication": 0.0000019121002238455785,
                "waterScarcity": 0.0026603016160165107,
                "abioticDepletion": 0.08049263434966698,
                "chemistry": 0,
                "waterConsumption": 0,
                "biogenicCarbon": 0
            },
            "productCarePerUseImpacts": {
                "globalWarming": 0.4224,
                "eutrophication": 0.0001845333333333333,
                "waterScarcity": 0.17813333333333337,
                "abioticDepletion": 5.5701333333333345,
                "chemistry": 0,
                "waterConsumption": 0,
                "biogenicCarbon": 0
            },
            "endOfUsePerUseImpacts": {
                "globalWarming": 0.019362356841500606,
                "eutrophication": 0.000012129640823483591,
                "waterScarcity": 0.0010711482336908185,
                "abioticDepletion": 0.009301434056523401,
                "chemistry": 0,
                "waterConsumption": 0.023853142984887447,
                "biogenicCarbon": 0
            }
```

## Additional Product Details

Additional details about the product that the user can set manually in the Product Tool can also be returned including Bill of Materials composition and individual material impacts, Finished Goods Processes, Manufacturing waste disposal, packaging, logistics mode of transport and distances, and distribution center and retail impacts.
If you are interested in integrating this additional product information into your system, please contact Higg for details.


## OpenAPI

````yaml api-reference/openapi/product-module-api.json POST /search
openapi: 3.0.0
info:
  title: product-module-api
  version: 1.0.0
servers:
  - url: https://api-v2.production.higg.org/pm-api/v1/product
    description: Production
  - url: https://api-v2.demo.higg.org/pm-api/v1/product
    description: Demo
security:
  - sec0: []
    sec1: []
paths:
  /search:
    post:
      operationId: SearchProduct
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SearchMsiProductApiRequest'
        required: true
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/ESSearchCleanResponsePartialMsiProductSearch
components:
  schemas:
    SearchMsiProductApiRequest:
      properties:
        ids:
          items:
            type: string
          type: array
          nullable: true
        accountId:
          type: string
          nullable: true
        certifications:
          items:
            type: string
          type: array
          nullable: true
        claimsStatus:
          type: string
          nullable: true
        claimsLevel:
          type: number
          format: double
          nullable: true
        claimsExpires:
          type: string
          nullable: true
        higgId:
          type: number
          format: double
          nullable: true
        name:
          type: string
          nullable: true
        productStyleNumber:
          type: string
          nullable: true
        draft:
          type: boolean
          nullable: true
        productType:
          $ref: '#/components/schemas/MsiProductType'
        productCategory:
          type: object
          nullable: true
        createdAfter:
          type: string
          format: date-time
          nullable: true
        createdBefore:
          type: string
          format: date-time
          nullable: true
        lastEditedAfter:
          type: string
          format: date-time
          nullable: true
        lastEditedBefore:
          type: string
          format: date-time
          nullable: true
        platformModifiedBy:
          $ref: '#/components/schemas/PlatformDefault'
        platformCreatedBy:
          $ref: '#/components/schemas/PlatformDefault'
        productLastEditedBefore:
          type: string
          format: date-time
          nullable: true
        productLastEditedAfter:
          type: string
          format: date-time
          nullable: true
        submittedBefore:
          type: string
          format: date-time
          nullable: true
        submittedAfter:
          type: string
          format: date-time
          nullable: true
        barcodes:
          items:
            type: string
          type: array
          nullable: true
        claimType:
          $ref: '#/components/schemas/MsiProductClaimsType'
        from:
          type: number
          format: double
          nullable: true
        size:
          type: number
          format: double
          nullable: true
      type: object
      additionalProperties: false
    ESSearchCleanResponsePartialMsiProductSearch:
      properties:
        total:
          type: number
          format: double
        max_score:
          type: number
          format: double
          nullable: true
        hits:
          items:
            $ref: '#/components/schemas/PartialMsiProductSearch'
          type: array
        aggregations:
          properties: {}
          additionalProperties:
            type: object
          type: object
          nullable: true
      required:
        - hits
        - total
      type: object
      additionalProperties: false
    MsiProductType:
      enum:
        - Apparel
        - Footwear
        - HomeTextiles
        - Other
      type: string
    PlatformDefault:
      enum:
        - User
        - Api
      type: string
    MsiProductClaimsType:
      enum:
        - Materials
        - Disclosure
      type: string
    PartialMsiProductSearch:
      properties:
        certifications:
          items:
            $ref: '#/components/schemas/CertificationSearchList'
          type: array
          nullable: true
        productNetWeight:
          type: number
          format: double
          nullable: true
        bomNetWeight:
          type: number
          format: double
          nullable: true
        scores:
          $ref: '#/components/schemas/MsiImpactsApi'
        scoresTotalAltProductCare:
          $ref: '#/components/schemas/MsiImpactsApi'
        billOfMaterialScores:
          $ref: '#/components/schemas/MsiImpactsApi'
        logisticsImpacts:
          $ref: '#/components/schemas/MsiImpactsApi'
        packagingImpacts:
          $ref: '#/components/schemas/MsiImpactsApi'
        productCareImpacts:
          $ref: '#/components/schemas/MsiImpactsApi'
        endOfUseImpacts:
          $ref: '#/components/schemas/MsiImpactsApi'
        retailImpacts:
          $ref: '#/components/schemas/MsiImpactsApi'
        dosImpacts:
          $ref: '#/components/schemas/MsiImpactsApi'
        totalPerUseImpacts:
          $ref: '#/components/schemas/MsiImpactsApi'
        materials:
          items:
            $ref: '#/components/schemas/PartialMsiProductMaterial'
          type: array
          nullable: true
      required:
        - billOfMaterialScores
        - scores
      type: object
      additionalProperties: false
    CertificationSearchList:
      properties:
        _id:
          type: string
        assertionAuthorityName:
          type: string
        assertionStandardName:
          type: string
        certificateName:
          type: string
        assertionId:
          type: string
        assertionStandardId:
          type: string
        dateExpires:
          type: number
          format: double
        proofBody:
          type: string
          nullable: true
        dateIssued:
          type: number
          format: double
          nullable: true
        certificationFiles:
          items:
            type: string
          type: array
          nullable: true
      required:
        - _id
        - assertionAuthorityName
        - assertionId
        - assertionStandardId
        - assertionStandardName
        - certificateName
        - dateExpires
      type: object
      additionalProperties: false
    MsiImpactsApi:
      properties: {}
      type: object
      additionalProperties: false
    PartialMsiProductMaterial:
      properties:
        scores:
          $ref: '#/components/schemas/MsiImpactsApi'
        baseScores:
          $ref: '#/components/schemas/MsiImpactsApi'
      required:
        - baseScores
        - scores
      type: object
      additionalProperties: false
  securitySchemes:
    sec0:
      type: apiKey
      in: header
      name: x-api-key
    sec1:
      type: apiKey
      in: header
      name: x-developer-request-token

````