Skip to main content
POST
/
material-library
/
create
Create Material Library
curl --request POST \
  --url https://api-v2.production.higg.org/pic-api/v1/material-library/create \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --header 'x-developer-request-token: <api-key>' \
  --data '
{
  "name": "<string>",
  "cycleProcess": [
    {
      "lifeCycle": "<string>",
      "country": "<string>",
      "facilityWorldlyId": "<string>"
    }
  ],
  "baseMaterials": [
    {
      "id": "<string>",
      "composition": 123,
      "sustainability": "<string>"
    }
  ],
  "code": "<string>",
  "category": "<string>",
  "supplierCountry": "<string>",
  "supplier": "<string>",
  "country": "<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 create a custom material in your PIC material library. Custom materials let you model Tier 2 and Tier 3 supply chain processes by specifying base materials, life cycle stages, and facility-level environmental data.

Create a Tier 2/3 Material

Request body params

Field NameData TypeDescription
namestring[REQUIRED] The name for your custom material.
codestringOptional material code.
categorystringOptional material category.
supplierstringOptional supplier name.
supplierCountrystringOptional supplier country.
countrystringOptional country of origin.
cycleProcessArray<CycleProcess>[REQUIRED] Life cycle processes for this material (stages P002–P006).
cycleProcess[].lifeCyclestring[REQUIRED] The life cycle stage ID (e.g., "P002" for Yarn Formation, "P003" for Fabric Formation).
cycleProcess[].countrystringCountry value for this process stage. Use Get Country List for valid values. Required if facilityWorldlyId is not provided.
cycleProcess[].facilityWorldlyIdstringWorldly facility ID for facility-specific data. Use Get Facilities to find available facilities.
baseMaterialsArray<BaseMaterial>[REQUIRED] The base materials that compose this custom material.
baseMaterials[].idstring[REQUIRED] The base material ID. Use Get Base Materials to find IDs.
baseMaterials[].compositionnumber[REQUIRED] The percentage composition (all base materials must sum to 100%).
baseMaterials[].sustainabilitystring | nullOptional sustainability certification for this base material (e.g., "recycled", "organic"). May be null.

Implementation Details

  • Composition validation: Base material compositions must sum to exactly 100%. This is a server-enforced constraint not expressed in the OpenAPI schema.
  • Life cycle stages: Valid life cycle IDs are P002 through P006. Each life cycle stage must be unique within a material. These are server-enforced constraints.
  • Location requirement: Each life cycle process requires either a country or a facilityWorldlyId — at least one must be provided (server-enforced).
  • Sustainability values: If provided, sustainability is a free-form string label (e.g., "recycled", "organic"). It is optional and may be null.

Authorizations

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

Body

application/json
name
string
required
cycleProcess
object[]
required
baseMaterials
object[]
required
code
string | null
category
string | null
supplierCountry
string | null
supplier
string | null
country
string | 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