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:
lang
The language code for the product name. For a list of language codes, see Language Codes.
value
Product name. Do not include quotes, HTML, symbols, or commas.

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:
lang
The language code for the product description. For a list of language codes, see Language Codes.
value
Detailed product description. Do not include quotes, HTML, symbols, or commas.

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:
lang
The language code for the product summary. For a list of language codes, see Language Codes.
value
Brief product description. Do not include quotes, HTML, symbols, or commas.

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:
currencyIso
Required. The 3-character ISO 4217 currency code for the price. For more information, see Currency Codes.
countryIsoCode
Required. The ISO 3166-1 alpha-2 code for the country/region associated with the price. For more information, see State and Country Codes.
unit
Required. The unit of measure for the price. Ensure your prices contain one price with the same unit as the "unit" of the product. For more information, see Unit of Measure Codes.
validFrom
Date in YYYY-MM-DD format from which the price becomes valid. This date is based on UTC time.
validTo
Future date in YYYY-MM-DD format until which the price is valid. This date is based on UTC time.
regionIsoCode
The ISO 3166-2 region code for the region associated with the price. For more information, see State and Country Codes.
value
The price value. You can set a price without providing a value.
scale
Required. The minimum order quantity for which the price is effective. For example, you can specify two prices for a product: the price is 100 USD if the order quantity is between 1 and 19 (set value to 100 and scale to 1) and the price is 99 USD if the order quantity is 20 or more (set value to 99 and scale to 20).

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.
enabled
Set this to true if you want to provide product-specific carbon emission information. Then specify the attributes listed below. The default is false.
co2e
Required when enabled is true. Details about the product's CO2 equivalent emission, including:
emissionQuantity
(Decimal (10,2)) The quantity of CO2 equivalent emitted.
emissionUnit
(String) The unit of measure in UNUOM (United Nations Unit of Measure) standards for CO2e emission. Example: KGM
quantityPerUnit
(Integer) The CO2 equivalent emission per unit of the product.
boundary
(String/20) Required when enabled is true. The life cycle stage considered for the carbon emission calculation. Supported values: CR_TO_GAT (Cradle to Gate), CR_TO_GRV (Cradle to Grave)
accuracy
(String/20) Required when enabled is true. The level of accuracy of the carbon emission data. Supported values: HIGH, MEDIUM, LOW
accountStandard
(String/20) Required when enabled is true. The greenhouse gas accounting standard used for emission calculation. Example: GHG (GTH Protocol)
validFrom
Date in YYYY-MM-DD format from which the carbon emission data is valid. This date is based on UTC time.
validTo
Future date in YYYY-MM-DD format until which the carbon emission data is valid. This date is based on UTC time.
additionalInfo
(String/1000) Any additional information about the carbon emission data.

circularEconomy

 
The circular economy details of the product, including:
recycledContentPercentage
The percentage of recycled content used in the product.
renewableEnergyUsedPercentage
The percentage of renewable energy used in the product's production.

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

Sample request:
{
    "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

Sample request:
{
  "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

Sample request:
{
  "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

Sample request:
{
  "circularEconomy": {
    "renewableEnergyUsedPercentage": 79,
    "recycledContentPercentage": 83
  }
}

Update product name, description, and summary

Sample request:
{
  "name": [
    {
      "lang": "zh-CN",
      "value": "显示器"
    }
  ],
  "description": [
     {
      "lang": "zh-CN",
      "value": "显示器描述"
     },
     {
      "lang": "en",
      "value": "monitor desc"
     }
  ],
  "summary": [
    {
      "lang": "en",
      "value": "monitor summary"
    }
  ]
}

Update product images

Sample request:
{
    "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.

Sample request:
{
    "publishedStatus": "PUBLISHED"
}