-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
I'm trying to create a productOrder using the productOrderingManagement API with Orion-LD as my CB but POST request sent to Orion fails.
- This is my request:
curl --location 'http://<tm_forum_api_host>/tmf-api/productOrderingManagement/v4/productOrder' \
--header 'Accept: */*' \
--header 'Content-Type: application/json' \
--data '{
"productOrderItem": [
{
"id": "random-order-id",
"action": "add",
"productOffering": {
"id": "urn:ngsi-ld:product-offering:<existing_product_offering_id>"
}
}
],
"relatedParty": [
{
"id": "urn:ngsi-ld:organization:<existing_organization_id>"
}
]
}'- Request sent from the TM Forum API service to the CB:
curl --location 'http://<orion-ld_host>/ngsi-ld/v1/entities' \
--header 'Content-Type: application/json' \
--data '{
"href": {
"value": "urn:ngsi-ld:product-order:<product_order_id>",
"type": "Property"
},
"productOrderItem": [
{
"value": {
"itemId": "random-order-id",
"action": "add",
"productOffering": {
"id": "urn:ngsi-ld:product-offering:<existing_product_offering_id>",
"referencedTypes": [
"product-offering"
],
"entityId": "urn:ngsi-ld:product-offering:<existing_organization_id>"
}
},
"type": "Property",
"itemId": {
"value": "random-order-id",
"type": "Property"
},
"productOffering": {
"object": "urn:ngsi-ld:product-offering:<existing_product_offering_id>",
"type": "Relationship",
"referencedTypes": {
"value": [
"product-offering"
],
"type": "Property"
},
"entityId": {
"value": "urn:ngsi-ld:product-offering:<existing_product_offering_id>",
"type": "Property"
}
},
"action": {
"value": "add",
"type": "Property"
}
}
],
"relatedParty": [
{
"object": "urn:ngsi-ld:organization:<existing_organization_id>",
"type": "Relationship"
}
],
"orderDate": {
"value": "2025-05-08T11:10:09.304600775Z",
"type": "Property"
}
}'- Logs in the Orion-LD service:
DEBUG@11:10:09 orionldContextItemExpand.cpp[85]: Found 'entityId' in the core context (https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.8.jsonld)
ERROR@11:10:09 pCheckAttribute.cpp[217]: ***** ERROR: JSON Type for attribute not according to @context @type field: https://uri.etsi.org/ngsi-ld/entityId (status: 400)
DEBUG@11:10:09 mhdReply.cpp[77]: Response Body: '{"type":"[https://uri.etsi.org/ngsi-ld/errors/BadRequestData","title":"JSON](https://uri.etsi.org/ngsi-ld/errors/BadRequestData%22,%22title%22:%22JSON) Type for attribute not according to @context @type field","detail":"[https://uri.etsi.org/ngsi-ld/entityId"}'](https://uri.etsi.org/ngsi-ld/entityId%22%7D%27)
DEBUG@11:10:09 mhdReply.cpp[78]: Response Code: 400
Versions used:
- FIWARE TM Forum API v1.2.7
- Orion-LD v1.9.0
I have also tested with latest version of Scorpio CB and older versions of Orion-LD with the following results:
- Scorpio: works in all tested versions including v5.0.9 (latest stable)
- Orion-LD: works in tested versions up to v1.0.1
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels