Navigation
Lead / Send Request Scenario
General
Design
APIs
Lead / Send Request Scenario
General
Design
APIs
If you are using the priceService API, you should ignore the following and use your price service for validation.
Without a price service, you can use the json web token (jwt) contained in the field NEW_ITEM-EGR_CUSTOMDATA_PRICEHASH of the OCI to validate the price. The jwt leads to the following information:
{ "items": [ { "calculation": { "itemNetValue": { "formatted": "100,00 EUR", "currency": "EUR", "value": 100 }, "finalValue": { "formatted": "119,00 EUR", "currency": "EUR", "value": 119.00 } }, "basketId": "<basketID>", "quantity": 1, "articleNumber": "<baseArticleNumber>", "manufacturerName": "<manufacturer>", "seriesName": "<seriesID>", "finalValue": "<price>", "ofmlVarCode": "<varCode>" } ] }
The field “itemNetValue”contains the net price while “finalValue” is the gross price for the country in your configuration. This price can be compared with the price in the OCI field NEW_ITEM-PRICE and the OBX field itemPrice. Over all three formats, the articles can be related with the basketId.
The OBX file always contains net prices while the OCI contains net or gross prices (depending on your [[:basics:defaults#Net or gross Prices|instance settings. The jwt always contains both.
In case of child articles or a PEC, the items list has more than one entry:
{ "items": [ { "calculation": { [..] }, "basketId": "<basketID1>", }, { "calculation": { [..] }, "basketId": "<basketID2>", [..] } ] }
The jwt signature can be verified with the following public key:
-----BEGIN PUBLIC KEY----- MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA5lq93R1JBeHZbE5pq0qt DZff9aWU5LqCBe5SvuzBgEGfvkYYQrwHfGHH8C11iPGh0tWmdCqFf4ldN49Wl/U4 VsoLrkxYdKazy1T993n63NdRJXGoaKGGlBoYJMKrJHq10Rf8pA1Nvoo5sAg1iWwM nCEYZMYUtKbyN9KIq+yXdD9rdev/bhG2fkNHv7ExTO+iHRcUE05ST+ksADC5vcP5 S7966Dc3S/Ex2U/YS6i+HBA4tbCQ24y++/belvTeKHn5wNaOKexFuqIbKL9FfUPq XdQWy0hiddaFIo5Q9KQCWygxDlWWW8X6wcrv41q+yemGJPjbWRDQUHHZv9B9tXcN zwIDAQAB -----END PUBLIC KEY-----