Editing a Product with the Network Catalog Management API
The PATCH /products/{productId} endpoint of the Network Catalog Management API enables you to edit a product in your network catalog.
Procedure
Use the PATCH /products/{productId} endpoint. Replace productId with the ID of the target product.
Provide your ANID and API key in the API header:
|
Header Parameter |
Type |
Description |
|---|---|---|
|
X-ARIBA-NETWORK-ID |
String |
Required. Your SAP Business Network ID (ANID). |
|
apiKey |
String |
Required. The application key of the application you created in SAP Ariba Developer Portal. If you don’t have an application, create one as described in Steps to Start Using the Network Catalog Management API. |
In the request body, specify the product properties that you want to update. You can refer to the sample codes in Examples.
|
Property |
Type |
Description |
|---|---|---|
|
categoryCode |
String/6 or 8 |
UNSPSC (United Nations Standard Products and Services Code) of the product. For more information, see Commodity Codes. |
|
publishedStatus |
String |
The desired publishing status. The default is UNPUBLISHED. Set it to PUBLISHED if you want to add the product and directly publish it online. |
|
ean |
String/13 |
The European Article Number (EAN) of the product. |
|
upc |
String/12 |
The Universal Product Code (UPC) of the product. |
|
unit |
String |
Required. The unit of measure for the product. Select the unit of measure in UNUOM (United Nations Unit of Measure) standards which will be considered as the base unit of measure or sales unit. |
|
validFrom |
Date (YYYY-MM-DD) |
The date from which the product becomes valid. This date is based on UTC time and must be prior to the product expiration date (ValidTo). |
|
validTo |
Date (YYYY-MM-DD) |
The future date until which the product is valid. This date is based on UTC time. |
|
productUrl |
String/255 |
Product URL to provide more information about the product. The URL must start with "https". |
|
manufacturerName |
String/255 |
The name of the product manufacturer or brand name. |
|
manufacturerPartId |
String/255 |
A unique number assigned to the part by the manufacturer or brand. |
|
manufacturerUrl |
String/255 |
The URL of the product manufacturer's website. The URL must start with "https". |
|
name |
String/80 |
At least one product name is required for a product. You can specify an array of names, each representing the product name in a different language. The name will be displayed as the product title on the search results page.
Specify each name with two attributes:
|
|
description |
String/1000 |
You can specify an array of descriptions, each representing the product description in a different language.
Specify each description with two attributes:
|
|
summary |
String/1000 |
You can specify an array of summaries, each representing the product summary in a different language.
Specify each summary with two attributes:
|
|
leadShippingTime |
Integer |
Number of days required to ship the product. Decimal values are not allowed. |
|
prices |
You can specify an array of prices, each representing a price for the product.
Specify each price with the following attributes:
|
|
|
images |
String |
The URLs of the images to be downloaded and set to the product. The URLs must start with "https". Use image1 to specify the default product image and image2 through image5 for additional images. |
|
carbonEmission |
The carbon emission details of the product.
|
|
|
circularEconomy |
The circular economy details of the product, including:
|
If the request is successful, the endpoint returns HTTP status code 200 OK and the details of the updated product.
If the request is unsuccessful, the response includes an error message. See Error Messages Returned by the Network Catalog Management API to troubleshoot your request.
Examples
Update basic product information
{
"categoryCode": "31241501",
"ean": "4006381333931",
"upc": "123456789012",
"unit": "H87",
"validFrom": "2002-02-10",
"validTo": "2006-02-22",
"productUrl": "https://www.product123.com",
"manufacturerName": "Tesla",
"manufacturerPartId": "3881044",
"manufacturerUrl": "https://www.hello345.com",
"leadShippingTime": 25
}
Update product prices
{
"prices": [
{
"countryIsoCode": "US",
"currencyIso": "USD",
"regionIsoCode": "US-CA",
"scale": 1,
"unit": "H87",
"validFrom": "2024-06-01",
"validTo": "2024-06-02",
"value": 17
},
{
"countryIsoCode": "US",
"currencyIso": "USD",
"regionIsoCode": "US-AL",
"scale": 1,
"unit": "H87",
"validFrom": "2024-06-01",
"validTo": "2024-06-01",
"value": 18.5
}
]
}
Update carbon emission information
{
"carbonEmission": {
"enabled": true,
"co2e": {
"emissionQuantity": 15,
"emissionUnit": "KGM",
"quantityPerUnit": 2
},
"boundary": "CR_TO_GAT",
"accuracy": "LOW",
"accountStandard": "GHG",
"validFrom": "2024-08-25",
"validTo": "2024-10-06",
"additionalInfo": "good"
}
}
Update circular economy information
{
"circularEconomy": {
"renewableEnergyUsedPercentage": 79,
"recycledContentPercentage": 83
}
}
Update product name, description, and summary
{
"name": [
{
"lang": "zh-CN",
"value": "显示器"
}
],
"description": [
{
"lang": "zh-CN",
"value": "显示器描述"
},
{
"lang": "en",
"value": "monitor desc"
}
],
"summary": [
{
"lang": "en",
"value": "monitor summary"
}
]
}
Update product images
{
"images": {
"image4": "https://images-cn.ssl-images-amazon.cn/images/I/71VMAGbRLfL._AC_SL1500_.jpg",
"image5": "https://images-cn.ssl-images-amazon.cn/images/I/71VMAGbRLfL._AC_SL1500_.jpg"
}
}
Update publishing status
You can publish a staged product by updating its publishedStatus to PUBLISHED.
{
"publishedStatus": "PUBLISHED"
}