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"
}
}
]
}'
import requests
import json
url = "https://connect.wholechain.com/Integration/Product"
headers = {
"Content-Type": "application/json",
"X-API-KEY": "example_string"
}
data = {
"Products": [
{
"Id": "12345",
"Details": {
"Name": "Sample Product",
"SimpleUnitOfMeasurement": "Kgm",
"UnitQuantity": 2,
"UnitDescriptor": "Cases",
"SharingPolicy": "Open",
"ProductIdentifierType": "Lot",
"Gtin": "12345678912343",
"Plu": "4001"
}
}
]
}
response = requests.put(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://connect.wholechain.com/Integration/Product", {
method: "PUT",
headers: {
"Content-Type": "application/json",
"X-API-KEY": "example_string"
},
body: JSON.stringify({
"Products": [
{
"Id": "12345",
"Details": {
"Name": "Sample Product",
"SimpleUnitOfMeasurement": "Kgm",
"UnitQuantity": 2,
"UnitDescriptor": "Cases",
"SharingPolicy": "Open",
"ProductIdentifierType": "Lot",
"Gtin": "12345678912343",
"Plu": "4001"
}
}
]
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"Products": [
{
"Id": "12345",
"Details": {
"Name": "Sample Product",
"SimpleUnitOfMeasurement": "Kgm",
"UnitQuantity": 2,
"UnitDescriptor": "Cases",
"SharingPolicy": "Open",
"ProductIdentifierType": "Lot",
"Gtin": "12345678912343",
"Plu": "4001"
}
}
]
}`)
req, err := http.NewRequest("PUT", "https://connect.wholechain.com/Integration/Product", bytes.NewBuffer(data))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("X-API-KEY", "example_string")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://connect.wholechain.com/Integration/Product')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Put.new(uri)
request['Content-Type'] = 'application/json'
request['X-API-KEY'] = 'example_string'
request.body = '{
"Products": [
{
"Id": "12345",
"Details": {
"Name": "Sample Product",
"SimpleUnitOfMeasurement": "Kgm",
"UnitQuantity": 2,
"UnitDescriptor": "Cases",
"SharingPolicy": "Open",
"ProductIdentifierType": "Lot",
"Gtin": "12345678912343",
"Plu": "4001"
}
}
]
}'
response = http.request(request)
puts response.body
{
"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": []
}
/Integration/Product
Target server for requests. Edit to use your own host.
The media type of the request body
API key used to authenticate the request.
Request Preview
Response
Response will appear here after sending the request
Responses
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
| Header | Description | Example Value |
|---|---|---|
X-API-KEY | Your API key. | <YOUR_API_KEY> |
Content-Type | Content type of the request. | application/json |
accept | Response content type. | */* |
Product Object
| Column Name | Data Type | Description | Required |
|---|---|---|---|
Id | STRING | Unique identifier for the product being updated. | Yes |
Details | OBJECT | Contains the updated product information. | Yes |
Details Object
| Column Name | Data Type | Description | Required |
|---|---|---|---|
Name | STRING | Name of the product. | Yes |
SimpleUnitOfMeasurement | STRING | Unit in which the product is measured or represented. | Yes |
UnitQuantity | DECIMAL | Quantity of the simple unit of measurement contained in the packaging or commercial unit. | No |
UnitDescriptor | STRING | Describes the packaging or commercial unit. | No |
SharingPolicy | STRING | Sharing policy, e.g. Open or Restricted. | Yes |
ProductIdentifierType | STRING | Type of product identifier, e.g. Lot or Serial. | Yes |
Gtin | STRING | Global Trade Item Number, if applicable. | No (Remove variable if not using) |
Plu | STRING | Price Lookup Code, if applicable. | No (Remove variable if not using) |
MasterData | ARRAY | Additional 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 Name | Data Type | Description | Required |
|---|---|---|---|
name | STRING | Name of the custom product field. | Yes |
namespace | STRING | Namespace of the custom field. Use custom for custom product data. | Yes |
value | STRING | Value 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"
}
]
}
}
]
}