cURL
curl --request POST \
--url https://api-v2.production.higg.org/pm-api/v1/product/update/{product_id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--header 'x-developer-request-token: <api-key>' \
--data '
{
"name": "<string>",
"modelNumber": "<string>",
"baseMaterials": [
{
"_id": "<string>",
"amount": 123,
"partName": "<string>"
}
],
"customMaterials": [
{
"_id": "<string>",
"amount": 123,
"partName": "<string>"
}
],
"packageMaterials": [
{
"_id": "<string>",
"amount": 123,
"partName": "<string>"
}
],
"trimMaterials": [
{
"_id": "<string>",
"amount": 123,
"partName": "<string>"
}
],
"certifications": [
"<string>"
],
"barcodes": [
"<string>"
]
}
'import requests
url = "https://api-v2.production.higg.org/pm-api/v1/product/update/{product_id}"
payload = {
"name": "<string>",
"modelNumber": "<string>",
"baseMaterials": [
{
"_id": "<string>",
"amount": 123,
"partName": "<string>"
}
],
"customMaterials": [
{
"_id": "<string>",
"amount": 123,
"partName": "<string>"
}
],
"packageMaterials": [
{
"_id": "<string>",
"amount": 123,
"partName": "<string>"
}
],
"trimMaterials": [
{
"_id": "<string>",
"amount": 123,
"partName": "<string>"
}
],
"certifications": ["<string>"],
"barcodes": ["<string>"]
}
headers = {
"x-api-key": "<api-key>",
"x-developer-request-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-api-key': '<api-key>',
'x-developer-request-token': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: '<string>',
modelNumber: '<string>',
baseMaterials: [{_id: '<string>', amount: 123, partName: '<string>'}],
customMaterials: [{_id: '<string>', amount: 123, partName: '<string>'}],
packageMaterials: [{_id: '<string>', amount: 123, partName: '<string>'}],
trimMaterials: [{_id: '<string>', amount: 123, partName: '<string>'}],
certifications: ['<string>'],
barcodes: ['<string>']
})
};
fetch('https://api-v2.production.higg.org/pm-api/v1/product/update/{product_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-v2.production.higg.org/pm-api/v1/product/update/{product_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'modelNumber' => '<string>',
'baseMaterials' => [
[
'_id' => '<string>',
'amount' => 123,
'partName' => '<string>'
]
],
'customMaterials' => [
[
'_id' => '<string>',
'amount' => 123,
'partName' => '<string>'
]
],
'packageMaterials' => [
[
'_id' => '<string>',
'amount' => 123,
'partName' => '<string>'
]
],
'trimMaterials' => [
[
'_id' => '<string>',
'amount' => 123,
'partName' => '<string>'
]
],
'certifications' => [
'<string>'
],
'barcodes' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>",
"x-developer-request-token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-v2.production.higg.org/pm-api/v1/product/update/{product_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"modelNumber\": \"<string>\",\n \"baseMaterials\": [\n {\n \"_id\": \"<string>\",\n \"amount\": 123,\n \"partName\": \"<string>\"\n }\n ],\n \"customMaterials\": [\n {\n \"_id\": \"<string>\",\n \"amount\": 123,\n \"partName\": \"<string>\"\n }\n ],\n \"packageMaterials\": [\n {\n \"_id\": \"<string>\",\n \"amount\": 123,\n \"partName\": \"<string>\"\n }\n ],\n \"trimMaterials\": [\n {\n \"_id\": \"<string>\",\n \"amount\": 123,\n \"partName\": \"<string>\"\n }\n ],\n \"certifications\": [\n \"<string>\"\n ],\n \"barcodes\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("x-developer-request-token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-v2.production.higg.org/pm-api/v1/product/update/{product_id}")
.header("x-api-key", "<api-key>")
.header("x-developer-request-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"modelNumber\": \"<string>\",\n \"baseMaterials\": [\n {\n \"_id\": \"<string>\",\n \"amount\": 123,\n \"partName\": \"<string>\"\n }\n ],\n \"customMaterials\": [\n {\n \"_id\": \"<string>\",\n \"amount\": 123,\n \"partName\": \"<string>\"\n }\n ],\n \"packageMaterials\": [\n {\n \"_id\": \"<string>\",\n \"amount\": 123,\n \"partName\": \"<string>\"\n }\n ],\n \"trimMaterials\": [\n {\n \"_id\": \"<string>\",\n \"amount\": 123,\n \"partName\": \"<string>\"\n }\n ],\n \"certifications\": [\n \"<string>\"\n ],\n \"barcodes\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-v2.production.higg.org/pm-api/v1/product/update/{product_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["x-developer-request-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"modelNumber\": \"<string>\",\n \"baseMaterials\": [\n {\n \"_id\": \"<string>\",\n \"amount\": 123,\n \"partName\": \"<string>\"\n }\n ],\n \"customMaterials\": [\n {\n \"_id\": \"<string>\",\n \"amount\": 123,\n \"partName\": \"<string>\"\n }\n ],\n \"packageMaterials\": [\n {\n \"_id\": \"<string>\",\n \"amount\": 123,\n \"partName\": \"<string>\"\n }\n ],\n \"trimMaterials\": [\n {\n \"_id\": \"<string>\",\n \"amount\": 123,\n \"partName\": \"<string>\"\n }\n ],\n \"certifications\": [\n \"<string>\"\n ],\n \"barcodes\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"scores": {},
"billOfMaterialScores": {},
"certifications": [
{
"_id": "<string>",
"assertionAuthorityName": "<string>",
"assertionStandardName": "<string>",
"certificateName": "<string>",
"assertionId": "<string>",
"assertionStandardId": "<string>",
"dateExpires": 123,
"proofBody": "<string>",
"dateIssued": 123,
"certificationFiles": [
"<string>"
]
}
],
"productNetWeight": 123,
"bomNetWeight": 123,
"scoresTotalAltProductCare": {},
"logisticsImpacts": {},
"packagingImpacts": {},
"productCareImpacts": {},
"endOfUseImpacts": {},
"retailImpacts": {},
"dosImpacts": {},
"totalPerUseImpacts": {},
"materials": [
{
"scores": {},
"baseScores": {}
}
]
}Product Module
PM Update Product
POST
/
update
/
{product_id}
cURL
curl --request POST \
--url https://api-v2.production.higg.org/pm-api/v1/product/update/{product_id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--header 'x-developer-request-token: <api-key>' \
--data '
{
"name": "<string>",
"modelNumber": "<string>",
"baseMaterials": [
{
"_id": "<string>",
"amount": 123,
"partName": "<string>"
}
],
"customMaterials": [
{
"_id": "<string>",
"amount": 123,
"partName": "<string>"
}
],
"packageMaterials": [
{
"_id": "<string>",
"amount": 123,
"partName": "<string>"
}
],
"trimMaterials": [
{
"_id": "<string>",
"amount": 123,
"partName": "<string>"
}
],
"certifications": [
"<string>"
],
"barcodes": [
"<string>"
]
}
'import requests
url = "https://api-v2.production.higg.org/pm-api/v1/product/update/{product_id}"
payload = {
"name": "<string>",
"modelNumber": "<string>",
"baseMaterials": [
{
"_id": "<string>",
"amount": 123,
"partName": "<string>"
}
],
"customMaterials": [
{
"_id": "<string>",
"amount": 123,
"partName": "<string>"
}
],
"packageMaterials": [
{
"_id": "<string>",
"amount": 123,
"partName": "<string>"
}
],
"trimMaterials": [
{
"_id": "<string>",
"amount": 123,
"partName": "<string>"
}
],
"certifications": ["<string>"],
"barcodes": ["<string>"]
}
headers = {
"x-api-key": "<api-key>",
"x-developer-request-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-api-key': '<api-key>',
'x-developer-request-token': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: '<string>',
modelNumber: '<string>',
baseMaterials: [{_id: '<string>', amount: 123, partName: '<string>'}],
customMaterials: [{_id: '<string>', amount: 123, partName: '<string>'}],
packageMaterials: [{_id: '<string>', amount: 123, partName: '<string>'}],
trimMaterials: [{_id: '<string>', amount: 123, partName: '<string>'}],
certifications: ['<string>'],
barcodes: ['<string>']
})
};
fetch('https://api-v2.production.higg.org/pm-api/v1/product/update/{product_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-v2.production.higg.org/pm-api/v1/product/update/{product_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'modelNumber' => '<string>',
'baseMaterials' => [
[
'_id' => '<string>',
'amount' => 123,
'partName' => '<string>'
]
],
'customMaterials' => [
[
'_id' => '<string>',
'amount' => 123,
'partName' => '<string>'
]
],
'packageMaterials' => [
[
'_id' => '<string>',
'amount' => 123,
'partName' => '<string>'
]
],
'trimMaterials' => [
[
'_id' => '<string>',
'amount' => 123,
'partName' => '<string>'
]
],
'certifications' => [
'<string>'
],
'barcodes' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>",
"x-developer-request-token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-v2.production.higg.org/pm-api/v1/product/update/{product_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"modelNumber\": \"<string>\",\n \"baseMaterials\": [\n {\n \"_id\": \"<string>\",\n \"amount\": 123,\n \"partName\": \"<string>\"\n }\n ],\n \"customMaterials\": [\n {\n \"_id\": \"<string>\",\n \"amount\": 123,\n \"partName\": \"<string>\"\n }\n ],\n \"packageMaterials\": [\n {\n \"_id\": \"<string>\",\n \"amount\": 123,\n \"partName\": \"<string>\"\n }\n ],\n \"trimMaterials\": [\n {\n \"_id\": \"<string>\",\n \"amount\": 123,\n \"partName\": \"<string>\"\n }\n ],\n \"certifications\": [\n \"<string>\"\n ],\n \"barcodes\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("x-developer-request-token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-v2.production.higg.org/pm-api/v1/product/update/{product_id}")
.header("x-api-key", "<api-key>")
.header("x-developer-request-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"modelNumber\": \"<string>\",\n \"baseMaterials\": [\n {\n \"_id\": \"<string>\",\n \"amount\": 123,\n \"partName\": \"<string>\"\n }\n ],\n \"customMaterials\": [\n {\n \"_id\": \"<string>\",\n \"amount\": 123,\n \"partName\": \"<string>\"\n }\n ],\n \"packageMaterials\": [\n {\n \"_id\": \"<string>\",\n \"amount\": 123,\n \"partName\": \"<string>\"\n }\n ],\n \"trimMaterials\": [\n {\n \"_id\": \"<string>\",\n \"amount\": 123,\n \"partName\": \"<string>\"\n }\n ],\n \"certifications\": [\n \"<string>\"\n ],\n \"barcodes\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-v2.production.higg.org/pm-api/v1/product/update/{product_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["x-developer-request-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"modelNumber\": \"<string>\",\n \"baseMaterials\": [\n {\n \"_id\": \"<string>\",\n \"amount\": 123,\n \"partName\": \"<string>\"\n }\n ],\n \"customMaterials\": [\n {\n \"_id\": \"<string>\",\n \"amount\": 123,\n \"partName\": \"<string>\"\n }\n ],\n \"packageMaterials\": [\n {\n \"_id\": \"<string>\",\n \"amount\": 123,\n \"partName\": \"<string>\"\n }\n ],\n \"trimMaterials\": [\n {\n \"_id\": \"<string>\",\n \"amount\": 123,\n \"partName\": \"<string>\"\n }\n ],\n \"certifications\": [\n \"<string>\"\n ],\n \"barcodes\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"scores": {},
"billOfMaterialScores": {},
"certifications": [
{
"_id": "<string>",
"assertionAuthorityName": "<string>",
"assertionStandardName": "<string>",
"certificateName": "<string>",
"assertionId": "<string>",
"assertionStandardId": "<string>",
"dateExpires": 123,
"proofBody": "<string>",
"dateIssued": 123,
"certificationFiles": [
"<string>"
]
}
],
"productNetWeight": 123,
"bomNetWeight": 123,
"scoresTotalAltProductCare": {},
"logisticsImpacts": {},
"packagingImpacts": {},
"productCareImpacts": {},
"endOfUseImpacts": {},
"retailImpacts": {},
"dosImpacts": {},
"totalPerUseImpacts": {},
"materials": [
{
"scores": {},
"baseScores": {}
}
]
}Updating Products
The PM API provides functionality to update products via the API. See PM Data Dictionary for details about the parameters. The API uses the product id to identify the product to update. The user can then optionally send the following information to update the product. Only the parameters sent via the update are updated. Note that the product type and category are not editable via the API or manually in the Product Module tool. The user can update: • Product name • Product style/model number • Bill of Materials—note that updating bill of materials completely overwrites all previously entered bill of materials information.Update
{
"name": "test BoM 201",
"productType": "Apparel",
"productCategory": "Dress",
"modelNumber": "test5"
"packageMaterials":[{
"_id": "samplepackage:PK012",
"part name":"xyz package",
"amount": 1,
"measureUnit": "units"
}],
"trimMaterials":[{
"_id": "sampletrim:TR001",
"amount": 1,
"measureUnit": "units"
}],
"baseMaterials":[{
"_id": "TX0001",
"amount": 1,
"measureUnit": "kilograms"
}],
"customMaterials":[{
"_id": "material:d68657bf-5c3e-472d-a4da-10c8d8e3614b",
"amount": 1,
"measureUnit": "kilograms"
}]
}
Finding products update by user
A common use case is to search for products that have been manually updated by a user in Product Module, in order to pull the updated product impacts into the PLM. Users can search for “PlatformModifiedBy”: “User” to find products updated by users directly in PM. The “lastEditedAfter”: 0 and “lastEditedBefore”: 0 search parameters can be used to set the date period to search for edits.Products updated by user
{
"platformModifiedBy": "User",
"lastEditedAfter": "2021-01-13T16:38:19.386Z",
"lastEditedBefore": "2021-12-13T20:38:19.386Z"
}
Body
application/json
Response
200 - application/json
Ok

