Skip to main content
POST
/
materials
/
update
/
{materialId}
cURL
curl --request POST \
  --url https://api-v2.production.higg.org/msi-api/v1/materials/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>",
  "yieldInfo": [
    {
      "type": "Yards (linear)",
      "width": 123,
      "widthUnit": "m",
      "thickness": 123,
      "thicknessUnit": "in",
      "densityLinear": 123,
      "densityLinearUnit": "g/m2",
      "densityVolumetric": 123,
      "densityVolumetricUnit": "kg/m3"
    }
  ],
  "baseMaterials": [
    {
      "baseMaterialId": "<string>",
      "blendPercentage": 123,
      "processes": {}
    }
  ],
  "category": "<string>"
}
'
{
  "_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>"
  }
}

Updating Custom Materials

The MSI API provides functionality to update custom materials via the API. Note it is not currently possible to update custom trims or packaging via that API. The API returns the material Higg ID and impacts in the response. See MSI Data Dictionary for details about the parameters. The API uses the custom material id to identify the material to update. The user can then optionally send the following information to update the material. Only the parameters sent via the update are updated. The user can update: • material name • material code • custom material category • base material, % composition for blends, and raw material process stage • yield
Note that updating any of base material, % composition for blends, raw material process stage and yield completely overwrites the previously entered base materials. For example, if the original material was 80% organic cotton/20% polyester, then sending 100% cotton fiber will change the material to 100% cotton fiber.
Updating material
{
    "name": "Test blend",
    "code": "xyz PLM code",
    "baseMaterials":[{
        "baseMaterialId": "FM002",
        "processId": "PR0804000648",
        "blendPercentage": 60
    }, {
        "baseMaterialId": "FM005",
        "blendPercentage": 40
    }],
    "yieldInfo": [
        {
            "type": "Yards (volumetric)",
            "width": 1,
            "widthUnit": "m",
            "thickness": 2,
            "thicknessUnit": "in",
            "densityVolumetric": 13,
            "densityVolumetricUnit": "kg/m3"
        }
    ],
    "category": "TX"
}

Finding materials modified by user

A common use case is to search for materials that have been manually updated by a user in MSI, in order to pull the updated material impacts into the PLM. Users can search for “PlatformModifiedBy”: “User” to find materials updated by users directly in MSI. The “lastEditedAfter”: 0 and “lastEditedBefore”: 0 search parameters can be used to set the date period to search for edits.
Search for user updates
{
    "platformModifiedBy": "User",
    "lastEditedAfter": "2021-01-13T16:38:19.386Z",
    "lastEditedBefore": "2021-12-13T20:38:19.386Z"
}

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
yieldInfo
object[] | null
baseMaterials
object[] | null
category
string | 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".