Skip to main content
curl --request POST \
     --url https://api-v2.production.higg.org/pic-api/v1/material-library/create \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --header 'x-api-key: <<apiKey>>' \
     --header 'x-developer-request-token: <<apiKey>>' \
		 --data '{
  "name": "string",
  "cycleProcess": [
    {
      "lifeCycle": "P002",
			"country": "BD"
    },
        {
      "lifeCycle": "P003",
      "facilityWorldlyId": "string"
    },    
    {
      "lifeCycle": "P004",
      "facilityWorldlyId": "string"
    },
        {
      "lifeCycle": "P005",
      "facilityWorldlyId": "string"
    },
        {
      "lifeCycle": "P006",
      "facilityWorldlyId": "string"
    }
  ],
  "baseMaterials": [
    {
      "id": "TX0010",
      "composition": 100
    }
  ]
}'
{"success":true}
1

Set Name of Material Blend

"name": "string",
2

Specify the Lifecycle Stage

For each lifecycle stage, specify the lifecycle. Use the lifecycle code, as referenced below:
  • P002 = Yarn Formation
  • P003 = Textile Formation
  • P004 = Preparation
  • P005 = Dyeing
  • P006 = Finishing
"cycleProcess": [
    {
      "lifeCycle": "P002",
      ...
    },
    {
      "lifeCycle": "P003",
      ...
    },
    {
      "lifeCycle": "P004",
      ...
    },
    {
      "lifeCycle": "P005",
      ...
    },
    {
      "lifeCycle": "P006",
      ...
    }
  ]
3

Set Country for Lifecycle Stage

Lifecycle stages can be adjusted with primary FEM data, or country energy grid data. Indicate one or the other. When both are defined, PIC will assign priority to the FEM data and fall back on the country field if the FEM data does not apply to the lifecycle stage for the base material.
{
    "lifeCycle": "P002",
    "country": "BD"
},
4

Set the Supplier Worldly ID

facilityWorldlyId

Field type: string
"facilityWorldlyId": "string"
5

Specify the Material Constituents

baseMaterials

For each base Material specify:field: materialId Use the Base Materials List endpoint to identify the materialId for each material.Example: MatTX0001field: composition: Note that the sum of all composition must equal exactly 100.
"baseMaterials": [
    {
      "id": "TX0010",
      "composition": 100
    }
  ]