ProductsUpdate a Product

Update a Product

curl -X PUT "https://connect.wholechain.com/Integration/Product" \
  -H "Content-Type: application/json" \
  -H "X-API-KEY: example_string" \
  -d '{
  "Products": [
    {
      "Id": "12345",
      "Details": {
        "Name": "Sample Product",
        "SimpleUnitOfMeasurement": "Kgm",
        "UnitQuantity": 2,
        "UnitDescriptor": "Cases",
        "SharingPolicy": "Open",
        "ProductIdentifierType": "Lot",
        "Gtin": "12345678912343",
        "Plu": "4001"
      }
    }
  ]
}'
{
  "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": null,
    "productCommodity": null,
    "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.


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)
MasterDataARRAYAdditional custom data stored against the product.No (Remove variable if not using)

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.


Example Request

{
  "Products": [
    {
      "Id": "12345",
      "Details": {
        "Name": "Sample Product",
        "SimpleUnitOfMeasurement": "Kgm",
        "UnitQuantity": 2,
        "UnitDescriptor": "Cases",
        "SharingPolicy": "Open",
        "ProductIdentifierType": "Lot",
        "Gtin": "12345678912343",
        "Plu": "4001"
      }
    }
  ]
}

Example Request With Product Custom Data

{
  "Products": [
    {
      "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

{
  "Products": [
    {
      "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"
          }
        ]
      }
    }
  ]
}