-
Notifications
You must be signed in to change notification settings - Fork 34
EPCIS Object Add
This page describes the XML to JSON mappings for an Object add (Commission Event).
Note: An ILMD (Instance/Lot Master Data) also generates (layer: 'object', label: 'lotILMD').
This section shows the GS1 XML to JSON mappings. JSON keys are on the left, and the XPaths to the corresponding tag in GS1 XML are on the right, separated by a colon character (:).
// Context Node: /epcis:EPCISDocument/EPSICBody/EventList/ObjectEvent
{
"assetIdUri": "urn:ibm:provenance:asset:transaction:order:<string>:default:default:<string>",
"organization": "<string>",
"layer": "event",
"label": "commission",
"data":
{
"eventID" : "baseExtension/eventID",
"eventTime" : "eventTime",
"generationInfo" : {
"isConnectorGenerated" : "true | false",
"generatedFromEventID" : ""
},
"recordTime" : "",
"eventTimeZoneOffset": "eventTimeZoneOffset",
// Context Node: epcList
"epcList" : [
"epc": "epc",
...
],
// Context Node: extension/quantityList/quantityElement
"quantityList" : [
{
"epcClass" : "epcClass",
"quantity" : "quantity",
"uom" : "uom",
},
...
],
// Context Node: Flat list of all epcs in event. Union of epcList and quantityList.epcClass.
"flatEPCList" : [
":epcClass",
...
],
"flatGTINList" : [
"",
...
],
"action" : "ADD",
"bizStep" : "bizStep",
"disposition" : "disposition",
"readPoint" : "readpoint/id",
"bizLocation" : "bizLocation/id",
// Context Node: extension/sourceList
"sourceList" : [
{
"type" : "source/@type",
"source" : "source"
},
...
],
// Context Node: extension/destinationList
"destinationList" : [
{
"type" : "destination/@type",
"destination" : "destination",
},
...
],
// Context Node: bizTransactionList
"bizTransactionList" : [
{
"type" : "bizTransaction/@type",
"bizTransaction" : "bizTransaction"
},
...
]
}
The following example shows a valid GS1 XML file for input. The JSON output follows.
Note: The following fields have been removed for GDPR compliance:
- StandardBusinessDocumentHeader.Sender.ContactInformation (all sub-elements)
- StandardBusinessDocumentHeader.Receiver.ContactInformation (all sub-elements)
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<epcis:EPCISDocument xmlns:epcis="urn:epcglobal:epcis:xsd:1" xmlns:cbvmda="urn:epcglobal:cbv:mda" xmlns:example="http://ns.example.com/epcis" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" creationDate="2005-07-11T11:30:47.0Z" schemaVersion="1.2">
<EPCISBody>
<EventList>
<ObjectEvent>
<eventTime>2013-06-08T14:58:56.591Z</eventTime>
<eventTimeZoneOffset>+02:00</eventTimeZoneOffset>
<baseExtension>
<eventID>1234</eventID>
</baseExtension>
<epcList/>
<action>ADD</action>
<bizStep>urn:epcglobal:cbv:bizstep:commissioning</bizStep>
<disposition>urn:epcglobal:cbv:disp:active</disposition>
<readPoint>
<id>urn:epc:id:sgln:string.string.integer</id>
</readPoint>
<bizLocation>
<id>urn:epc:id:sgln:string.string.integer</id>
</bizLocation>
<extension>
<quantityList>
<quantityElement>
<epcClass>urn:epc:class:lgtin:string.string.string</epcClass>
<quantity>200</quantity>
<uom>KGM</uom>
</quantityElement>
</quantityList>
<sourceList>
<source type="urn:epcglobal:cbv:sdt:owning_party">urn:epc:id:sgln:string.string.integer</source>
</sourceList>
<destinationList>
<destination type="urn:epcglobal:cbv:sdt:owning_party">urn:epc:id:sgln:string.string.integer
</destination>
</destinationList>
<ilmd>
<cbvmda:itemExpirationDate>2015-03-15</cbvmda:itemExpirationDate>
<cbvmda:farmList><cbvmda:farmIdentification></cbvmda:farmIdentification></cbvmda:farmList>
<cbvmda:lot>A123</cbvmda:lot>
</ilmd>
</extension>
</ObjectEvent>
</EventList>
</EPCISBody>
</epcis:EPCISDocument>
The following example shows the JSON output from the input GS1 XML file above.
This is the generated URN:
{
"urn": "urn:ibm:provenance:asset:event:commission:security_disabled:default:default:string"
}
This is the generated JSON:
{
"eventTime": "2013-06-08T14:58:56.591Z",
"eventTimeZoneOffset": "+02:00",
"eventID": "1234",
"epcList": [
{}
],
"action": "ADD",
"bizStep": "urn:epcglobal:cbv:bizstep:commissioning",
"disposition": "urn:epcglobal:cbv:disp:active",
"readPoint": "urn:epc:id:sgln:string.string.integer",
"bizLocation": "urn:epc:id:sgln:string.string.integer",
"quantityList": [
{
"epcClass": "urn:epc:class:lgtin:string.string.string",
"quantity": "200",
"uom": "KGM"
}
],
"sourceList": [
{
"source": "urn:epc:id:sgln:string.string.integer",
"type": "urn:epcglobal:cbv:sdt:owning_party"
}
],
"destinationList": [
{
"destination": "urn:epc:id:sgln:string.string.integer ",
"type": "urn:epcglobal:cbv:sdt:owning_party"
}
],
"flatEPCList": [
"urn:epc:class:lgtin:string.string.string"
]
}
WELCOME!
Modules
Membership
Languages
Browsers
ONBOARDING
Onboarding Steps
Data Requirements
Data Types
Supplier Data
Payload Data
Insights Data
HOW-TO
Join by Invitation
Log in as New User
Authenticate Human Users
Authenticate System Users
Java Sample
Typescript Sample
IIB Sample
Assign User Roles
Upload Data
Automate Data Upload
Convert Spreadsheets
Convert Data
Whitelist Custom URLs
APIs-Swagger
Connector API
Documents API
Converter API
Trace API
Insights API
APIs-Usage
APIs
Insights API
Insights API Usage
Trace API
Connector API Errors
API Error Codes
REFERENCE
GS1
GS1 Identifier Reuse
Authentication
Identifiers
Message Codes
Cryptographic
Signatures
Signature Header
Access Control
Firewall Settings
XML to JSON
EPCIS Aggregation Add
EPCIS Aggregation Delete
EPCIS Object Add
EPCIS Object Delete
EPCIS Object Observed
EPCIS Transformation
Purchase Order
Despatch Advice
Receiving Advice
Master Data Item
Master Data Facility
Standard Business
Document Header