Uniquely identifies this entity. A URI can be assigned by the client to indicate where more information can be retrieved. Note that every entity always has a unique EntityId. However since, OTM5.2 it is not required to send it in the request. One can be generated for you by the server.
The last modified date of this entity. If none is given the creation date is used instead.
The context events provides some optional information about the events that can provide additional information on the current state of this entity.
For example: your system might send ETA information for the arrival of a vehicle on a location. To make it clear what caused this ETA to be updated, we can include some information about what caused this ETA update by including an event as context. If your ETA update was caused by a location update, this event can be included as context. If the ETA was caused by a traffic accident on the route of the vehicle, you can include that event in the context.
External attributes are a simple way to add information in an OpenTripModel message that could not fit into one of the OTM fields otherwise. The externalAttributes member is meant for additional meta data and/or additional ID's of an entity. This can also help to identify an OTM entity in a system by the ID of that system.
Please, use this with caution: having too many external attributes can be a sign of not using OpenTripModel as it was intended.
Standardized identifiers of this entity as known in external systems. Use this to exchange repeatable partner or system specific identifiers without overloading externalAttributes.
[ { "id": "AAA", "scheme": "CAS" } ]
Remark belonging to the goods that need to be transported. For example a delivery note.
A barcode present on the (packaging of the) goods that uniquely identifies these goods.
A quantity determines how many of a certain good you have. Note that all other measurements are measured for a single product, not for the total of products.
The net weight of a 'single' good, the total weight can be calculated by using the quantity and multiplying it with this weight.
The gross weight of a 'single' good, the total weight can be calculated by using the quantity and multiplying it with this weight.
The width of a 'single' good, the total width can be calculated by using the quantity and multiplying it with this width.
The height of a 'single' good, the total height can be calculated by using the quantity and multiplying it with this height.
The length of a 'single' good, the total length can be calculated by using the quantity and multiplying it with this length.
Description of the package type. Use as described by the GS1 standard.
Product classification information often required at customs. A single product can contain multiple classification lines. For example whenever the product consists of multiple components that can each be classified. The most important information in the classification lines is often the HS code.
- Mock serverhttps://otm-api-spec.redocly.app/_mock/api/5.9/otm/api/v5/goods
- https://example.comhttps://example.com/api/v5/goods
curl -i -X PUT \
https://otm-api-spec.redocly.app/_mock/api/5.9/otm/api/v5/goods \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"id": "903807df-ee62-47aa-bf8e-7efd747618ce",
"entityType": "goods",
"type": "items",
"description": "Box of bananas",
"remark": "Please deliver in time, we want fresh bananas",
"barCode": "CSE370",
"productType": "Fruit",
"packagingMaterial": "Box",
"constraint": {
"entity": {
"value": {
"and": [
{
"startTime": "2021-06-23T10:00:00Z",
"endTime": "2021-06-23T13:00:00Z",
"description": "alert-threshold",
"type": "timeWindowConstraint"
},
{
"constraintType": "maximum",
"maximum": {
"value": 5,
"unit": "C"
},
"type": "temperatureConstraint"
},
{
"or": [
{
"fuelTypes": [
"battery"
],
"type": "fuelTypeConstraint"
},
{
"fuelTypes": [
"biodiesel"
],
"type": "fuelTypeConstraint"
},
{
"minimum": "euro5",
"type": "emissionStandardConstraint"
}
],
"type": "orConstraint"
}
],
"type": "andConstraint"
}
},
"associationType": "inline"
}
}'The same entity
Uniquely identifies this entity. A URI can be assigned by the client to indicate where more information can be retrieved. Note that every entity always has a unique EntityId. However since, OTM5.2 it is not required to send it in the request. One can be generated for you by the server.
The last modified date of this entity. If none is given the creation date is used instead.
The context events provides some optional information about the events that can provide additional information on the current state of this entity.
For example: your system might send ETA information for the arrival of a vehicle on a location. To make it clear what caused this ETA to be updated, we can include some information about what caused this ETA update by including an event as context. If your ETA update was caused by a location update, this event can be included as context. If the ETA was caused by a traffic accident on the route of the vehicle, you can include that event in the context.
External attributes are a simple way to add information in an OpenTripModel message that could not fit into one of the OTM fields otherwise. The externalAttributes member is meant for additional meta data and/or additional ID's of an entity. This can also help to identify an OTM entity in a system by the ID of that system.
Please, use this with caution: having too many external attributes can be a sign of not using OpenTripModel as it was intended.
Standardized identifiers of this entity as known in external systems. Use this to exchange repeatable partner or system specific identifiers without overloading externalAttributes.
[ { "id": "AAA", "scheme": "CAS" } ]
Remark belonging to the goods that need to be transported. For example a delivery note.
A barcode present on the (packaging of the) goods that uniquely identifies these goods.
A quantity determines how many of a certain good you have. Note that all other measurements are measured for a single product, not for the total of products.
The net weight of a 'single' good, the total weight can be calculated by using the quantity and multiplying it with this weight.
The gross weight of a 'single' good, the total weight can be calculated by using the quantity and multiplying it with this weight.
The width of a 'single' good, the total width can be calculated by using the quantity and multiplying it with this width.
The height of a 'single' good, the total height can be calculated by using the quantity and multiplying it with this height.
The length of a 'single' good, the total length can be calculated by using the quantity and multiplying it with this length.
Description of the package type. Use as described by the GS1 standard.
Product classification information often required at customs. A single product can contain multiple classification lines. For example whenever the product consists of multiple components that can each be classified. The most important information in the classification lines is often the HS code.
{ "id": "903807df-ee62-47aa-bf8e-7efd747618ce", "entityType": "goods", "type": "items", "description": "Box of bananas", "remark": "Please deliver in time, we want fresh bananas", "barCode": "CSE370", "productType": "Fruit", "packagingMaterial": "Box", "constraint": { "entity": { … }, "associationType": "inline" } }