Skip to main content
POST
/
events
Create Event
curl --request POST \
  --url https://api.example.com/events \
  --header 'Content-Type: application/json' \
  --data '
{
  "eventTime": "2023-11-07T05:31:56Z",
  "eventTag": "<string>",
  "epcs": [
    {
      "epc": "<string>",
      "tradeItem": "<string>"
    }
  ],
  "inputEpcs": [
    {
      "epc": "<string>",
      "tradeItem": "<string>"
    }
  ],
  "outputEpcs": [
    {
      "epc": "<string>",
      "tradeItem": "<string>"
    }
  ],
  "quantityList": [
    {
      "quantity": 123,
      "epcClass": "<string>",
      "tradeItem": "<string>",
      "classReference": true,
      "unit": "<string>"
    }
  ],
  "outputQuantityList": [
    {
      "quantity": 123,
      "epcClass": "<string>",
      "tradeItem": "<string>",
      "classReference": true,
      "unit": "<string>"
    }
  ],
  "inputQuantityList": [
    {
      "quantity": 123,
      "epcClass": "<string>",
      "tradeItem": "<string>",
      "classReference": true,
      "unit": "<string>"
    }
  ],
  "sourceList": [
    {
      "source": "<string>",
      "partner": "<string>"
    }
  ],
  "destinationList": [
    {
      "destination": "<string>",
      "partner": "<string>"
    }
  ],
  "readPoint": {
    "identifier": "<string>",
    "lat": 123,
    "lng": 123
  },
  "images": [
    "<string>"
  ]
}
'
import requests

url = "https://api.example.com/events"

payload = {
"eventTime": "2023-11-07T05:31:56Z",
"eventTag": "<string>",
"epcs": [
{
"epc": "<string>",
"tradeItem": "<string>"
}
],
"inputEpcs": [
{
"epc": "<string>",
"tradeItem": "<string>"
}
],
"outputEpcs": [
{
"epc": "<string>",
"tradeItem": "<string>"
}
],
"quantityList": [
{
"quantity": 123,
"epcClass": "<string>",
"tradeItem": "<string>",
"classReference": True,
"unit": "<string>"
}
],
"outputQuantityList": [
{
"quantity": 123,
"epcClass": "<string>",
"tradeItem": "<string>",
"classReference": True,
"unit": "<string>"
}
],
"inputQuantityList": [
{
"quantity": 123,
"epcClass": "<string>",
"tradeItem": "<string>",
"classReference": True,
"unit": "<string>"
}
],
"sourceList": [
{
"source": "<string>",
"partner": "<string>"
}
],
"destinationList": [
{
"destination": "<string>",
"partner": "<string>"
}
],
"readPoint": {
"identifier": "<string>",
"lat": 123,
"lng": 123
},
"images": ["<string>"]
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
eventTime: '2023-11-07T05:31:56Z',
eventTag: '<string>',
epcs: [{epc: '<string>', tradeItem: '<string>'}],
inputEpcs: [{epc: '<string>', tradeItem: '<string>'}],
outputEpcs: [{epc: '<string>', tradeItem: '<string>'}],
quantityList: [
{
quantity: 123,
epcClass: '<string>',
tradeItem: '<string>',
classReference: true,
unit: '<string>'
}
],
outputQuantityList: [
{
quantity: 123,
epcClass: '<string>',
tradeItem: '<string>',
classReference: true,
unit: '<string>'
}
],
inputQuantityList: [
{
quantity: 123,
epcClass: '<string>',
tradeItem: '<string>',
classReference: true,
unit: '<string>'
}
],
sourceList: [{source: '<string>', partner: '<string>'}],
destinationList: [{destination: '<string>', partner: '<string>'}],
readPoint: {identifier: '<string>', lat: 123, lng: 123},
images: ['<string>']
})
};

fetch('https://api.example.com/events', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/events",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'eventTime' => '2023-11-07T05:31:56Z',
'eventTag' => '<string>',
'epcs' => [
[
'epc' => '<string>',
'tradeItem' => '<string>'
]
],
'inputEpcs' => [
[
'epc' => '<string>',
'tradeItem' => '<string>'
]
],
'outputEpcs' => [
[
'epc' => '<string>',
'tradeItem' => '<string>'
]
],
'quantityList' => [
[
'quantity' => 123,
'epcClass' => '<string>',
'tradeItem' => '<string>',
'classReference' => true,
'unit' => '<string>'
]
],
'outputQuantityList' => [
[
'quantity' => 123,
'epcClass' => '<string>',
'tradeItem' => '<string>',
'classReference' => true,
'unit' => '<string>'
]
],
'inputQuantityList' => [
[
'quantity' => 123,
'epcClass' => '<string>',
'tradeItem' => '<string>',
'classReference' => true,
'unit' => '<string>'
]
],
'sourceList' => [
[
'source' => '<string>',
'partner' => '<string>'
]
],
'destinationList' => [
[
'destination' => '<string>',
'partner' => '<string>'
]
],
'readPoint' => [
'identifier' => '<string>',
'lat' => 123,
'lng' => 123
],
'images' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.example.com/events"

payload := strings.NewReader("{\n \"eventTime\": \"2023-11-07T05:31:56Z\",\n \"eventTag\": \"<string>\",\n \"epcs\": [\n {\n \"epc\": \"<string>\",\n \"tradeItem\": \"<string>\"\n }\n ],\n \"inputEpcs\": [\n {\n \"epc\": \"<string>\",\n \"tradeItem\": \"<string>\"\n }\n ],\n \"outputEpcs\": [\n {\n \"epc\": \"<string>\",\n \"tradeItem\": \"<string>\"\n }\n ],\n \"quantityList\": [\n {\n \"quantity\": 123,\n \"epcClass\": \"<string>\",\n \"tradeItem\": \"<string>\",\n \"classReference\": true,\n \"unit\": \"<string>\"\n }\n ],\n \"outputQuantityList\": [\n {\n \"quantity\": 123,\n \"epcClass\": \"<string>\",\n \"tradeItem\": \"<string>\",\n \"classReference\": true,\n \"unit\": \"<string>\"\n }\n ],\n \"inputQuantityList\": [\n {\n \"quantity\": 123,\n \"epcClass\": \"<string>\",\n \"tradeItem\": \"<string>\",\n \"classReference\": true,\n \"unit\": \"<string>\"\n }\n ],\n \"sourceList\": [\n {\n \"source\": \"<string>\",\n \"partner\": \"<string>\"\n }\n ],\n \"destinationList\": [\n {\n \"destination\": \"<string>\",\n \"partner\": \"<string>\"\n }\n ],\n \"readPoint\": {\n \"identifier\": \"<string>\",\n \"lat\": 123,\n \"lng\": 123\n },\n \"images\": [\n \"<string>\"\n ]\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.example.com/events")
.header("Content-Type", "application/json")
.body("{\n \"eventTime\": \"2023-11-07T05:31:56Z\",\n \"eventTag\": \"<string>\",\n \"epcs\": [\n {\n \"epc\": \"<string>\",\n \"tradeItem\": \"<string>\"\n }\n ],\n \"inputEpcs\": [\n {\n \"epc\": \"<string>\",\n \"tradeItem\": \"<string>\"\n }\n ],\n \"outputEpcs\": [\n {\n \"epc\": \"<string>\",\n \"tradeItem\": \"<string>\"\n }\n ],\n \"quantityList\": [\n {\n \"quantity\": 123,\n \"epcClass\": \"<string>\",\n \"tradeItem\": \"<string>\",\n \"classReference\": true,\n \"unit\": \"<string>\"\n }\n ],\n \"outputQuantityList\": [\n {\n \"quantity\": 123,\n \"epcClass\": \"<string>\",\n \"tradeItem\": \"<string>\",\n \"classReference\": true,\n \"unit\": \"<string>\"\n }\n ],\n \"inputQuantityList\": [\n {\n \"quantity\": 123,\n \"epcClass\": \"<string>\",\n \"tradeItem\": \"<string>\",\n \"classReference\": true,\n \"unit\": \"<string>\"\n }\n ],\n \"sourceList\": [\n {\n \"source\": \"<string>\",\n \"partner\": \"<string>\"\n }\n ],\n \"destinationList\": [\n {\n \"destination\": \"<string>\",\n \"partner\": \"<string>\"\n }\n ],\n \"readPoint\": {\n \"identifier\": \"<string>\",\n \"lat\": 123,\n \"lng\": 123\n },\n \"images\": [\n \"<string>\"\n ]\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.example.com/events")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"eventTime\": \"2023-11-07T05:31:56Z\",\n \"eventTag\": \"<string>\",\n \"epcs\": [\n {\n \"epc\": \"<string>\",\n \"tradeItem\": \"<string>\"\n }\n ],\n \"inputEpcs\": [\n {\n \"epc\": \"<string>\",\n \"tradeItem\": \"<string>\"\n }\n ],\n \"outputEpcs\": [\n {\n \"epc\": \"<string>\",\n \"tradeItem\": \"<string>\"\n }\n ],\n \"quantityList\": [\n {\n \"quantity\": 123,\n \"epcClass\": \"<string>\",\n \"tradeItem\": \"<string>\",\n \"classReference\": true,\n \"unit\": \"<string>\"\n }\n ],\n \"outputQuantityList\": [\n {\n \"quantity\": 123,\n \"epcClass\": \"<string>\",\n \"tradeItem\": \"<string>\",\n \"classReference\": true,\n \"unit\": \"<string>\"\n }\n ],\n \"inputQuantityList\": [\n {\n \"quantity\": 123,\n \"epcClass\": \"<string>\",\n \"tradeItem\": \"<string>\",\n \"classReference\": true,\n \"unit\": \"<string>\"\n }\n ],\n \"sourceList\": [\n {\n \"source\": \"<string>\",\n \"partner\": \"<string>\"\n }\n ],\n \"destinationList\": [\n {\n \"destination\": \"<string>\",\n \"partner\": \"<string>\"\n }\n ],\n \"readPoint\": {\n \"identifier\": \"<string>\",\n \"lat\": 123,\n \"lng\": 123\n },\n \"images\": [\n \"<string>\"\n ]\n}"

response = http.request(request)
puts response.read_body
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "createdAt": "2023-11-07T05:31:56Z",
  "eventTime": "2023-11-07T05:31:56Z",
  "userId": "<string>",
  "eventTag": {
    "id": "<string>",
    "code": "<string>",
    "name": "<string>",
    "description": "<string>",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z",
    "deleted": true,
    "deletedAt": "2023-11-07T05:31:56Z"
  },
  "quantityList": [
    {
      "epcClass": "<string>",
      "quantity": 123,
      "unit": "<string>"
    }
  ],
  "outputQuantityList": [
    {
      "epcClass": "<string>",
      "quantity": 123,
      "unit": "<string>"
    }
  ],
  "inputQuantityList": [
    {
      "epcClass": "<string>",
      "quantity": 123,
      "unit": "<string>"
    }
  ],
  "sourceList": [
    {
      "source": "<string>",
      "partner": "<string>"
    }
  ],
  "destinationList": [
    {
      "destination": "<string>",
      "partner": "<string>"
    }
  ],
  "readPoint": {
    "identifier": "<string>",
    "lat": 123,
    "lng": 123
  },
  "seafoodEventData": {
    "catchArea": "<string>"
  },
  "epcs": [
    {
      "epc": "<string>"
    }
  ],
  "inputEpcs": [
    {
      "epc": "<string>"
    }
  ],
  "outputEpcs": [
    {
      "epc": "<string>"
    }
  ],
  "images": [
    "<string>"
  ]
}

Body

application/json
eventTime
string<date-time>
required

The time of the event

eventType
enum<string>
required

The type of the event

Available options:
ASSOCIATION_EVENT,
OBJECT_EVENT,
AGGREGATION_EVENT,
TRANSACTION_EVENT,
TRANSFORMATION_EVENT
action
enum<string>
required

The ACTION of the event.

Available options:
OBSERVE,
ADD,
DELETE
eventTag
string

The tag associated with the event

bizStep
enum<string>

The business step associated with the event

Available options:
ACCEPTING,
ARRIVING,
ASSEMBLING,
COLLECTING,
COMMISSIONING,
CONSIGNING,
CREATING_CLASS_INSTANCE,
CYCLE_COUNTING,
DECOMMISSIONING,
DEPARTING,
DESTROYING,
DISASSEMBLING,
DISPENSING,
ENCODING,
ENTERING_EXITING,
HOLDING,
INSPECTING,
INSTALLING,
KILLING,
LOADING,
OTHER,
PACKING,
PICKING,
RECEIVING,
REMOVING,
REPACKAGING,
REPAIRING,
REPLACING,
RESERVING,
RETAIL_SELLING,
SHIPPING,
STAGING_OUTBOUND,
STOCK_TAKING,
STOCKING,
STORING,
TRANSPORTING,
UNLOADING,
UNPACKING,
VOID_SHIPPING,
SENSOR_REPORTING,
SAMPLING
disposition
enum<string>

The disposition of the event

Available options:
ACTIVE,
CONTAINER_CLOSED,
DAMAGED,
DESTROYED,
DISPENSED,
DISPOSED,
ENCODED,
EXPIRED,
IN_PROGRESS,
IN_TRANSIT,
INACTIVE,
NO_PEDIGREE_MATCH,
NON_SELLABLE_OTHER,
PARTIALLY_DISPENSED,
RECALLED,
RESERVED,
RETAIL_SOLD,
RETURNED,
SELLABLE_ACCESSIBLE,
SELLABLE_NOT_ACCESSIBLE,
STOLEN,
UNKNOWN,
AVAILABLE,
COMPLETENESS_VERIFIED,
COMPLETENESS_INFERRED,
CONFORMANT,
CONTAINER_OPEN,
MISMATCH_INSTANCE,
MISMATCH_CLASS,
MISMATCH_QUANTITY,
NEEDS_REPLACEMENT,
NON_CONFORMANT,
UNAVAILABLE
epcs
object[]

List of EPCs associated with the event

inputEpcs
object[]

List of input EPCs associated with the event

outputEpcs
object[]

List of output EPCs associated with the event

quantityList
object[]

List of quantities associated with the event

outputQuantityList
object[]

Output ist of quantities associated with the event

inputQuantityList
object[]

Input list of quantities associated with the event

sourceList
object[]

List of sources associated with the event

destinationList
object[]

List of destinations associated with the event

readPoint
object

The read point associated with the event

seafoodEventData
object

The seafood event data associated with the event

images
string[]

List of images associated with the event

Response

The location has been successfully created

id
string<uuid>
required

The id of the event

Example:

"123e4567-e89b-12d3-a456-426614174000"

createdAt
string<date-time>
required

The time of the event was created

eventTime
string<date-time>
required

The time of the event

eventType
enum<string>
required

The type of the event

Available options:
ASSOCIATION_EVENT,
OBJECT_EVENT,
AGGREGATION_EVENT,
TRANSACTION_EVENT,
TRANSFORMATION_EVENT
action
enum<string>
required

The action of the event

Available options:
OBSERVE,
ADD,
DELETE
userId
string

The user id of the event

eventTag
object

The tag associated with the event

bizStep
enum<string>

The business step associated with the event

Available options:
ACCEPTING,
ARRIVING,
ASSEMBLING,
COLLECTING,
COMMISSIONING,
CONSIGNING,
CREATING_CLASS_INSTANCE,
CYCLE_COUNTING,
DECOMMISSIONING,
DEPARTING,
DESTROYING,
DISASSEMBLING,
DISPENSING,
ENCODING,
ENTERING_EXITING,
HOLDING,
INSPECTING,
INSTALLING,
KILLING,
LOADING,
OTHER,
PACKING,
PICKING,
RECEIVING,
REMOVING,
REPACKAGING,
REPAIRING,
REPLACING,
RESERVING,
RETAIL_SELLING,
SHIPPING,
STAGING_OUTBOUND,
STOCK_TAKING,
STOCKING,
STORING,
TRANSPORTING,
UNLOADING,
UNPACKING,
VOID_SHIPPING,
SENSOR_REPORTING,
SAMPLING
disposition
enum<string>

The disposition of the event

Available options:
ACTIVE,
CONTAINER_CLOSED,
DAMAGED,
DESTROYED,
DISPENSED,
DISPOSED,
ENCODED,
EXPIRED,
IN_PROGRESS,
IN_TRANSIT,
INACTIVE,
NO_PEDIGREE_MATCH,
NON_SELLABLE_OTHER,
PARTIALLY_DISPENSED,
RECALLED,
RESERVED,
RETAIL_SOLD,
RETURNED,
SELLABLE_ACCESSIBLE,
SELLABLE_NOT_ACCESSIBLE,
STOLEN,
UNKNOWN,
AVAILABLE,
COMPLETENESS_VERIFIED,
COMPLETENESS_INFERRED,
CONFORMANT,
CONTAINER_OPEN,
MISMATCH_INSTANCE,
MISMATCH_CLASS,
MISMATCH_QUANTITY,
NEEDS_REPLACEMENT,
NON_CONFORMANT,
UNAVAILABLE
quantityList
object[]

List of quantities associated with the event

outputQuantityList
object[]

Output list of quantities associated with the event

inputQuantityList
object[]

Input list of quantities associated with the event

sourceList
object[]

List of sources associated with the event

destinationList
object[]

List of destinations associated with the event

readPoint
object

The read point associated with the event

seafoodEventData
object

The seafood event data associated with the event

epcs
object[]

The instance identifiers associated with the event

inputEpcs
object[]

The instance identifiers associated with the event

outputEpcs
object[]

The instance identifiers associated with the event

images
string[]

The images associated with the event