Skip to main content
POST
/
materials
/
create
cURL
curl --request POST \
  --url https://api-v2.production.higg.org/msi-api/v1/materials/create \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --header 'x-developer-request-token: <api-key>' \
  --data '
{
  "name": "<string>",
  "baseMaterials": [
    {
      "baseMaterialId": "<string>",
      "blendPercentage": 123,
      "processes": {}
    }
  ],
  "category": "<string>",
  "code": "<string>",
  "yieldInfo": [
    {
      "type": "Yards (linear)",
      "width": 123,
      "widthUnit": "m",
      "thickness": 123,
      "thicknessUnit": "in",
      "densityLinear": 123,
      "densityLinearUnit": "g/m2",
      "densityVolumetric": 123,
      "densityVolumetricUnit": "kg/m3"
    }
  ]
}
'
{
  "_id": "<string>",
  "type": "<string>",
  "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"
  },
  "created_on": 123,
  "category": "<string>",
  "version": {
    "baseMaterials": [
      {
        "cycles": {}
      }
    ]
  },
  "draft": true,
  "_rev": "<string>",
  "last_edit": 123,
  "history": [
    {
      "baseMaterials": [
        {
          "cycles": {}
        }
      ]
    }
  ],
  "sharedBy": {
    "materialId": "<string>",
    "materialVersion": "<string>",
    "date": 123,
    "sendingUser": {
      "_id": "<string>",
      "email": "<string>",
      "firstname": "<string>",
      "lastname": "<string>"
    },
    "sendingAccount": {
      "_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"
    },
    "status": "pending",
    "comment": "<string>"
  },
  "image": "<string>",
  "platformModifiedBy": "User",
  "platformCreatedBy": "User",
  "deleted": true,
  "lastEditedBy": {
    "_id": "<string>",
    "email": "<string>",
    "firstname": "<string>",
    "lastname": "<string>"
  },
  "deletedBy": {
    "_id": "<string>",
    "email": "<string>",
    "firstname": "<string>",
    "lastname": "<string>"
  }
}

Introduction

This API endpoint allows for the creation of custom materials in the Higg MSI. To create a custom material, the following base attributes are required:
  • Name (open text field, must be unique within an MSI library)
  • Category (user defined from the set of categories available in the MSI). See MSI Get Material Categories for additional information.
  • At least one base material (user defined from the set of base materials available in the MSI) See MSI Get Base Materials for additional information.
An optional text field material code can be added as ‘code’. This field can be used to store a PLM id. Note that the field is editable by users within MSI.
Example minimal material creation
{
    "name": "My custom material",
    "code": "my PLM code",
    "category": "TX",
    "baseMaterials":[{
        "baseMaterialId": "FM002"
    }]
}

Creating blends

Blends are based on % of material for 1kg of MSI material. For example the code below represents an MSI material with 60% organic cotton, 40% polyester. The % blend must equal 100%.
Example blended material creation
{

    "name": "Organic/Poly Blend",
    "code": "my PLM code",
    "baseMaterials":[{
        "baseMaterialId": "TX0010",
        "blendPercentage": 60
    }, {
        "baseMaterialId": "TX0001",
        "blendPercentage": 40
    }],
      "category": "TX"
}

Setting Yields

Optionally one or multiple yields can be sent for a material. All materials in MSI are normalized to 1kg. Yields provide conversions for the MSI 1kg material to a linear/volumetric unit. See MSI Get Yield Options for additional information.
Example blend material with yield creation
{
    "name": "Example MSI custom material",
    "code": "yield 2",
    "baseMaterials": [
        {
            "baseMaterialId": "FM002"
        }
    ],
    "yieldInfo": [
        {
            "type": "Yards (volumetric)",
            "width": 1,
            "widthUnit": "m",
            "thickness": 2,
            "thicknessUnit": "in",
            "densityVolumetric": 13,
            "densityVolumetricUnit": "kg/m3"
        }
    ],
    "category": "TX"
}

Setting Base Material Processes

The stage process for a base material can be changed via the API using the processId. For example, changing ‘cotton, fiber’ to ‘cotton fiber, organic” in the raw material formation stage. The processes must be available for the base material to change it. See MSI Get Processes for Base Material for how to get a list of available processes and their IDs.
Example material creation with specific process
{
    "name": "Test blend",
    "code": "xyz PLM code",
    "baseMaterials":[{
        "baseMaterialId": "FM002",
        "blendPercentage": 60,
        "processes": {
      	 "P001": "PR0804000648",
         "P002": "PR0804000331"
        }
    }, {
    	 "baseMaterialId": "TX0010",
       "blendPercentage": 40,
       "processes": {
       	"P006": "PR0804000543"
       }
   }],
      "category": "TX"
}
See MSI Data Dictionary for details about the parameters.

Authorizations

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

Body

application/json
name
string
required
baseMaterials
object[]
required
category
string
required
code
string | null
yieldInfo
object[] | null

Response

200 - application/json

Ok

_id
string
required
type
string
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".

created_on
number<double>
required
category
string
required
version
object
required
draft
boolean
required
_rev
string | null
last_edit
number<double> | null
history
object[] | null
sharedBy
object
image
string | null
platformModifiedBy
enum<string>
Available options:
User,
Api
platformCreatedBy
enum<string>
Available options:
User,
Api
deleted
boolean | null
lastEditedBy
object

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

deletedBy
object

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