ProductsUpdate a Product Item Group

Update a Product Item Group

The request body is a single object, not an array. The endpoint has no path parameter. The product item group to update is matched by the identifier in the request body.

curl -X PUT "https://connect.wholechain.com/Integration/ItemGroup" \
  -H "Content-Type: application/json" \
  -H "X-API-KEY: example_string" \
  -H "accept: */*" \
  -d '{
  "identifier": "ITEMGROUP-001",
  "name": "Atlantic Salmon (Updated)",
  "description": "Updated farmed Atlantic salmon"
}'
{
  "identifier": "ITEMGROUP-001",
  "name": "Atlantic Salmon (Updated)",
  "description": "Updated farmed Atlantic salmon"
}
PUT
/Integration/ItemGroup
PUT
Base URLstring

Target server for requests. Edit to use your own host.

Content-Typestring
Required

The media type of the request body

Options: application/json
header
X-API-KEYstring
Required

Your Wholechain API key.

header
acceptstring

Response content type.

Options: */*
identifierstring
Required

Required. Identifies the product item group to update.

namestring

New name of the product item group.

descriptionstring

New description of the product item group.

Request Preview
Response

Response will appear here after sending the request

Responses

identifierstring
namestring
descriptionstring

Introduction

This API updates an existing product item group in Wholechain.

A product item group organizes products by a business category you choose, such as a commodity. In the Wholechain app, item groups are managed as Trade Item Groups, and a product's group is shown as Commodity.

A product references an item group through the productItemGroup object in the product Details. See Create a Product and Update a Product.

To manage item groups in the Wholechain app, see Trade Item Groups.


Endpoint

MethodURL
PUThttps://connect.wholechain.com/Integration/ItemGroup

Request Headers

HeaderDescriptionExample Value
X-API-KEYYour Wholechain API key.<YOUR_API_KEY>
Content-TypeContent type of the request. application/json and application/xml are accepted.application/json
acceptResponse content type.*/*

Request Body

The request body is a single product item group object. It uses the same fields as Create a Product Item Group.

Column NameData TypeDescriptionRequired
identifierSTRINGIdentifies the product item group to update.Yes
nameSTRINGNew name of the product item group.No
descriptionSTRINGNew description of the product item group.No

Example Request

{
  "identifier": "ITEMGROUP-001",
  "name": "Atlantic Salmon (Updated)",
  "description": "Updated farmed Atlantic salmon"
}

cURL

curl -X 'PUT' \
  'https://connect.wholechain.com/Integration/ItemGroup' \
  -H 'accept: */*' \
  -H 'Content-Type: application/json' \
  -H 'X-API-KEY: YOUR_API_KEY' \
  -d '{
    "identifier": "ITEMGROUP-001",
    "name": "Atlantic Salmon (Updated)",
    "description": "Updated farmed Atlantic salmon"
  }'

Responses

200 — OK

The product item group is updated. The response body is a product item group object with the fields identifier, name, and description.

{
  "identifier": "ITEMGROUP-001",
  "name": "Atlantic Salmon (Updated)",
  "description": "Updated farmed Atlantic salmon"
}

404 — Not Found

No product item group with this identifier exists.

{
  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.5",
  "title": "Product item group not found: ITEMGROUP-001",
  "status": 404,
  "traceId": "<trace-id>"
}

400 — Bad Request

The X-API-KEY header is missing, or the request body is not valid JSON.

{
  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.1",
  "title": "One or more validation errors occurred.",
  "status": 400,
  "errors": {
    "X-API-KEY": [
      "The apiKey field is required."
    ]
  },
  "traceId": "<trace-id>"
}

Important Notes

  • The request body is a single object, not an array.
  • The endpoint has no path parameter. The product item group to update is matched by the identifier in the request body.
  • identifier is required.
  • In the Update a Product response, the item group assigned to a product is returned as productCommodity (with id, name, description, and externalIdentifier).