curl --request POST \
--url https://api-v2.production.higg.org/pic-api/v1/products/update/{productId} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--header 'x-developer-request-token: <api-key>' \
--data '
{
"name": "<string>",
"weight": 123,
"weightIsPrimaryData": true,
"taxonomyId": "<string>",
"size": "<string>",
"productCategory": "<string>",
"categoryExpansionId": "<string>",
"packaging": [
{
"packagingId": "<string>",
"amount": 123
}
],
"materials": [
{
"netUse": 123,
"materialId": "<string>",
"composition": 123
}
],
"components": [
{
"componentId": "<string>",
"unit": 123
}
],
"addPurchaseOrder": [
{
"purchaseOrderId": "<string>",
"purchaseDate": "<string>",
"amountPurchase": 123,
"assembly": {
"femId": "<string>"
}
}
],
"updatePurchaseOrder": [
{
"_id": "<string>",
"purchaseOrderId": "<string>",
"purchaseDate": "<string>",
"amountPurchase": 123,
"assembly": {
"femId": "<string>"
}
}
],
"removePurchaseOrder": [
"<string>"
],
"frenchLabelOptionalFields": {
"countrySpinning": {
"code": "<string>",
"name": "<string>"
},
"upcycled": true,
"price": 123,
"numberOfReferences": 123
},
"isMaterialWeight": true,
"identifier": "<string>",
"tags": [
"<string>"
]
}
'import requests
url = "https://api-v2.production.higg.org/pic-api/v1/products/update/{productId}"
payload = {
"name": "<string>",
"weight": 123,
"weightIsPrimaryData": True,
"taxonomyId": "<string>",
"size": "<string>",
"productCategory": "<string>",
"categoryExpansionId": "<string>",
"packaging": [
{
"packagingId": "<string>",
"amount": 123
}
],
"materials": [
{
"netUse": 123,
"materialId": "<string>",
"composition": 123
}
],
"components": [
{
"componentId": "<string>",
"unit": 123
}
],
"addPurchaseOrder": [
{
"purchaseOrderId": "<string>",
"purchaseDate": "<string>",
"amountPurchase": 123,
"assembly": { "femId": "<string>" }
}
],
"updatePurchaseOrder": [
{
"_id": "<string>",
"purchaseOrderId": "<string>",
"purchaseDate": "<string>",
"amountPurchase": 123,
"assembly": { "femId": "<string>" }
}
],
"removePurchaseOrder": ["<string>"],
"frenchLabelOptionalFields": {
"countrySpinning": {
"code": "<string>",
"name": "<string>"
},
"upcycled": True,
"price": 123,
"numberOfReferences": 123
},
"isMaterialWeight": True,
"identifier": "<string>",
"tags": ["<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>',
weight: 123,
weightIsPrimaryData: true,
taxonomyId: '<string>',
size: '<string>',
productCategory: '<string>',
categoryExpansionId: '<string>',
packaging: [{packagingId: '<string>', amount: 123}],
materials: [{netUse: 123, materialId: '<string>', composition: 123}],
components: [{componentId: '<string>', unit: 123}],
addPurchaseOrder: [
{
purchaseOrderId: '<string>',
purchaseDate: '<string>',
amountPurchase: 123,
assembly: {femId: '<string>'}
}
],
updatePurchaseOrder: [
{
_id: '<string>',
purchaseOrderId: '<string>',
purchaseDate: '<string>',
amountPurchase: 123,
assembly: {femId: '<string>'}
}
],
removePurchaseOrder: ['<string>'],
frenchLabelOptionalFields: {
countrySpinning: {code: '<string>', name: '<string>'},
upcycled: true,
price: 123,
numberOfReferences: 123
},
isMaterialWeight: true,
identifier: '<string>',
tags: ['<string>']
})
};
fetch('https://api-v2.production.higg.org/pic-api/v1/products/update/{productId}', 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/pic-api/v1/products/update/{productId}",
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>',
'weight' => 123,
'weightIsPrimaryData' => true,
'taxonomyId' => '<string>',
'size' => '<string>',
'productCategory' => '<string>',
'categoryExpansionId' => '<string>',
'packaging' => [
[
'packagingId' => '<string>',
'amount' => 123
]
],
'materials' => [
[
'netUse' => 123,
'materialId' => '<string>',
'composition' => 123
]
],
'components' => [
[
'componentId' => '<string>',
'unit' => 123
]
],
'addPurchaseOrder' => [
[
'purchaseOrderId' => '<string>',
'purchaseDate' => '<string>',
'amountPurchase' => 123,
'assembly' => [
'femId' => '<string>'
]
]
],
'updatePurchaseOrder' => [
[
'_id' => '<string>',
'purchaseOrderId' => '<string>',
'purchaseDate' => '<string>',
'amountPurchase' => 123,
'assembly' => [
'femId' => '<string>'
]
]
],
'removePurchaseOrder' => [
'<string>'
],
'frenchLabelOptionalFields' => [
'countrySpinning' => [
'code' => '<string>',
'name' => '<string>'
],
'upcycled' => true,
'price' => 123,
'numberOfReferences' => 123
],
'isMaterialWeight' => true,
'identifier' => '<string>',
'tags' => [
'<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/pic-api/v1/products/update/{productId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"weight\": 123,\n \"weightIsPrimaryData\": true,\n \"taxonomyId\": \"<string>\",\n \"size\": \"<string>\",\n \"productCategory\": \"<string>\",\n \"categoryExpansionId\": \"<string>\",\n \"packaging\": [\n {\n \"packagingId\": \"<string>\",\n \"amount\": 123\n }\n ],\n \"materials\": [\n {\n \"netUse\": 123,\n \"materialId\": \"<string>\",\n \"composition\": 123\n }\n ],\n \"components\": [\n {\n \"componentId\": \"<string>\",\n \"unit\": 123\n }\n ],\n \"addPurchaseOrder\": [\n {\n \"purchaseOrderId\": \"<string>\",\n \"purchaseDate\": \"<string>\",\n \"amountPurchase\": 123,\n \"assembly\": {\n \"femId\": \"<string>\"\n }\n }\n ],\n \"updatePurchaseOrder\": [\n {\n \"_id\": \"<string>\",\n \"purchaseOrderId\": \"<string>\",\n \"purchaseDate\": \"<string>\",\n \"amountPurchase\": 123,\n \"assembly\": {\n \"femId\": \"<string>\"\n }\n }\n ],\n \"removePurchaseOrder\": [\n \"<string>\"\n ],\n \"frenchLabelOptionalFields\": {\n \"countrySpinning\": {\n \"code\": \"<string>\",\n \"name\": \"<string>\"\n },\n \"upcycled\": true,\n \"price\": 123,\n \"numberOfReferences\": 123\n },\n \"isMaterialWeight\": true,\n \"identifier\": \"<string>\",\n \"tags\": [\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/pic-api/v1/products/update/{productId}")
.header("x-api-key", "<api-key>")
.header("x-developer-request-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"weight\": 123,\n \"weightIsPrimaryData\": true,\n \"taxonomyId\": \"<string>\",\n \"size\": \"<string>\",\n \"productCategory\": \"<string>\",\n \"categoryExpansionId\": \"<string>\",\n \"packaging\": [\n {\n \"packagingId\": \"<string>\",\n \"amount\": 123\n }\n ],\n \"materials\": [\n {\n \"netUse\": 123,\n \"materialId\": \"<string>\",\n \"composition\": 123\n }\n ],\n \"components\": [\n {\n \"componentId\": \"<string>\",\n \"unit\": 123\n }\n ],\n \"addPurchaseOrder\": [\n {\n \"purchaseOrderId\": \"<string>\",\n \"purchaseDate\": \"<string>\",\n \"amountPurchase\": 123,\n \"assembly\": {\n \"femId\": \"<string>\"\n }\n }\n ],\n \"updatePurchaseOrder\": [\n {\n \"_id\": \"<string>\",\n \"purchaseOrderId\": \"<string>\",\n \"purchaseDate\": \"<string>\",\n \"amountPurchase\": 123,\n \"assembly\": {\n \"femId\": \"<string>\"\n }\n }\n ],\n \"removePurchaseOrder\": [\n \"<string>\"\n ],\n \"frenchLabelOptionalFields\": {\n \"countrySpinning\": {\n \"code\": \"<string>\",\n \"name\": \"<string>\"\n },\n \"upcycled\": true,\n \"price\": 123,\n \"numberOfReferences\": 123\n },\n \"isMaterialWeight\": true,\n \"identifier\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-v2.production.higg.org/pic-api/v1/products/update/{productId}")
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 \"weight\": 123,\n \"weightIsPrimaryData\": true,\n \"taxonomyId\": \"<string>\",\n \"size\": \"<string>\",\n \"productCategory\": \"<string>\",\n \"categoryExpansionId\": \"<string>\",\n \"packaging\": [\n {\n \"packagingId\": \"<string>\",\n \"amount\": 123\n }\n ],\n \"materials\": [\n {\n \"netUse\": 123,\n \"materialId\": \"<string>\",\n \"composition\": 123\n }\n ],\n \"components\": [\n {\n \"componentId\": \"<string>\",\n \"unit\": 123\n }\n ],\n \"addPurchaseOrder\": [\n {\n \"purchaseOrderId\": \"<string>\",\n \"purchaseDate\": \"<string>\",\n \"amountPurchase\": 123,\n \"assembly\": {\n \"femId\": \"<string>\"\n }\n }\n ],\n \"updatePurchaseOrder\": [\n {\n \"_id\": \"<string>\",\n \"purchaseOrderId\": \"<string>\",\n \"purchaseDate\": \"<string>\",\n \"amountPurchase\": 123,\n \"assembly\": {\n \"femId\": \"<string>\"\n }\n }\n ],\n \"removePurchaseOrder\": [\n \"<string>\"\n ],\n \"frenchLabelOptionalFields\": {\n \"countrySpinning\": {\n \"code\": \"<string>\",\n \"name\": \"<string>\"\n },\n \"upcycled\": true,\n \"price\": 123,\n \"numberOfReferences\": 123\n },\n \"isMaterialWeight\": true,\n \"identifier\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"_id": "<string>",
"name": "<string>",
"weightInformation": {
"convertedToKg": 123,
"weight": 123,
"isPrimaryData": true
},
"type": "<string>",
"createdOn": {},
"user": {
"_id": "<string>",
"email": "<string>",
"firstname": "<string>",
"lastname": "<string>"
},
"account": {
"_id": "<string>",
"name": "<string>",
"country": "<string>",
"sacId": 123,
"oar_id": "<string>",
"demoaccount": true,
"socialCreditId": "<string>",
"taxId": "<string>",
"bluesignId": "<string>",
"zdhcId": "<string>",
"ipeViolation": {
"totalViolations": 123
},
"ffcId": 123
},
"materials": [
{
"name": "<string>",
"netUse": 123,
"materialId": "<string>",
"composition": 123,
"weightInformation": {
"convertedToKg": 123,
"weight": 123,
"netWeight": 123
},
"isMsiMaterial": true,
"isPicMaterialLibrary": true,
"code": "<string>",
"dataSource": "<string>",
"isOutdated": true,
"description": "<string>",
"impacts": {
"tier4Impact": 123,
"tier2and3Impact": 123,
"totalMaterialLibrary": 123,
"totalTierImpact": 123,
"uncertainty": {
"lower": 123,
"upper": 123
}
}
}
],
"materialImpact": 123,
"tier1Impact": 123,
"packagingImpact": 123,
"logisticsImpactsUpstreamTD": 123,
"logisticsImpactsDTImpact": 123,
"logisticsImpactsDCImpact": 123,
"logisticsImpactsRetailImpact": 123,
"productCareImpacts": 123,
"endOfUseImpact": 123,
"_rev": "<string>",
"version": "<string>",
"productType": "<string>",
"productCategory": "<string>",
"packagingWeight": {
"convertedToKg": 123,
"weight": 123,
"isPrimaryData": true
},
"modelNumber": "<string>",
"barcodes": [
"<string>"
],
"dataSource": "<string>",
"modifiedOn": {},
"deleted": true,
"modifiedBy": {
"_id": "<string>",
"email": "<string>",
"firstname": "<string>",
"lastname": "<string>"
},
"deletedBy": {
"_id": "<string>",
"email": "<string>",
"firstname": "<string>",
"lastname": "<string>"
},
"defaultProduct": {
"defaultProductId": "<string>",
"name": "<string>"
},
"components": [
{
"name": "<string>",
"componentId": "<string>",
"unit": 123,
"weightInformation": {
"convertedToKg": 123,
"weight": 123,
"isPrimaryData": true
},
"isMsiComponent": true,
"isOutdated": true,
"dataSource": "<string>",
"description": "<string>",
"impacts": {
"tier4Impact": 123,
"tier2and3Impact": 123,
"totalMaterialLibrary": 123,
"totalTierImpact": 123,
"uncertainty": {
"lower": 123,
"upper": 123
}
}
}
],
"packaging": [
{
"packagingId": "<string>",
"amount": 123,
"name": "<string>",
"weightInformation": {
"convertedToKg": 123,
"weight": 123,
"isPrimaryData": true
},
"isMsiPackaging": true,
"isOutdated": true,
"code": "<string>",
"dataSource": "<string>",
"description": "<string>",
"impacts": {
"tier4Impact": 123,
"tier2and3Impact": 123,
"totalMaterialLibrary": 123,
"totalTierImpact": 123,
"uncertainty": {
"lower": 123,
"upper": 123
}
}
}
],
"notes": "<string>",
"purchaseOrder": [
{
"_id": "<string>",
"assembly": {
"isDefault": true,
"femId": "<string>",
"facilityName": "<string>",
"finalAssemblyRawText": "<string>",
"surveyVersion": "<string>",
"finalAssemblyImpacts": 123,
"printingProductDyeingImpacts": 123,
"totalNormalizedImpacts": 123,
"sipfacilitytype": [
"<string>"
],
"annualProd": "<string>",
"country": "<string>",
"femDescriptor": "<string>",
"year": 123,
"finishedProductImpacts": 123
},
"purchaseOrderId": "<string>",
"purchaseDate": 123,
"impactPerUnit": 123,
"totalImpactPerUnit": 123,
"pmVersion": "<string>",
"msiVersion": "<string>",
"version": "<string>",
"amountPurchase": 123,
"isOutdated": true,
"impactsPerUnitMultiPack": {
"materialImpact": 123,
"tier1Impact": 123,
"packagingImpact": 123,
"logisticsImpactsUpstreamTD": 123,
"logisticsImpactsDTImpact": 123,
"logisticsImpactsDCImpact": 123,
"logisticsImpactsRetailImpact": 123,
"productCareImpacts": 123,
"endOfUseImpact": 123,
"totalProductImpacts": 123,
"componentImpact": 123
},
"totalImpactsMultiPack": {
"materialImpact": 123,
"tier1Impact": 123,
"packagingImpact": 123,
"logisticsImpactsUpstreamTD": 123,
"logisticsImpactsDTImpact": 123,
"logisticsImpactsDCImpact": 123,
"logisticsImpactsRetailImpact": 123,
"productCareImpacts": 123,
"endOfUseImpact": 123,
"totalProductImpacts": 123,
"componentImpact": 123
},
"impactsPerUnit": {
"materialImpact": 123,
"tier1Impact": 123,
"packagingImpact": 123,
"logisticsImpactsUpstreamTD": 123,
"logisticsImpactsDTImpact": 123,
"logisticsImpactsDCImpact": 123,
"logisticsImpactsRetailImpact": 123,
"productCareImpacts": 123,
"endOfUseImpact": 123,
"totalProductImpacts": 123,
"componentImpact": 123
},
"totalImpacts": {
"materialImpact": 123,
"tier1Impact": 123,
"packagingImpact": 123,
"logisticsImpactsUpstreamTD": 123,
"logisticsImpactsDTImpact": 123,
"logisticsImpactsDCImpact": 123,
"logisticsImpactsRetailImpact": 123,
"productCareImpacts": 123,
"endOfUseImpact": 123,
"totalProductImpacts": 123,
"componentImpact": 123
}
}
],
"purchaseOrderImpactsTotal": {
"materialImpact": 123,
"tier1Impact": 123,
"packagingImpact": 123,
"logisticsImpactsUpstreamTD": 123,
"logisticsImpactsDTImpact": 123,
"logisticsImpactsDCImpact": 123,
"logisticsImpactsRetailImpact": 123,
"productCareImpacts": 123,
"endOfUseImpact": 123,
"totalProductImpacts": 123,
"componentImpact": 123
},
"componentImpact": 123,
"upstreamTransportation": 123,
"downstreamTransportationRetail": 123,
"downstreamTransportationConsumer": 123,
"distributionCenterUnOwned": 123,
"retailEnergyUnOwned": 123,
"frenchLabelManufacturingCountry": {
"code": "<string>",
"name": "<string>"
},
"frenchLabelFabricCountry": {
"code": "<string>",
"name": "<string>"
},
"frenchLabelDyeingCountry": {
"code": "<string>",
"name": "<string>"
},
"frenchLabelOptionalFields": {
"countrySpinning": {
"code": "<string>",
"name": "<string>"
},
"upcycled": true,
"price": 123,
"numberOfReferences": 123
},
"frenchLabelEligibility": {
"eligible": true,
"reasons": [
{
"message": "<string>"
}
]
},
"frenchLabelEcoScore": {
"score": 123,
"impacts": {
"acd": 123,
"cch": 123,
"etf": 123,
"etfC": 123,
"fru": 123,
"fwe": 123,
"htc": 123,
"htcC": 123,
"htn": 123,
"htnC": 123,
"ior": 123,
"ldu": 123,
"mru": 123,
"ozd": 123,
"pco": 123,
"pma": 123,
"swe": 123,
"tre": 123,
"wtu": 123,
"ecs": 123,
"pef": 123,
"microfibers": 123,
"outOfEuropeEOL": 123
},
"createdAt": 123,
"updatedAt": 123,
"impactsPercentageContribution": {
"acd": 123,
"cch": 123,
"etf": 123,
"etfC": 123,
"fru": 123,
"fwe": 123,
"htc": 123,
"htcC": 123,
"htn": 123,
"htnC": 123,
"ior": 123,
"ldu": 123,
"mru": 123,
"ozd": 123,
"pco": 123,
"pma": 123,
"swe": 123,
"tre": 123,
"wtu": 123,
"ecs": 123,
"pef": 123,
"microfibers": 123,
"outOfEuropeEOL": 123
},
"apiVersion": "<string>",
"apiResponseError": "<string>",
"complementsImpacts": {
"microfibers": 123,
"outOfEuropeEOL": 123,
"cropDiversity": 123,
"forest": 123,
"hedges": 123,
"livestockDensity": 123,
"permanentPasture": 123,
"plotSize": 123
},
"publishEligibility": {
"eligible": true,
"reasons": [
"<string>"
]
},
"publish": {
"publishedAt": 123,
"publishedBy": "<string>",
"filedScore": 123,
"internalReference": "<string>",
"nextEligibleAt": 123,
"attemptedAt": 123,
"attemptedBy": "<string>",
"apiResponseError": "<string>"
}
},
"identifier": "<string>",
"tags": [
"<string>"
]
}Update Product
Updates an existing product.
curl --request POST \
--url https://api-v2.production.higg.org/pic-api/v1/products/update/{productId} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--header 'x-developer-request-token: <api-key>' \
--data '
{
"name": "<string>",
"weight": 123,
"weightIsPrimaryData": true,
"taxonomyId": "<string>",
"size": "<string>",
"productCategory": "<string>",
"categoryExpansionId": "<string>",
"packaging": [
{
"packagingId": "<string>",
"amount": 123
}
],
"materials": [
{
"netUse": 123,
"materialId": "<string>",
"composition": 123
}
],
"components": [
{
"componentId": "<string>",
"unit": 123
}
],
"addPurchaseOrder": [
{
"purchaseOrderId": "<string>",
"purchaseDate": "<string>",
"amountPurchase": 123,
"assembly": {
"femId": "<string>"
}
}
],
"updatePurchaseOrder": [
{
"_id": "<string>",
"purchaseOrderId": "<string>",
"purchaseDate": "<string>",
"amountPurchase": 123,
"assembly": {
"femId": "<string>"
}
}
],
"removePurchaseOrder": [
"<string>"
],
"frenchLabelOptionalFields": {
"countrySpinning": {
"code": "<string>",
"name": "<string>"
},
"upcycled": true,
"price": 123,
"numberOfReferences": 123
},
"isMaterialWeight": true,
"identifier": "<string>",
"tags": [
"<string>"
]
}
'import requests
url = "https://api-v2.production.higg.org/pic-api/v1/products/update/{productId}"
payload = {
"name": "<string>",
"weight": 123,
"weightIsPrimaryData": True,
"taxonomyId": "<string>",
"size": "<string>",
"productCategory": "<string>",
"categoryExpansionId": "<string>",
"packaging": [
{
"packagingId": "<string>",
"amount": 123
}
],
"materials": [
{
"netUse": 123,
"materialId": "<string>",
"composition": 123
}
],
"components": [
{
"componentId": "<string>",
"unit": 123
}
],
"addPurchaseOrder": [
{
"purchaseOrderId": "<string>",
"purchaseDate": "<string>",
"amountPurchase": 123,
"assembly": { "femId": "<string>" }
}
],
"updatePurchaseOrder": [
{
"_id": "<string>",
"purchaseOrderId": "<string>",
"purchaseDate": "<string>",
"amountPurchase": 123,
"assembly": { "femId": "<string>" }
}
],
"removePurchaseOrder": ["<string>"],
"frenchLabelOptionalFields": {
"countrySpinning": {
"code": "<string>",
"name": "<string>"
},
"upcycled": True,
"price": 123,
"numberOfReferences": 123
},
"isMaterialWeight": True,
"identifier": "<string>",
"tags": ["<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>',
weight: 123,
weightIsPrimaryData: true,
taxonomyId: '<string>',
size: '<string>',
productCategory: '<string>',
categoryExpansionId: '<string>',
packaging: [{packagingId: '<string>', amount: 123}],
materials: [{netUse: 123, materialId: '<string>', composition: 123}],
components: [{componentId: '<string>', unit: 123}],
addPurchaseOrder: [
{
purchaseOrderId: '<string>',
purchaseDate: '<string>',
amountPurchase: 123,
assembly: {femId: '<string>'}
}
],
updatePurchaseOrder: [
{
_id: '<string>',
purchaseOrderId: '<string>',
purchaseDate: '<string>',
amountPurchase: 123,
assembly: {femId: '<string>'}
}
],
removePurchaseOrder: ['<string>'],
frenchLabelOptionalFields: {
countrySpinning: {code: '<string>', name: '<string>'},
upcycled: true,
price: 123,
numberOfReferences: 123
},
isMaterialWeight: true,
identifier: '<string>',
tags: ['<string>']
})
};
fetch('https://api-v2.production.higg.org/pic-api/v1/products/update/{productId}', 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/pic-api/v1/products/update/{productId}",
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>',
'weight' => 123,
'weightIsPrimaryData' => true,
'taxonomyId' => '<string>',
'size' => '<string>',
'productCategory' => '<string>',
'categoryExpansionId' => '<string>',
'packaging' => [
[
'packagingId' => '<string>',
'amount' => 123
]
],
'materials' => [
[
'netUse' => 123,
'materialId' => '<string>',
'composition' => 123
]
],
'components' => [
[
'componentId' => '<string>',
'unit' => 123
]
],
'addPurchaseOrder' => [
[
'purchaseOrderId' => '<string>',
'purchaseDate' => '<string>',
'amountPurchase' => 123,
'assembly' => [
'femId' => '<string>'
]
]
],
'updatePurchaseOrder' => [
[
'_id' => '<string>',
'purchaseOrderId' => '<string>',
'purchaseDate' => '<string>',
'amountPurchase' => 123,
'assembly' => [
'femId' => '<string>'
]
]
],
'removePurchaseOrder' => [
'<string>'
],
'frenchLabelOptionalFields' => [
'countrySpinning' => [
'code' => '<string>',
'name' => '<string>'
],
'upcycled' => true,
'price' => 123,
'numberOfReferences' => 123
],
'isMaterialWeight' => true,
'identifier' => '<string>',
'tags' => [
'<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/pic-api/v1/products/update/{productId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"weight\": 123,\n \"weightIsPrimaryData\": true,\n \"taxonomyId\": \"<string>\",\n \"size\": \"<string>\",\n \"productCategory\": \"<string>\",\n \"categoryExpansionId\": \"<string>\",\n \"packaging\": [\n {\n \"packagingId\": \"<string>\",\n \"amount\": 123\n }\n ],\n \"materials\": [\n {\n \"netUse\": 123,\n \"materialId\": \"<string>\",\n \"composition\": 123\n }\n ],\n \"components\": [\n {\n \"componentId\": \"<string>\",\n \"unit\": 123\n }\n ],\n \"addPurchaseOrder\": [\n {\n \"purchaseOrderId\": \"<string>\",\n \"purchaseDate\": \"<string>\",\n \"amountPurchase\": 123,\n \"assembly\": {\n \"femId\": \"<string>\"\n }\n }\n ],\n \"updatePurchaseOrder\": [\n {\n \"_id\": \"<string>\",\n \"purchaseOrderId\": \"<string>\",\n \"purchaseDate\": \"<string>\",\n \"amountPurchase\": 123,\n \"assembly\": {\n \"femId\": \"<string>\"\n }\n }\n ],\n \"removePurchaseOrder\": [\n \"<string>\"\n ],\n \"frenchLabelOptionalFields\": {\n \"countrySpinning\": {\n \"code\": \"<string>\",\n \"name\": \"<string>\"\n },\n \"upcycled\": true,\n \"price\": 123,\n \"numberOfReferences\": 123\n },\n \"isMaterialWeight\": true,\n \"identifier\": \"<string>\",\n \"tags\": [\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/pic-api/v1/products/update/{productId}")
.header("x-api-key", "<api-key>")
.header("x-developer-request-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"weight\": 123,\n \"weightIsPrimaryData\": true,\n \"taxonomyId\": \"<string>\",\n \"size\": \"<string>\",\n \"productCategory\": \"<string>\",\n \"categoryExpansionId\": \"<string>\",\n \"packaging\": [\n {\n \"packagingId\": \"<string>\",\n \"amount\": 123\n }\n ],\n \"materials\": [\n {\n \"netUse\": 123,\n \"materialId\": \"<string>\",\n \"composition\": 123\n }\n ],\n \"components\": [\n {\n \"componentId\": \"<string>\",\n \"unit\": 123\n }\n ],\n \"addPurchaseOrder\": [\n {\n \"purchaseOrderId\": \"<string>\",\n \"purchaseDate\": \"<string>\",\n \"amountPurchase\": 123,\n \"assembly\": {\n \"femId\": \"<string>\"\n }\n }\n ],\n \"updatePurchaseOrder\": [\n {\n \"_id\": \"<string>\",\n \"purchaseOrderId\": \"<string>\",\n \"purchaseDate\": \"<string>\",\n \"amountPurchase\": 123,\n \"assembly\": {\n \"femId\": \"<string>\"\n }\n }\n ],\n \"removePurchaseOrder\": [\n \"<string>\"\n ],\n \"frenchLabelOptionalFields\": {\n \"countrySpinning\": {\n \"code\": \"<string>\",\n \"name\": \"<string>\"\n },\n \"upcycled\": true,\n \"price\": 123,\n \"numberOfReferences\": 123\n },\n \"isMaterialWeight\": true,\n \"identifier\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-v2.production.higg.org/pic-api/v1/products/update/{productId}")
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 \"weight\": 123,\n \"weightIsPrimaryData\": true,\n \"taxonomyId\": \"<string>\",\n \"size\": \"<string>\",\n \"productCategory\": \"<string>\",\n \"categoryExpansionId\": \"<string>\",\n \"packaging\": [\n {\n \"packagingId\": \"<string>\",\n \"amount\": 123\n }\n ],\n \"materials\": [\n {\n \"netUse\": 123,\n \"materialId\": \"<string>\",\n \"composition\": 123\n }\n ],\n \"components\": [\n {\n \"componentId\": \"<string>\",\n \"unit\": 123\n }\n ],\n \"addPurchaseOrder\": [\n {\n \"purchaseOrderId\": \"<string>\",\n \"purchaseDate\": \"<string>\",\n \"amountPurchase\": 123,\n \"assembly\": {\n \"femId\": \"<string>\"\n }\n }\n ],\n \"updatePurchaseOrder\": [\n {\n \"_id\": \"<string>\",\n \"purchaseOrderId\": \"<string>\",\n \"purchaseDate\": \"<string>\",\n \"amountPurchase\": 123,\n \"assembly\": {\n \"femId\": \"<string>\"\n }\n }\n ],\n \"removePurchaseOrder\": [\n \"<string>\"\n ],\n \"frenchLabelOptionalFields\": {\n \"countrySpinning\": {\n \"code\": \"<string>\",\n \"name\": \"<string>\"\n },\n \"upcycled\": true,\n \"price\": 123,\n \"numberOfReferences\": 123\n },\n \"isMaterialWeight\": true,\n \"identifier\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"_id": "<string>",
"name": "<string>",
"weightInformation": {
"convertedToKg": 123,
"weight": 123,
"isPrimaryData": true
},
"type": "<string>",
"createdOn": {},
"user": {
"_id": "<string>",
"email": "<string>",
"firstname": "<string>",
"lastname": "<string>"
},
"account": {
"_id": "<string>",
"name": "<string>",
"country": "<string>",
"sacId": 123,
"oar_id": "<string>",
"demoaccount": true,
"socialCreditId": "<string>",
"taxId": "<string>",
"bluesignId": "<string>",
"zdhcId": "<string>",
"ipeViolation": {
"totalViolations": 123
},
"ffcId": 123
},
"materials": [
{
"name": "<string>",
"netUse": 123,
"materialId": "<string>",
"composition": 123,
"weightInformation": {
"convertedToKg": 123,
"weight": 123,
"netWeight": 123
},
"isMsiMaterial": true,
"isPicMaterialLibrary": true,
"code": "<string>",
"dataSource": "<string>",
"isOutdated": true,
"description": "<string>",
"impacts": {
"tier4Impact": 123,
"tier2and3Impact": 123,
"totalMaterialLibrary": 123,
"totalTierImpact": 123,
"uncertainty": {
"lower": 123,
"upper": 123
}
}
}
],
"materialImpact": 123,
"tier1Impact": 123,
"packagingImpact": 123,
"logisticsImpactsUpstreamTD": 123,
"logisticsImpactsDTImpact": 123,
"logisticsImpactsDCImpact": 123,
"logisticsImpactsRetailImpact": 123,
"productCareImpacts": 123,
"endOfUseImpact": 123,
"_rev": "<string>",
"version": "<string>",
"productType": "<string>",
"productCategory": "<string>",
"packagingWeight": {
"convertedToKg": 123,
"weight": 123,
"isPrimaryData": true
},
"modelNumber": "<string>",
"barcodes": [
"<string>"
],
"dataSource": "<string>",
"modifiedOn": {},
"deleted": true,
"modifiedBy": {
"_id": "<string>",
"email": "<string>",
"firstname": "<string>",
"lastname": "<string>"
},
"deletedBy": {
"_id": "<string>",
"email": "<string>",
"firstname": "<string>",
"lastname": "<string>"
},
"defaultProduct": {
"defaultProductId": "<string>",
"name": "<string>"
},
"components": [
{
"name": "<string>",
"componentId": "<string>",
"unit": 123,
"weightInformation": {
"convertedToKg": 123,
"weight": 123,
"isPrimaryData": true
},
"isMsiComponent": true,
"isOutdated": true,
"dataSource": "<string>",
"description": "<string>",
"impacts": {
"tier4Impact": 123,
"tier2and3Impact": 123,
"totalMaterialLibrary": 123,
"totalTierImpact": 123,
"uncertainty": {
"lower": 123,
"upper": 123
}
}
}
],
"packaging": [
{
"packagingId": "<string>",
"amount": 123,
"name": "<string>",
"weightInformation": {
"convertedToKg": 123,
"weight": 123,
"isPrimaryData": true
},
"isMsiPackaging": true,
"isOutdated": true,
"code": "<string>",
"dataSource": "<string>",
"description": "<string>",
"impacts": {
"tier4Impact": 123,
"tier2and3Impact": 123,
"totalMaterialLibrary": 123,
"totalTierImpact": 123,
"uncertainty": {
"lower": 123,
"upper": 123
}
}
}
],
"notes": "<string>",
"purchaseOrder": [
{
"_id": "<string>",
"assembly": {
"isDefault": true,
"femId": "<string>",
"facilityName": "<string>",
"finalAssemblyRawText": "<string>",
"surveyVersion": "<string>",
"finalAssemblyImpacts": 123,
"printingProductDyeingImpacts": 123,
"totalNormalizedImpacts": 123,
"sipfacilitytype": [
"<string>"
],
"annualProd": "<string>",
"country": "<string>",
"femDescriptor": "<string>",
"year": 123,
"finishedProductImpacts": 123
},
"purchaseOrderId": "<string>",
"purchaseDate": 123,
"impactPerUnit": 123,
"totalImpactPerUnit": 123,
"pmVersion": "<string>",
"msiVersion": "<string>",
"version": "<string>",
"amountPurchase": 123,
"isOutdated": true,
"impactsPerUnitMultiPack": {
"materialImpact": 123,
"tier1Impact": 123,
"packagingImpact": 123,
"logisticsImpactsUpstreamTD": 123,
"logisticsImpactsDTImpact": 123,
"logisticsImpactsDCImpact": 123,
"logisticsImpactsRetailImpact": 123,
"productCareImpacts": 123,
"endOfUseImpact": 123,
"totalProductImpacts": 123,
"componentImpact": 123
},
"totalImpactsMultiPack": {
"materialImpact": 123,
"tier1Impact": 123,
"packagingImpact": 123,
"logisticsImpactsUpstreamTD": 123,
"logisticsImpactsDTImpact": 123,
"logisticsImpactsDCImpact": 123,
"logisticsImpactsRetailImpact": 123,
"productCareImpacts": 123,
"endOfUseImpact": 123,
"totalProductImpacts": 123,
"componentImpact": 123
},
"impactsPerUnit": {
"materialImpact": 123,
"tier1Impact": 123,
"packagingImpact": 123,
"logisticsImpactsUpstreamTD": 123,
"logisticsImpactsDTImpact": 123,
"logisticsImpactsDCImpact": 123,
"logisticsImpactsRetailImpact": 123,
"productCareImpacts": 123,
"endOfUseImpact": 123,
"totalProductImpacts": 123,
"componentImpact": 123
},
"totalImpacts": {
"materialImpact": 123,
"tier1Impact": 123,
"packagingImpact": 123,
"logisticsImpactsUpstreamTD": 123,
"logisticsImpactsDTImpact": 123,
"logisticsImpactsDCImpact": 123,
"logisticsImpactsRetailImpact": 123,
"productCareImpacts": 123,
"endOfUseImpact": 123,
"totalProductImpacts": 123,
"componentImpact": 123
}
}
],
"purchaseOrderImpactsTotal": {
"materialImpact": 123,
"tier1Impact": 123,
"packagingImpact": 123,
"logisticsImpactsUpstreamTD": 123,
"logisticsImpactsDTImpact": 123,
"logisticsImpactsDCImpact": 123,
"logisticsImpactsRetailImpact": 123,
"productCareImpacts": 123,
"endOfUseImpact": 123,
"totalProductImpacts": 123,
"componentImpact": 123
},
"componentImpact": 123,
"upstreamTransportation": 123,
"downstreamTransportationRetail": 123,
"downstreamTransportationConsumer": 123,
"distributionCenterUnOwned": 123,
"retailEnergyUnOwned": 123,
"frenchLabelManufacturingCountry": {
"code": "<string>",
"name": "<string>"
},
"frenchLabelFabricCountry": {
"code": "<string>",
"name": "<string>"
},
"frenchLabelDyeingCountry": {
"code": "<string>",
"name": "<string>"
},
"frenchLabelOptionalFields": {
"countrySpinning": {
"code": "<string>",
"name": "<string>"
},
"upcycled": true,
"price": 123,
"numberOfReferences": 123
},
"frenchLabelEligibility": {
"eligible": true,
"reasons": [
{
"message": "<string>"
}
]
},
"frenchLabelEcoScore": {
"score": 123,
"impacts": {
"acd": 123,
"cch": 123,
"etf": 123,
"etfC": 123,
"fru": 123,
"fwe": 123,
"htc": 123,
"htcC": 123,
"htn": 123,
"htnC": 123,
"ior": 123,
"ldu": 123,
"mru": 123,
"ozd": 123,
"pco": 123,
"pma": 123,
"swe": 123,
"tre": 123,
"wtu": 123,
"ecs": 123,
"pef": 123,
"microfibers": 123,
"outOfEuropeEOL": 123
},
"createdAt": 123,
"updatedAt": 123,
"impactsPercentageContribution": {
"acd": 123,
"cch": 123,
"etf": 123,
"etfC": 123,
"fru": 123,
"fwe": 123,
"htc": 123,
"htcC": 123,
"htn": 123,
"htnC": 123,
"ior": 123,
"ldu": 123,
"mru": 123,
"ozd": 123,
"pco": 123,
"pma": 123,
"swe": 123,
"tre": 123,
"wtu": 123,
"ecs": 123,
"pef": 123,
"microfibers": 123,
"outOfEuropeEOL": 123
},
"apiVersion": "<string>",
"apiResponseError": "<string>",
"complementsImpacts": {
"microfibers": 123,
"outOfEuropeEOL": 123,
"cropDiversity": 123,
"forest": 123,
"hedges": 123,
"livestockDensity": 123,
"permanentPasture": 123,
"plotSize": 123
},
"publishEligibility": {
"eligible": true,
"reasons": [
"<string>"
]
},
"publish": {
"publishedAt": 123,
"publishedBy": "<string>",
"filedScore": 123,
"internalReference": "<string>",
"nextEligibleAt": 123,
"attemptedAt": 123,
"attemptedBy": "<string>",
"apiResponseError": "<string>"
}
},
"identifier": "<string>",
"tags": [
"<string>"
]
}PIC - Update Product with French Eco-Score requirements
Request body properties
| Name | Type | Description |
|---|---|---|
name | string | New name for the product. |
weight | number | New weight. Condition: If updated, and isMaterialWeight is false, this field is required. |
weightMeasureUnit | string (enum) | Unit for the weight. |
isMaterialWeight | boolean | Toggle whether weight is calculated from materials. |
taxonomyId | string | Update taxonomy ID. |
size | string | Update product size. |
productCategory | string | [DEPRECATED] The category of the product. Use categoryExpansionId instead. |
categoryExpansionId | string | The product category code. |
packaging | Array<PackagingData> | Replace packaging list. Each item requires packagingId and amount. |
materials | Array<MaterialsData> | Replace materials list. Each item requires materialId and netUse. |
components | Array<ComponentData> | Replace components list. Each item requires componentId and unit. |
addPurchaseOrder | Array<POData> | Add new purchase orders to the product. Items include purchaseOrderId, purchaseDate, amountPurchase, and assembly (with femId). |
updatePurchaseOrder | Array<POData> | Update existing purchase orders. Items require _id. |
removePurchaseOrder | Array<string> | List of purchase order IDs (_id) to remove. |
frenchLabelCountry | object<code, name> | [FRENCH ECO-SCORE] The product’s final assembly location. Check the location list here. |
frenchLabelDyeingCountry | object<code, name> | [FRENCH ECO-SCORE] The product’s preparation, dyeing, and finishing location. Check the location list here. |
frenchLabelFabricCountry | object<code, name> | [FRENCH ECO-SCORE] The product’s textile formation location. Check the location list here. |
frenchLabelOptionalFields | object | [FRENCH ECO-SCORE] Optional fields for durability and scoring. See the Optional Fields reference for details. |
weightIsPrimaryData | boolean | [FRENCH ECO-SCORE] Indicates if the weight data is primary data. |
Implementation details
- Partial updates: Most fields are optional. Providing them will update the value; omitting them usually leaves the existing value (standard PATCH/Update behavior), though the API treats this as a command object.
- Purchase order logic: The update logic for purchase orders is complex. You can
add,update, andremovepurchase orders in a single call.addPurchaseOrder: Appends new purchase orders.updatePurchaseOrder: Matches by_idand updates fields.removePurchaseOrder: Removes purchase orders by_id.
- FEM assessment IDs: When adding or updating purchase orders with assembly data, ensure you use valid FEM assessment IDs for the
femIdfield.
Path Parameters
Body
kilograms, grams, milligram, pound, ounce Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Determines what country this product was made in, for the French Label Eco-Scores.
Show child attributes
Show child attributes
Determines what country this product was dyed in, for the French Label Eco-Scores.
Show child attributes
Show child attributes
Determines what country this product was woven or knitted in, for the French Label Eco-Scores.
Show child attributes
Show child attributes
Optional durability fields for the French Label Eco-Score, gated by EnableFrenchEcoOptionalFields config key.
Show child attributes
Show child attributes
GTIN, SKU, UPC, OTHER Response
Ok
API light version of a CorpRepProductEntity for the API. Ideally we would do this with a Pick or Omit, but tsoa doesn't recognice those
corpRep weight information
Show child attributes
Show child attributes
This interface was referenced by Exports's JSON-Schema via the definition "userRef".
Show child attributes
Show child attributes
This interface was referenced by Exports's JSON-Schema via the definition "accountRef".
Show child attributes
Show child attributes
Show child attributes
Show child attributes
corpRep weight information
Show child attributes
Show child attributes
This interface was referenced by Exports's JSON-Schema via the definition "userRef".
Show child attributes
Show child attributes
This interface was referenced by Exports's JSON-Schema via the definition "userRef".
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
corpRep weight information
Show child attributes
Show child attributes
Determines what country this product was made in, for the French Label Eco-Scores.
Show child attributes
Show child attributes
Determines what country this product was woven or knitted in, for the French Label Eco-Scores.
Show child attributes
Show child attributes
Determines what country this product was dyed in, for the French Label Eco-Scores.
Show child attributes
Show child attributes
Optional durability fields for the French Label Eco-Score, gated by EnableFrenchEcoOptionalFields config key.
Show child attributes
Show child attributes
Store information on whether a product is eligible for French Label Eco-Scores.
Show child attributes
Show child attributes
Determines the environmental impacts of a product based on mass, composition, place of manufacture, etc. (See https://ecobalyse.beta.gouv.fr/#/api)
Show child attributes
Show child attributes
GTIN, SKU, UPC, OTHER 
