Skip to main content
POST
/
material-library
/
update
/
{materialId}
Update Material Library
curl --request POST \
  --url https://api-v2.production.higg.org/pic-api/v1/material-library/update/{materialId} \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --header 'x-developer-request-token: <api-key>' \
  --data '
{
  "name": "<string>",
  "code": "<string>",
  "category": "<string>",
  "supplier": "<string>",
  "country": "<string>",
  "cycleProcess": [
    {
      "lifeCycle": "<string>",
      "country": "<string>",
      "facilityWorldlyId": "<string>"
    }
  ],
  "baseMaterials": [
    {
      "id": "<string>",
      "composition": 123,
      "sustainability": "<string>"
    }
  ]
}
'
{
  "_id": "<string>",
  "type": "<string>",
  "name": "<string>",
  "t2GlobalWarmingImpact": 123,
  "t3GlobalWarmingImpact": 123,
  "t4GlobalWarmingImpact": 123,
  "createdOn": 123,
  "user": {
    "_id": "<string>",
    "email": "<string>",
    "firstname": "<string>",
    "lastname": "<string>"
  },
  "account": {
    "_id": "<string>",
    "name": "<string>",
    "country": "<string>",
    "sacId": 123,
    "oar_id": "<string>",
    "demoaccount": true,
    "vbType": "None",
    "socialCreditId": "<string>",
    "taxId": "<string>",
    "bluesignId": "<string>",
    "zdhcId": "<string>",
    "ipeViolation": {
      "totalViolations": 123
    },
    "ffcId": 123,
    "approvalStatus": "Approved"
  },
  "totalMaterialGlobalWarmingImpact": 123,
  "_rev": "<string>",
  "code": "<string>",
  "category": "<string>",
  "supplierCountry": "<string>",
  "nameId": "<string>",
  "supplier": "<string>",
  "country": "<string>",
  "tier2": {
    "isDefault": true,
    "assessment": {
      "_id": "<string>",
      "rfi_pid": "fem2017",
      "surveyVersion": "<string>",
      "country": "<string>",
      "processName": "<string>"
    },
    "facility": {
      "_id": "<string>",
      "name": "<string>",
      "country": "<string>",
      "sacId": 123,
      "oar_id": "<string>",
      "demoaccount": true,
      "vbType": "None",
      "socialCreditId": "<string>",
      "taxId": "<string>",
      "bluesignId": "<string>",
      "zdhcId": "<string>",
      "ipeViolation": {
        "totalViolations": 123
      },
      "ffcId": 123,
      "approvalStatus": "Approved"
    },
    "country": "<string>",
    "facilityRawText": "<string>"
  },
  "tier3": {
    "isDefault": true,
    "assessment": {
      "_id": "<string>",
      "rfi_pid": "fem2017",
      "surveyVersion": "<string>",
      "country": "<string>",
      "processName": "<string>"
    },
    "facility": {
      "_id": "<string>",
      "name": "<string>",
      "country": "<string>",
      "sacId": 123,
      "oar_id": "<string>",
      "demoaccount": true,
      "vbType": "None",
      "socialCreditId": "<string>",
      "taxId": "<string>",
      "bluesignId": "<string>",
      "zdhcId": "<string>",
      "ipeViolation": {
        "totalViolations": 123
      },
      "ffcId": 123,
      "approvalStatus": "Approved"
    },
    "country": "<string>",
    "facilityRawText": "<string>"
  },
  "baseMaterials": [
    {
      "_id": "<string>",
      "composition": 123,
      "name": "<string>",
      "baseMaterialProcesses": [
        {
          "_id": "<string>",
          "name": "<string>",
          "stageName": "<string>",
          "lifeCycle": "<string>",
          "isEligible": true,
          "totalMaterialGlobalWarmingImpact": 123,
          "totalLossRate": 123,
          "residualElectricityTotal": 123,
          "lossRate": 123,
          "assessment": {
            "_id": "<string>",
            "rfi_pid": "fem2017",
            "surveyVersion": "<string>",
            "country": "<string>",
            "processName": "<string>"
          },
          "facility": {
            "_id": "<string>",
            "name": "<string>",
            "country": "<string>",
            "sacId": 123,
            "oar_id": "<string>",
            "demoaccount": true,
            "vbType": "None",
            "socialCreditId": "<string>",
            "taxId": "<string>",
            "bluesignId": "<string>",
            "zdhcId": "<string>",
            "ipeViolation": {
              "totalViolations": 123
            },
            "ffcId": 123,
            "approvalStatus": "Approved"
          },
          "country": "<string>",
          "facilityType": [
            "<string>"
          ],
          "sipfacilitymaterialprocesstextiles": [
            "<string>"
          ],
          "materialproduction_normalized_kgco2e": 123,
          "rawmaterialprocessing_normalized_kgco2e": 123,
          "globalWarmingImpact": 123,
          "ineligibleReason": "Fem not shared",
          "femStatus": "NS",
          "facilityRawText": "<string>"
        }
      ],
      "totalMaterialGlobalWarmingImpactT2": 123,
      "totalMaterialGlobalWarmingImpactT3": 123,
      "totalMaterialGlobalWarmingImpactT4": 123,
      "totalMaterialGlobalWarmingImpact": 123,
      "sustainability": {
        "isEligible": true,
        "type": "Recycled",
        "processId": "<string>"
      },
      "baseMaterialProcessesList": [
        {
          "_id": "<string>",
          "name": "<string>",
          "stageName": "<string>",
          "lifeCycle": "<string>",
          "isEligible": true,
          "totalMaterialGlobalWarmingImpact": 123,
          "totalLossRate": 123,
          "residualElectricityTotal": 123,
          "lossRate": 123,
          "assessment": {
            "_id": "<string>",
            "rfi_pid": "fem2017",
            "surveyVersion": "<string>",
            "country": "<string>",
            "processName": "<string>"
          },
          "facility": {
            "_id": "<string>",
            "name": "<string>",
            "country": "<string>",
            "sacId": 123,
            "oar_id": "<string>",
            "demoaccount": true,
            "vbType": "None",
            "socialCreditId": "<string>",
            "taxId": "<string>",
            "bluesignId": "<string>",
            "zdhcId": "<string>",
            "ipeViolation": {
              "totalViolations": 123
            },
            "ffcId": 123,
            "approvalStatus": "Approved"
          },
          "country": "<string>",
          "facilityType": [
            "<string>"
          ],
          "sipfacilitymaterialprocesstextiles": [
            "<string>"
          ],
          "materialproduction_normalized_kgco2e": 123,
          "rawmaterialprocessing_normalized_kgco2e": 123,
          "globalWarmingImpact": 123,
          "ineligibleReason": "Fem not shared",
          "femStatus": "NS",
          "facilityRawText": "<string>"
        }
      ],
      "uniqueCyclesAssessments": [
        {
          "assessmentId": "<string>",
          "processId": "<string>",
          "lifeCycle": "<string>",
          "isEligible": true,
          "sipfacilitymaterialprocesstextiles": "<string>",
          "ineligibleReason": "Fem not shared"
        }
      ]
    }
  ],
  "modifiedOn": 123,
  "deleted": true,
  "deletedBy": {
    "_id": "<string>",
    "email": "<string>",
    "firstname": "<string>",
    "lastname": "<string>"
  },
  "modifiedBy": {
    "_id": "<string>",
    "email": "<string>",
    "firstname": "<string>",
    "lastname": "<string>"
  },
  "createdBy": {
    "_id": "<string>",
    "email": "<string>",
    "firstname": "<string>",
    "lastname": "<string>"
  },
  "msiVersion": "<string>"
}
Use this endpoint to update an existing custom material in your PIC material library. You can modify the material name, base materials, and life cycle processes.

Request body params

Field NameData TypeDescription
namestringUpdated material name.
codestringUpdated material code.
categorystringUpdated material category.
supplierstringUpdated supplier name.
countrystringUpdated country of origin.
cycleProcessArray<CycleProcess>Updated life cycle processes (stages P002–P006).
baseMaterialsArray<BaseMaterial>Updated base materials with composition percentages.

Implementation Details

  • Partial updates: All fields are optional. Only the fields you provide will be updated.
  • Backfill behavior: If you update cycleProcess without providing baseMaterials, the existing base materials are preserved.
  • Same validation as create: When provided, base material compositions must sum to 100%, life cycle stages must be unique, and each process needs a country or facilityWorldlyId.

Authorizations

x-api-key
string
header
required
x-developer-request-token
string
header
required

Path Parameters

materialId
string
required

Body

application/json
name
string | null
code
string | null
category
string | null
supplier
string | null
country
string | null
cycleProcess
object[] | null
baseMaterials
object[] | null

Response

200 - application/json

Ok

This interface was referenced by Exports's JSON-Schema via the definition "picMaterialLibraryEntity".

_id
string
required
type
string
required
name
string
required
t2GlobalWarmingImpact
number<double>
required
t3GlobalWarmingImpact
number<double>
required
t4GlobalWarmingImpact
number<double>
required
createdOn
number<double>
required
user
object
required

This interface was referenced by Exports's JSON-Schema via the definition "userRef".

account
object
required

This interface was referenced by Exports's JSON-Schema via the definition "accountRef".

totalMaterialGlobalWarmingImpact
number<double>
required
_rev
string | null
code
string | null
category
string | null
supplierCountry
string | null
nameId
string | null
supplier
string | null
country
string | null
tier2
object
tier3
object
baseMaterials
object[] | null
modifiedOn
number<double> | null
deleted
boolean | null
deletedBy
object

This interface was referenced by Exports's JSON-Schema via the definition "userRef".

modifiedBy
object

This interface was referenced by Exports's JSON-Schema via the definition "userRef".

createdBy
object

This interface was referenced by Exports's JSON-Schema via the definition "userRef".

msiVersion
string | null