Trade ItemsUpdate a Trade Item

Update a Trade Item

Updates an existing product. The request body is a single Product object, not a Products array; an array returns 422. Omitting productBrand or productItemGroup removes the product's current brand or item group, so send them in every update with at least their identifier.

curl -X PUT "https://connect.wholechain.com/Integration/Product" \
  -H "Content-Type: application/json" \
  -H "X-API-KEY: example_string" \
  -d '{
  "Product": {
    "Id": "12345",
    "Details": {
      "Name": "Sample Product",
      "SimpleUnitOfMeasurement": "Kgm",
      "UnitQuantity": 2,
      "UnitDescriptor": "Cases",
      "SharingPolicy": "Open",
      "ProductIdentifierType": "Lot",
      "Gtin": "12345678912343",
      "Plu": "4001",
      "productBrand": {
        "identifier": "BRAND-001",
        "name": "Oceanic Brand",
        "description": "Premium seafood brand"
      },
      "productItemGroup": {
        "identifier": "ITEMGROUP-001",
        "name": "Atlantic Salmon",
        "description": "Farmed Atlantic salmon"
      }
    }
  }
}'
{
  "message": "Success",
  "result": {
    "id": "01a0ce68-eec0-71e5-b705-f33774803fbf",
    "urn": "urn:gdst:wholechain.com:product:class:oceanagroupltd.sampleproduct-1",
    "sharingPolicy": "Open",
    "productIdentifierType": "Lot",
    "accountId": "5a6b41f6-5a48-4a54-b94c-4a89125b7c7d",
    "name": "Sample Product",
    "productBrand": {
      "id": "00000000-0000-0000-0000-000000000000",
      "name": "Oceanic Brand",
      "description": "Premium seafood brand",
      "externalIdentifier": "BRAND-001",
      "profileImagePreSignedUrl": ""
    },
    "productCommodity": {
      "id": "00000000-0000-0000-0000-000000000000",
      "name": "Atlantic Salmon",
      "description": "Farmed Atlantic salmon",
      "externalIdentifier": "ITEMGROUP-001"
    },
    "productGoodKind": null,
    "simpleUnitOfMeasurement": "Kgm",
    "unitQuantity": 2,
    "unitDescriptor": "Cases",
    "blockchain": "Algorand",
    "gtin": "12345678912343",
    "plu": "4001",
    "upc": null,
    "externalIdentifier": null,
    "currentInventory": 0,
    "currentInventoryTotal": 0,
    "shippedInventory": 0,
    "productMasterData": [],
    "subProducts": [],
    "lastModifiedTime": "2026-09-28T16:07:08.7374984+00:00",
    "createdTime": "2026-09-23T13:16:18.501948+00:00",
    "accountName": "Oceana Group Ltd",
    "pendingShipmentItems": 0,
    "hasActiveInventory": false,
    "description": null,
    "defaultImageDocumentId": null,
    "defaultImagePreSignedUrl": null,
    "sharedWith": [],
    "originalAccountId": "00000000-0000-0000-0000-000000000000",
    "archived": false,
    "dataPolicyElements": null,
    "ownerInfo": null
  },
  "errors": [],
  "validations": []
}
PUT
/Integration/Product
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

API key used to authenticate the request.

Request Preview
Response

Response will appear here after sending the request

Responses

messagestring
Required
resultobject
Required
errorsobject[]
Required
validationsobject[]
Required

Introduction

The Product API allows users to edit detailed specifications of a product such as its name, unit of measurement, sharing policy, and custom product data.

Updated products can be referenced as usual across the supply chain in events such as Receive, Ship, Commission, and Transform.

The request body is a single Product object, not a Products array. A Products array returns 422 with the title 'Product' must not be empty.


Request Headers

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

Product Object

Column NameData TypeDescriptionRequired
IdSTRINGUnique identifier for the product being updated.Yes
DetailsOBJECTContains the updated product information.Yes

Details Object

Column NameData TypeDescriptionRequired
NameSTRINGName of the product.Yes
SimpleUnitOfMeasurementSTRINGUnit in which the product is measured or represented.Yes
UnitQuantityDECIMALQuantity of the simple unit of measurement contained in the packaging or commercial unit.No
UnitDescriptorSTRINGDescribes the packaging or commercial unit.No
SharingPolicySTRINGSharing policy, e.g. Open or Restricted.Yes
ProductIdentifierTypeSTRINGType of product identifier, e.g. Lot or Serial.Yes
GtinSTRINGGlobal Trade Item Number, if applicable.No (Remove variable if not using)
PluSTRINGPrice Lookup Code, if applicable.No (Remove variable if not using)
productBrandOBJECTBrand associated with the product. Omitting it removes the product's current brand.No
productItemGroupOBJECTItem group associated with the product. Omitting it removes the product's current item group.No
MasterDataARRAYAdditional custom data stored against the product.No (Remove variable if not using)

productBrand and productItemGroup are shown with the property names defined in the API schema.

Product Brand Object

Column NameData TypeDescriptionRequired
identifierSTRINGYour identifier for the product brand. Used to link the product to an existing brand or to create a new one.Yes
nameSTRINGName of the product brand. Send it when the identifier is new, so the new brand gets a name.No
descriptionSTRINGDescription of the product brand.No

To manage brands themselves, see Update a Product Brand.

Product Item Group Object

Send the item group as productItemGroup. A productCommodity field in the request is ignored. In the update response, the item group is returned as productCommodity.

Column NameData TypeDescriptionRequired
identifierSTRINGYour identifier for the product item group. Used to link the product to an existing item group or to create a new one.Yes
nameSTRINGName of the product item group. Send it when the identifier is new, so the new item group gets a name.No
descriptionSTRINGDescription of the product item group.No

To manage item groups themselves, see Update a Product Item Group.

Product Custom Data

Custom product information can be added using the MasterData array inside the product Details object.

This can be used to store additional product-specific information that is not represented by one of the standard product fields.

MasterData Object

Column NameData TypeDescriptionRequired
nameSTRINGName of the custom product field.Yes
namespaceSTRINGNamespace of the custom field. Use custom for custom product data.Yes
valueSTRINGValue associated with the custom product field.Yes

Multiple custom data fields can be added by including multiple objects in the MasterData array.

Optional fields such as Gtin, Plu, UnitQuantity, UnitDescriptor, and MasterData should be omitted from the request when they are not being used rather than submitted as empty values.

Omitting productBrand or productItemGroup removes it from the product. An update without these objects clears the product's current brand and item group. To keep them, send them in every update, with at least their identifier.


Example Request

{
  "Product": {
    "Id": "12345",
    "Details": {
      "Name": "Sample Product",
      "SimpleUnitOfMeasurement": "Kgm",
      "UnitQuantity": 2,
      "UnitDescriptor": "Cases",
      "SharingPolicy": "Open",
      "ProductIdentifierType": "Lot",
      "Gtin": "12345678912343",
      "Plu": "4001",
      "productBrand": {
        "identifier": "BRAND-001",
        "name": "Oceanic Brand",
        "description": "Premium seafood brand"
      },
      "productItemGroup": {
        "identifier": "ITEMGROUP-001",
        "name": "Atlantic Salmon",
        "description": "Farmed Atlantic salmon"
      }
    }
  }
}

Example Request With Product Custom Data

{
  "Product": {
    "Id": "12345",
    "Details": {
      "Name": "Sample Product",
      "SimpleUnitOfMeasurement": "Kgm",
      "UnitQuantity": 2,
      "UnitDescriptor": "Cases",
      "SharingPolicy": "Open",
      "ProductIdentifierType": "Lot",
      "Gtin": "12345678912343",
      "Plu": "4001",
      "MasterData": [
        {
          "name": "Gear Type",
          "namespace": "custom",
          "value": "GEAR TYPE_VALUE"
        }
      ]
    }
  }
}

Example With Multiple Custom Data Fields

{
  "Product": {
    "Id": "12345",
    "Details": {
      "Name": "Sample Product",
      "SimpleUnitOfMeasurement": "Kgm",
      "SharingPolicy": "Open",
      "ProductIdentifierType": "Lot",
      "MasterData": [
        {
          "name": "Gear Type",
          "namespace": "custom",
          "value": "TRAWL"
        },
        {
          "name": "Species",
          "namespace": "custom",
          "value": "Atlantic Salmon"
        }
      ]
    }
  }
}

Optional fields such as Gtin, Plu, UnitQuantity, UnitDescriptor, and MasterData should be removed from the request when they are not being used. Keep productBrand and productItemGroup in the request if the product should keep its brand and item group.


Response

200 — OK

The response contains message (Success) and result, the updated product. In result, the brand is returned as productBrand (with id, name, description, externalIdentifier, and profileImagePreSignedUrl) and the item group as productCommodity (with id, name, description, and externalIdentifier). Both are null when the product has no brand or item group.

Error Responses

Errors are returned as a problem details object with type, title, status, and traceId.

StatusCause
400The X-API-KEY header is missing, or the request body can't be read.
422The body uses a Products array instead of a Product object.