Receive a Lot
Receive a Lot. The request example includes all fields documented for this event, including optional fields.
curl -X POST "https://connect.wholechain.com/Integration/Events" \
-H "Content-Type: application/json" \
-H "X-API-KEY: example_string" \
-d '{
"Events": [
{
"$type": "receive",
"ShipFromLocation": {
"Id": "supplier_location_001",
"Details": {
"TradePartner": {
"Id": "supplier_001",
"Name": "Supplier Name",
"ConnectionType": "SUPPLIER",
"Duns": "123456789"
},
"Name": "Supplier Location",
"Gln": "9506000140445",
"Extension": "SomeExtension",
"ContactInformation": {
"Name": "Supplier Contact",
"Phone": "+1234567890",
"Email": "supplier@example.com"
},
"Address": {
"City": "Cape Town",
"State": "Western Cape",
"Country": "South Africa",
"AddressLine1": "123 Supplier Street",
"AddressLine2": "Building 2",
"PostalCode": "8001",
"GeoCoordinates": {
"Latitude": -33.9249,
"Longitude": 18.4241
}
}
}
},
"ShipToLocation": {
"Id": "warehouse_001",
"Details": {
"TradePartner": {
"Id": "my_company",
"Name": "My Company",
"ConnectionType": "SELF",
"Duns": "987654321"
},
"Name": "Main Warehouse",
"Gln": "9506000140446",
"Extension": "WarehouseExtension",
"DunsPlus4": "1234",
"ContactInformation": {
"Name": "Warehouse Contact",
"Phone": "+1234567891",
"Email": "warehouse@example.com"
},
"Address": {
"City": "Cape Town",
"State": "Western Cape",
"Country": "South Africa",
"AddressLine1": "456 Warehouse Road",
"AddressLine2": "Building 2",
"PostalCode": "8002",
"GeoCoordinates": {
"Latitude": -33.925,
"Longitude": 18.425
}
}
}
},
"ProductInstances": [
{
"Quantity": 190.75,
"LotSerial": "lot_001",
"Product": {
"Id": "product_001",
"Details": {
"ProductIdentifierType": "Lot",
"Name": "Sample Product",
"SimpleUnitOfMeasurement": "Kgm",
"SharingPolicy": "Open",
"UnitDescriptor": "Cases",
"UnitQuantity": 10.5,
"Gtin": "12345678912343",
"Plu": "4001",
"MasterData": [
{
"name": "Gear Type",
"namespace": "custom",
"value": "GEAR TYPE_VALUE"
}
]
}
}
}
],
"Id": "receive_lot_001",
"ShipEventId": "ship_lot_001",
"PurchaseOrder": "PO-12345",
"InvoiceNumber": "INV-12345",
"EventTime": "2024-03-30T18:00:00",
"EventTimeZone": "-05:00",
"CustomProperties": [
{
"Name": "quality_grade",
"Namespace": "custom",
"Value": "A"
}
],
"CertificationList": [
{
"Type": "urn:gdst:certType:harvestCoC",
"Standard": "MSC Chain of Custody",
"Agency": "MSC",
"Value": "YES",
"Identification": "MSC-C-12345"
}
]
}
]
}'
import requests
import json
url = "https://connect.wholechain.com/Integration/Events"
headers = {
"Content-Type": "application/json",
"X-API-KEY": "example_string"
}
data = {
"Events": [
{
"$type": "receive",
"ShipFromLocation": {
"Id": "supplier_location_001",
"Details": {
"TradePartner": {
"Id": "supplier_001",
"Name": "Supplier Name",
"ConnectionType": "SUPPLIER",
"Duns": "123456789"
},
"Name": "Supplier Location",
"Gln": "9506000140445",
"Extension": "SomeExtension",
"ContactInformation": {
"Name": "Supplier Contact",
"Phone": "+1234567890",
"Email": "supplier@example.com"
},
"Address": {
"City": "Cape Town",
"State": "Western Cape",
"Country": "South Africa",
"AddressLine1": "123 Supplier Street",
"AddressLine2": "Building 2",
"PostalCode": "8001",
"GeoCoordinates": {
"Latitude": -33.9249,
"Longitude": 18.4241
}
}
}
},
"ShipToLocation": {
"Id": "warehouse_001",
"Details": {
"TradePartner": {
"Id": "my_company",
"Name": "My Company",
"ConnectionType": "SELF",
"Duns": "987654321"
},
"Name": "Main Warehouse",
"Gln": "9506000140446",
"Extension": "WarehouseExtension",
"DunsPlus4": "1234",
"ContactInformation": {
"Name": "Warehouse Contact",
"Phone": "+1234567891",
"Email": "warehouse@example.com"
},
"Address": {
"City": "Cape Town",
"State": "Western Cape",
"Country": "South Africa",
"AddressLine1": "456 Warehouse Road",
"AddressLine2": "Building 2",
"PostalCode": "8002",
"GeoCoordinates": {
"Latitude": -33.925,
"Longitude": 18.425
}
}
}
},
"ProductInstances": [
{
"Quantity": 190.75,
"LotSerial": "lot_001",
"Product": {
"Id": "product_001",
"Details": {
"ProductIdentifierType": "Lot",
"Name": "Sample Product",
"SimpleUnitOfMeasurement": "Kgm",
"SharingPolicy": "Open",
"UnitDescriptor": "Cases",
"UnitQuantity": 10.5,
"Gtin": "12345678912343",
"Plu": "4001",
"MasterData": [
{
"name": "Gear Type",
"namespace": "custom",
"value": "GEAR TYPE_VALUE"
}
]
}
}
}
],
"Id": "receive_lot_001",
"ShipEventId": "ship_lot_001",
"PurchaseOrder": "PO-12345",
"InvoiceNumber": "INV-12345",
"EventTime": "2024-03-30T18:00:00",
"EventTimeZone": "-05:00",
"CustomProperties": [
{
"Name": "quality_grade",
"Namespace": "custom",
"Value": "A"
}
],
"CertificationList": [
{
"Type": "urn:gdst:certType:harvestCoC",
"Standard": "MSC Chain of Custody",
"Agency": "MSC",
"Value": "YES",
"Identification": "MSC-C-12345"
}
]
}
]
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://connect.wholechain.com/Integration/Events", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-API-KEY": "example_string"
},
body: JSON.stringify({
"Events": [
{
"$type": "receive",
"ShipFromLocation": {
"Id": "supplier_location_001",
"Details": {
"TradePartner": {
"Id": "supplier_001",
"Name": "Supplier Name",
"ConnectionType": "SUPPLIER",
"Duns": "123456789"
},
"Name": "Supplier Location",
"Gln": "9506000140445",
"Extension": "SomeExtension",
"ContactInformation": {
"Name": "Supplier Contact",
"Phone": "+1234567890",
"Email": "supplier@example.com"
},
"Address": {
"City": "Cape Town",
"State": "Western Cape",
"Country": "South Africa",
"AddressLine1": "123 Supplier Street",
"AddressLine2": "Building 2",
"PostalCode": "8001",
"GeoCoordinates": {
"Latitude": -33.9249,
"Longitude": 18.4241
}
}
}
},
"ShipToLocation": {
"Id": "warehouse_001",
"Details": {
"TradePartner": {
"Id": "my_company",
"Name": "My Company",
"ConnectionType": "SELF",
"Duns": "987654321"
},
"Name": "Main Warehouse",
"Gln": "9506000140446",
"Extension": "WarehouseExtension",
"DunsPlus4": "1234",
"ContactInformation": {
"Name": "Warehouse Contact",
"Phone": "+1234567891",
"Email": "warehouse@example.com"
},
"Address": {
"City": "Cape Town",
"State": "Western Cape",
"Country": "South Africa",
"AddressLine1": "456 Warehouse Road",
"AddressLine2": "Building 2",
"PostalCode": "8002",
"GeoCoordinates": {
"Latitude": -33.925,
"Longitude": 18.425
}
}
}
},
"ProductInstances": [
{
"Quantity": 190.75,
"LotSerial": "lot_001",
"Product": {
"Id": "product_001",
"Details": {
"ProductIdentifierType": "Lot",
"Name": "Sample Product",
"SimpleUnitOfMeasurement": "Kgm",
"SharingPolicy": "Open",
"UnitDescriptor": "Cases",
"UnitQuantity": 10.5,
"Gtin": "12345678912343",
"Plu": "4001",
"MasterData": [
{
"name": "Gear Type",
"namespace": "custom",
"value": "GEAR TYPE_VALUE"
}
]
}
}
}
],
"Id": "receive_lot_001",
"ShipEventId": "ship_lot_001",
"PurchaseOrder": "PO-12345",
"InvoiceNumber": "INV-12345",
"EventTime": "2024-03-30T18:00:00",
"EventTimeZone": "-05:00",
"CustomProperties": [
{
"Name": "quality_grade",
"Namespace": "custom",
"Value": "A"
}
],
"CertificationList": [
{
"Type": "urn:gdst:certType:harvestCoC",
"Standard": "MSC Chain of Custody",
"Agency": "MSC",
"Value": "YES",
"Identification": "MSC-C-12345"
}
]
}
]
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"Events": [
{
"$type": "receive",
"ShipFromLocation": {
"Id": "supplier_location_001",
"Details": {
"TradePartner": {
"Id": "supplier_001",
"Name": "Supplier Name",
"ConnectionType": "SUPPLIER",
"Duns": "123456789"
},
"Name": "Supplier Location",
"Gln": "9506000140445",
"Extension": "SomeExtension",
"ContactInformation": {
"Name": "Supplier Contact",
"Phone": "+1234567890",
"Email": "supplier@example.com"
},
"Address": {
"City": "Cape Town",
"State": "Western Cape",
"Country": "South Africa",
"AddressLine1": "123 Supplier Street",
"AddressLine2": "Building 2",
"PostalCode": "8001",
"GeoCoordinates": {
"Latitude": -33.9249,
"Longitude": 18.4241
}
}
}
},
"ShipToLocation": {
"Id": "warehouse_001",
"Details": {
"TradePartner": {
"Id": "my_company",
"Name": "My Company",
"ConnectionType": "SELF",
"Duns": "987654321"
},
"Name": "Main Warehouse",
"Gln": "9506000140446",
"Extension": "WarehouseExtension",
"DunsPlus4": "1234",
"ContactInformation": {
"Name": "Warehouse Contact",
"Phone": "+1234567891",
"Email": "warehouse@example.com"
},
"Address": {
"City": "Cape Town",
"State": "Western Cape",
"Country": "South Africa",
"AddressLine1": "456 Warehouse Road",
"AddressLine2": "Building 2",
"PostalCode": "8002",
"GeoCoordinates": {
"Latitude": -33.925,
"Longitude": 18.425
}
}
}
},
"ProductInstances": [
{
"Quantity": 190.75,
"LotSerial": "lot_001",
"Product": {
"Id": "product_001",
"Details": {
"ProductIdentifierType": "Lot",
"Name": "Sample Product",
"SimpleUnitOfMeasurement": "Kgm",
"SharingPolicy": "Open",
"UnitDescriptor": "Cases",
"UnitQuantity": 10.5,
"Gtin": "12345678912343",
"Plu": "4001",
"MasterData": [
{
"name": "Gear Type",
"namespace": "custom",
"value": "GEAR TYPE_VALUE"
}
]
}
}
}
],
"Id": "receive_lot_001",
"ShipEventId": "ship_lot_001",
"PurchaseOrder": "PO-12345",
"InvoiceNumber": "INV-12345",
"EventTime": "2024-03-30T18:00:00",
"EventTimeZone": "-05:00",
"CustomProperties": [
{
"Name": "quality_grade",
"Namespace": "custom",
"Value": "A"
}
],
"CertificationList": [
{
"Type": "urn:gdst:certType:harvestCoC",
"Standard": "MSC Chain of Custody",
"Agency": "MSC",
"Value": "YES",
"Identification": "MSC-C-12345"
}
]
}
]
}`)
req, err := http.NewRequest("POST", "https://connect.wholechain.com/Integration/Events", 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/Events')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request['X-API-KEY'] = 'example_string'
request.body = '{
"Events": [
{
"$type": "receive",
"ShipFromLocation": {
"Id": "supplier_location_001",
"Details": {
"TradePartner": {
"Id": "supplier_001",
"Name": "Supplier Name",
"ConnectionType": "SUPPLIER",
"Duns": "123456789"
},
"Name": "Supplier Location",
"Gln": "9506000140445",
"Extension": "SomeExtension",
"ContactInformation": {
"Name": "Supplier Contact",
"Phone": "+1234567890",
"Email": "supplier@example.com"
},
"Address": {
"City": "Cape Town",
"State": "Western Cape",
"Country": "South Africa",
"AddressLine1": "123 Supplier Street",
"AddressLine2": "Building 2",
"PostalCode": "8001",
"GeoCoordinates": {
"Latitude": -33.9249,
"Longitude": 18.4241
}
}
}
},
"ShipToLocation": {
"Id": "warehouse_001",
"Details": {
"TradePartner": {
"Id": "my_company",
"Name": "My Company",
"ConnectionType": "SELF",
"Duns": "987654321"
},
"Name": "Main Warehouse",
"Gln": "9506000140446",
"Extension": "WarehouseExtension",
"DunsPlus4": "1234",
"ContactInformation": {
"Name": "Warehouse Contact",
"Phone": "+1234567891",
"Email": "warehouse@example.com"
},
"Address": {
"City": "Cape Town",
"State": "Western Cape",
"Country": "South Africa",
"AddressLine1": "456 Warehouse Road",
"AddressLine2": "Building 2",
"PostalCode": "8002",
"GeoCoordinates": {
"Latitude": -33.925,
"Longitude": 18.425
}
}
}
},
"ProductInstances": [
{
"Quantity": 190.75,
"LotSerial": "lot_001",
"Product": {
"Id": "product_001",
"Details": {
"ProductIdentifierType": "Lot",
"Name": "Sample Product",
"SimpleUnitOfMeasurement": "Kgm",
"SharingPolicy": "Open",
"UnitDescriptor": "Cases",
"UnitQuantity": 10.5,
"Gtin": "12345678912343",
"Plu": "4001",
"MasterData": [
{
"name": "Gear Type",
"namespace": "custom",
"value": "GEAR TYPE_VALUE"
}
]
}
}
}
],
"Id": "receive_lot_001",
"ShipEventId": "ship_lot_001",
"PurchaseOrder": "PO-12345",
"InvoiceNumber": "INV-12345",
"EventTime": "2024-03-30T18:00:00",
"EventTimeZone": "-05:00",
"CustomProperties": [
{
"Name": "quality_grade",
"Namespace": "custom",
"Value": "A"
}
],
"CertificationList": [
{
"Type": "urn:gdst:certType:harvestCoC",
"Standard": "MSC Chain of Custody",
"Agency": "MSC",
"Value": "YES",
"Identification": "MSC-C-12345"
}
]
}
]
}'
response = http.request(request)
puts response.body
{
"message": "Events processed successfully",
"result": [
{
"id": "01a0d877-7871-79a5-a8c8-a2f45673633d",
"externalEventId": "receive_lot_001",
"type": "Receive",
"status": "Created",
"eventDate": "2024-03-30T18:00:00+00:00",
"productInstances": [
{
"quantity": 190.75,
"lotSerial": "lot_001",
"status": "Created",
"id": "01a0d877-7871-7426-b365-3a587ad4f893",
"name": "Raw Goods",
"urn": "urn:gdst:wholechain.com:product:lot:class:raindropsolutions.rawgoods-1.lot_001"
}
],
"containers": [],
"directShipFallback": null,
"externalShipmentFailure": null
}
],
"locations": [
{
"id": "01a0d877-76de-7e96-ac8c-962a914952bf",
"status": "Created"
}
],
"products": [
{
"id": "01a0d877-7719-720e-8fd8-224e3fec0602",
"status": "Created"
}
],
"errors": [],
"validations": []
}
/Integration/Events
Target server for requests. Edit to use your own host.
The media type of the request body
API key used to authenticate the request.
Required. events.
Request Preview
Response
Response will appear here after sending the request
Responses
Optional. message.
Optional. result.
Optional. locations.
Optional. products.
Optional. errors.
Optional. validations.
Introduction
A Receive event records when a lot is received into a Wholechain location.
The Receive event identifies:
- where the product came from using
ShipFromLocation - where the product was received using
ShipToLocation - which product and lot were received using
ProductInstances - how much product was received using
Quantity - when the event occurred using
EventTime - the unique identifier of the Receive event using
Id
A Receive event can be used when receiving product from another Wholechain user, from an external supplier, or when starting the traceability journey at the point of receipt.
Request Headers
| Header | Description | Example Value |
|---|---|---|
X-API-KEY | Your API key. | YOUR_API_KEY_HERE |
Content-Type | Content type of the request. | application/json |
accept | Response content type. | */* |
Request Body
Event Object
| Field | Type | Description | Required |
|---|---|---|---|
$type | STRING | Defines the event type. For a Receive event, use receive. | Yes |
ShipFromLocation | OBJECT | Location the product was received from. | Yes |
ShipToLocation | OBJECT | Internal location receiving the product. | Yes |
ProductInstances | ARRAY | Products and lots being received. | Yes |
Id | STRING | Unique identifier for the Receive event. | Yes |
PurchaseOrder | STRING | Purchase order associated with the event. | No |
InvoiceNumber | STRING | Invoice number associated with the event. | No |
EventTime | DATETIME | Local date and time when the event occurred, without a UTC offset, for example 2024-03-30T13:00:00. The time zone is taken from EventTimeZone. Any offset included in this value is ignored. | Yes |
EventTimeZone | STRING | Optional. Time zone of the event as a UTC offset in ±HH:MM format, for example -05:00. If omitted, the account's default time zone (selected when the account was created) is used. | No |
ShipEventId | STRING | ID of the specific Ship event being received, when applicable. | No |
The Receive API requires the event Id and EventTime. EventTimeZone, purchase order, invoice number and ShipEventId are optional.
Ship From Location
ShipFromLocation identifies where the lot came from.
The location and associated trade partner are included directly in the Receive payload.
"ShipFromLocation": {
"Id": "supplier_location_001",
"Details": {
"TradePartner": {
"Id": "supplier_001",
"Name": "Supplier Name",
"ConnectionType": "SUPPLIER",
"Duns": "123456789"
},
"Name": "Supplier Location",
"Gln": "9506000140445",
"Extension": "SomeExtension",
"ContactInformation": {
"Name": "Contact Name",
"Phone": "+1234567890",
"Email": "contact@example.com"
},
"Address": {
"City": "City Name",
"State": "State Name",
"Country": "Country Name",
"AddressLine1": "123 Supplier Street",
"AddressLine2": "Building 2",
"PostalCode": "12345",
"GeoCoordinates": {
"Latitude": 12.345678,
"Longitude": 98.765432
}
}
}
}
Location Fields
| Field | Type | Description | Required |
|---|---|---|---|
Id | STRING | Unique identifier for the location. | Yes |
Details | OBJECT | Details associated with the location. | Required only if the location does not already exist |
Details.TradePartner | OBJECT | Trade partner associated with the location. | Yes |
Details.TradePartner.Id | STRING | Unique identifier for the trade partner. | Yes |
Details.TradePartner.Name | STRING | Name of the trade partner. | Yes |
Details.TradePartner.ConnectionType | STRING | Relationship type, e.g. SUPPLIER, BUYER, SELF, or OTHER. | Yes |
Details.TradePartner.Duns | STRING | DUNS number of the trade partner. | No |
Details.Name | STRING | Name of the location. | Yes |
Details.Gln | STRING | Global Location Number. | No |
Details.Extension | STRING | Additional location information. | No |
Details.ContactInformation | OBJECT | Contact information associated with the location. | No |
Details.ContactInformation.Name | STRING | Contact person's name. | No |
Details.ContactInformation.Phone | STRING | Contact phone number. | No |
Details.ContactInformation.Email | STRING | Contact email address. | No |
Details.Address | OBJECT | Address of the location. | Yes |
Details.Address.City | STRING | City. | No |
Details.Address.State | STRING | State or province. | No |
Details.Address.Country | STRING | Country. | Yes |
Details.Address.AddressLine1 | STRING | Primary address line. | Yes |
Details.Address.AddressLine2 | STRING | Secondary address line. | No |
Details.Address.PostalCode | STRING | Postal code. | No |
Details.Address.GeoCoordinates | OBJECT | Geographic coordinates. | No |
Details.Address.GeoCoordinates.Latitude | DECIMAL | Latitude. | No |
Details.Address.GeoCoordinates.Longitude | DECIMAL | Longitude. | No |
The Receive API supports these location, trade partner, contact, address, and geographic fields in the location Details structure.
Ship To Location
ShipToLocation identifies the location receiving the lot.
It uses the same location structure as ShipFromLocation.
For your own location, the associated trade partner will normally use:
"ConnectionType": "SELF"
Product Instances
ProductInstances identifies the product, lot number, and quantity being received.
Each lot should be represented as a separate object in the ProductInstances array.
Duplicate lot numbers should not be submitted as separate product instances within the same event. If the same lot appears multiple times, combine the quantities into a single product instance.
Product Instance Fields
| Field | Type | Description | Required |
|---|---|---|---|
Quantity | DECIMAL | Quantity of the lot being received. | Yes |
LotSerial | STRING | Lot or batch number. | Yes |
Product | OBJECT | Product associated with the lot. | Yes |
Product.Id | STRING | Unique identifier for the product. | Yes |
Product.Details | OBJECT | Product details. | Required only if the product does not already exist |
Product.Details.Name | STRING | Name of the product. | Yes |
Product.Details.SimpleUnitOfMeasurement | STRING | Unit in which the product is measured. | Yes |
Product.Details.SharingPolicy | STRING | Sharing policy, e.g. Open or Restricted. | Yes |
Product.Details.ProductIdentifierType | STRING | Product identifier type. For this event use Lot. | Yes |
Product.Details.UnitQuantity | DECIMAL | Quantity contained in the commercial or packaging unit. | No |
Product.Details.UnitDescriptor | STRING | Commercial or packaging unit: Cases, Units, Totes or Pallets. | No |
Product.Details.Gtin | STRING | Global Trade Item Number. | No |
Product.Details.Plu | STRING | Price Lookup Code. | No |
Product.Details.MasterData | ARRAY | Custom data associated with the product. | No |
Product Custom Data
See Event and Lot Custom Data.
Receiving a Specific Ship Event
When the Receive event relates to a specific Ship event already recorded in Wholechain, include ShipEventId.
"ShipEventId": "ship_0003"
For the Receive to succeed:
- The Ship exists and has not been received yet; otherwise 422 "The shipment was already received." or 404 "No pending ship event found with ExternalEventId matching ShipEventId:
<id>". - The Ship EventTime is earlier than the Receive EventTime; otherwise 409 "Event time must be greater than the previous event."
- Each Receive line has the same LotSerial and Quantity as the Ship; otherwise 422 "Receive line for lot '
<lot>' does not match the referenced ship." - ShipToLocation equals the Ship's ShipToLocation; otherwise 422 "Receive location does not match the ship destination."
When ShipEventId is provided, the ProductInstances on the Receive event are ignored. The product instances from the referenced Ship event are recorded instead.
Example Receive a Lot Payload — All Fields
The example below shows the standard Receive a Lot payload including all supported location, product, and event fields covered in this documentation.
Fields that are not applicable should be omitted rather than submitted with empty values.
{
"Events": [
{
"$type": "receive",
"ShipFromLocation": {
"Id": "supplier_location_001",
"Details": {
"TradePartner": {
"Id": "supplier_001",
"Name": "Supplier Name",
"ConnectionType": "SUPPLIER",
"Duns": "123456789"
},
"Name": "Supplier Location",
"Gln": "9506000140445",
"Extension": "SomeExtension",
"ContactInformation": {
"Name": "Supplier Contact",
"Phone": "+1234567890",
"Email": "supplier@example.com"
},
"Address": {
"City": "City Name",
"State": "State Name",
"Country": "Country Name",
"AddressLine1": "123 Supplier Street",
"AddressLine2": "Building 2",
"PostalCode": "12345",
"GeoCoordinates": {
"Latitude": 12.345678,
"Longitude": 98.765432
}
}
}
},
"ShipToLocation": {
"Id": "warehouse_001",
"Details": {
"TradePartner": {
"Id": "my_company",
"Name": "My Company",
"ConnectionType": "SELF",
"Duns": "987654321"
},
"Name": "Main Warehouse",
"Gln": "9506000140446",
"Extension": "WarehouseExtension",
"DunsPlus4": "1234",
"ContactInformation": {
"Name": "Warehouse Contact",
"Phone": "+1234567891",
"Email": "warehouse@example.com"
},
"Address": {
"City": "City Name",
"State": "State Name",
"Country": "Country Name",
"AddressLine1": "456 Warehouse Road",
"AddressLine2": "Unit 4",
"PostalCode": "54321",
"GeoCoordinates": {
"Latitude": 12.345679,
"Longitude": 98.765433
}
}
}
},
"ProductInstances": [
{
"Quantity": 190.75,
"LotSerial": "LOT-001",
"Product": {
"Id": "product_001",
"Details": {
"ProductIdentifierType": "Lot",
"Name": "Sample Product",
"SimpleUnitOfMeasurement": "Kgm",
"SharingPolicy": "Open",
"UnitDescriptor": "Cases",
"UnitQuantity": 10.5,
"Gtin": "12345678912343",
"Plu": "4001",
"MasterData": [
{
"name": "Gear Type",
"namespace": "custom",
"value": "GEAR TYPE_VALUE"
}
]
}
}
}
],
"Id": "receive_0001",
"ShipEventId": "ship_0003",
"PurchaseOrder": "PO-12345",
"InvoiceNumber": "INV-12345",
"EventTime": "2026-09-24T10:00:00",
"EventTimeZone": "+00:00"
}
]
}
Certifications and Custom Event Data
Certifications and custom event-level data are supported but are documented separately.
→ See: Certifications
For information on adding certification records to an event, see the dedicated Certifications documentation.
→ See: Custom Event Data
For information on adding custom fields directly to an event using CustomProperties, see the dedicated Custom Event Data documentation.
These are separate from Product.Details.MasterData, which stores custom information against the product rather than the individual Receive event.
How Entity Creation Works
Locations, trade partners, and products can all be supplied directly within the Receive payload.
The API uses the supplied IDs to determine whether the entity already exists:
- If the ID does not exist, Wholechain creates the entity using the supplied
Details. - If the ID already exists, Wholechain uses the existing entity associated with that ID.
- Locations, trade partners, and products can therefore all use the same standard payload structure.
If an ID already exists, the API uses the existing entity rather than updating it using the supplied Details.
Important Notes
- A Receive event must identify the sending location, receiving location, product lot, quantity, event ID, and event time.
ProductIdentifierTypeshould beLotwhen receiving a lot.- Each lot should appear only once within the same event.
- If the same lot appears multiple times, combine its quantities into a single
ProductInstancesobject. - Locations, trade partners, and products are included directly within the standard Receive payload.
- Optional location, product, and event fields should be omitted when they do not apply.
MasterDatastores custom information against the product.- Event-level custom data and certifications are documented separately.
- Use
ShipEventIdwhen the Receive is intended to receive a specific existing Ship event.