Sample JSON data

Use the sample JSON data as a reference to create JSON files for data ingestion.

Sample JSON data

When creating, ensure your data files are formatted correctly in JSON format and meets the following criteria.
  • The file must contain individual events in JSON format, with each event on a new line.
  • The file name cannot contain any of these characters: /":'?<>&*|.
  • The file can be in a compressed format, and only gzip is supported. The file name must end with .gz or .gzip.
  • All the events in each uploaded file are assigned a unique batchId, which can be used to query the events or objects by using the batchTraceId attribute in a simple filter.

The following excerpt of JSON data shows the format for expected JSON file. Do not format the JSON body.


{"eventCode":"objectUpsertEvent", "tenantId":"087c8b15-c0df-48e1-ae0b-b991aa8d1bf3", "timestampEventOccurred":"2021-03-22T03:49:11.024Z", "eventDetails":{ "businessObject":{ "type":"Product", "globalIdentifiers":[ { "name":"import_test_product_id", "value":"testProductIdABC123" } ], "name": "testProductABC1231", "partNumber": "testPartNumberABC1231", "value": 100000, "valueCurrency": "USD", "category": { "globalIdentifiers":[ { "name":"import_test_category_id", "value":"testCategoryIDABC123" } ] } } }}
{"eventCode":"objectUpsertEvent", "tenantId":"087c8b15-c0df-48e1-ae0b-b991aa8d1bf3", "timestampEventOccurred":"2021-03-22T03:49:11.024Z", "eventDetails":{ "businessObject":{ "type":"Catalog", "globalIdentifiers":[ { "name":"import_test_category_id", "value":"testCategoryIdABC123" } ], "name": "testCategoryABC123", "code": "testCodeABC123", "value": 100000 } }}

The following fields are the minimum requirements for an event:

{
   "eventCode":"objectUpsertEvent",
   "tenantId":"087c8b15-c0df-48e1-ae0b-b991aa8d1bf3",
   "eventDetails":{
      "businessObject":{
         "type":"Product", //
         "globalIdentifiers":[
            {
               "name":"import_test_category_id",
               "value":"testCategoryIdABC123"
            }
         ]
      }
   }
}
Where,
tenantId
The ID of your tenant. Instead of specifying a tenant ID in each event in the file, you can add your tenant ID to a tag that is called tenantId when you upload the file. If the tenant ID is not specified in the event, then the tenant ID from the tag is picked up and added to the event. If you specify tenant ID in any events, they must match the value in the tag.
type
A valid object type. For example, Product, Catalog, and so on.
name
The name of the global identifier. For example, import_test_category_id.
value
The value of the global identifier. For example, testCategoryIdABC123.