Update Purchase Orders
curl --request POST \
--url https://api-v2.production.higg.org/pic-api/v1/purchase-orders/update \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--header 'x-developer-request-token: <api-key>' \
--data '
{
"productId": "<string>",
"purchaseOrder": {
"_id": "<string>",
"purchaseOrderId": "<string>",
"purchaseDate": "<string>",
"amountPurchase": 123,
"assembly": {
"femId": "<string>"
}
}
}
'import requests
url = "https://api-v2.production.higg.org/pic-api/v1/purchase-orders/update"
payload = {
"productId": "<string>",
"purchaseOrder": {
"_id": "<string>",
"purchaseOrderId": "<string>",
"purchaseDate": "<string>",
"amountPurchase": 123,
"assembly": { "femId": "<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({
productId: '<string>',
purchaseOrder: {
_id: '<string>',
purchaseOrderId: '<string>',
purchaseDate: '<string>',
amountPurchase: 123,
assembly: {femId: '<string>'}
}
})
};
fetch('https://api-v2.production.higg.org/pic-api/v1/purchase-orders/update', 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/purchase-orders/update",
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([
'productId' => '<string>',
'purchaseOrder' => [
'_id' => '<string>',
'purchaseOrderId' => '<string>',
'purchaseDate' => '<string>',
'amountPurchase' => 123,
'assembly' => [
'femId' => '<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/purchase-orders/update"
payload := strings.NewReader("{\n \"productId\": \"<string>\",\n \"purchaseOrder\": {\n \"_id\": \"<string>\",\n \"purchaseOrderId\": \"<string>\",\n \"purchaseDate\": \"<string>\",\n \"amountPurchase\": 123,\n \"assembly\": {\n \"femId\": \"<string>\"\n }\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/purchase-orders/update")
.header("x-api-key", "<api-key>")
.header("x-developer-request-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"productId\": \"<string>\",\n \"purchaseOrder\": {\n \"_id\": \"<string>\",\n \"purchaseOrderId\": \"<string>\",\n \"purchaseDate\": \"<string>\",\n \"amountPurchase\": 123,\n \"assembly\": {\n \"femId\": \"<string>\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-v2.production.higg.org/pic-api/v1/purchase-orders/update")
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 \"productId\": \"<string>\",\n \"purchaseOrder\": {\n \"_id\": \"<string>\",\n \"purchaseOrderId\": \"<string>\",\n \"purchaseDate\": \"<string>\",\n \"amountPurchase\": 123,\n \"assembly\": {\n \"femId\": \"<string>\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"productId": "<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
}
}
],
"createdOn": "<string>"
}Purchase Orders
Update Purchase Orders
POST
/
purchase-orders
/
update
Update Purchase Orders
curl --request POST \
--url https://api-v2.production.higg.org/pic-api/v1/purchase-orders/update \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--header 'x-developer-request-token: <api-key>' \
--data '
{
"productId": "<string>",
"purchaseOrder": {
"_id": "<string>",
"purchaseOrderId": "<string>",
"purchaseDate": "<string>",
"amountPurchase": 123,
"assembly": {
"femId": "<string>"
}
}
}
'import requests
url = "https://api-v2.production.higg.org/pic-api/v1/purchase-orders/update"
payload = {
"productId": "<string>",
"purchaseOrder": {
"_id": "<string>",
"purchaseOrderId": "<string>",
"purchaseDate": "<string>",
"amountPurchase": 123,
"assembly": { "femId": "<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({
productId: '<string>',
purchaseOrder: {
_id: '<string>',
purchaseOrderId: '<string>',
purchaseDate: '<string>',
amountPurchase: 123,
assembly: {femId: '<string>'}
}
})
};
fetch('https://api-v2.production.higg.org/pic-api/v1/purchase-orders/update', 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/purchase-orders/update",
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([
'productId' => '<string>',
'purchaseOrder' => [
'_id' => '<string>',
'purchaseOrderId' => '<string>',
'purchaseDate' => '<string>',
'amountPurchase' => 123,
'assembly' => [
'femId' => '<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/purchase-orders/update"
payload := strings.NewReader("{\n \"productId\": \"<string>\",\n \"purchaseOrder\": {\n \"_id\": \"<string>\",\n \"purchaseOrderId\": \"<string>\",\n \"purchaseDate\": \"<string>\",\n \"amountPurchase\": 123,\n \"assembly\": {\n \"femId\": \"<string>\"\n }\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/purchase-orders/update")
.header("x-api-key", "<api-key>")
.header("x-developer-request-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"productId\": \"<string>\",\n \"purchaseOrder\": {\n \"_id\": \"<string>\",\n \"purchaseOrderId\": \"<string>\",\n \"purchaseDate\": \"<string>\",\n \"amountPurchase\": 123,\n \"assembly\": {\n \"femId\": \"<string>\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-v2.production.higg.org/pic-api/v1/purchase-orders/update")
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 \"productId\": \"<string>\",\n \"purchaseOrder\": {\n \"_id\": \"<string>\",\n \"purchaseOrderId\": \"<string>\",\n \"purchaseDate\": \"<string>\",\n \"amountPurchase\": 123,\n \"assembly\": {\n \"femId\": \"<string>\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"productId": "<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
}
}
],
"createdOn": "<string>"
}Use this endpoint to update an existing purchase order. You can modify the purchase order details and FEM assembly linking.
Request body params
| Name | Type | Description |
|---|---|---|
productId | string | [REQUIRED] The ID of the product the purchase order belongs to. |
purchaseOrder | object | [REQUIRED] The updated purchase order data. |
purchaseOrder._id | string | [REQUIRED] The internal ID of the purchase order to update. |
purchaseOrder.purchaseOrderId | string | Updated external purchase order identifier. |
purchaseOrder.purchaseDate | string | Updated purchase date. Expected format is YYYY-MM-DD; the field is a plain string in the API contract. |
purchaseOrder.amountPurchase | number | Updated quantity purchased. |
purchaseOrder.assembly | object | Updated FEM linking data. |
purchaseOrder.assembly.femId | string | The FEM assessment ID to link. Use Search Tier 1 Facilities to find available FEMs. |
Implementation Details
- Partial updates: Only the fields you provide will be updated. Omitted fields retain their existing values.
- FEM linking constraints: Same rules as create — products imported from the Higg Product Module cannot link to a FEM.
- Recalculation: After updating a purchase order, you may need to recalculate to refresh its impact data.
Body
application/json
⌘I

