Versioning master data
Most Item related entities provide a revision
property. This property can be set by integrations to make sure sequential changes to the entity is guaranteed to be processed in the correct order.
NOTE: The
revision
property is not required, and the input APIs will set the property if it is not provided.It will always be set to the epoch timestamp of when the input was received by the API.
The revision
property is of the data type long
or Int64
and allows you to provide a numeric value to each version of the entity. In this way it is possible to determine if an input is older than an already handled input of the same entity.
How to make use of revision
You should only need to provide a
revision
if your integration is in danger of sending updates on the same entity so close in time that network latency CAN cause the requests to arrive in the wrong order in Hii Retail.
The value MUST be guaranteed to be larger than the previous value, and it must be set by a part of your system that can be trusted to always provide the correct value for each change of the entity, and in the correct order.
We highly recommend to set it to a UNIX epoch timestamp in milliseconds
For Price Specifications it is required to use a UNIX epoch timestamp with millisecond precision!
Please note the recommendation above, but it can be any numeric value like an auto-incremented primary key from a internal database or simply the <previous-value>
+1 as long as it is always incremented in a trustworthy manner.
This allows the value to be set in a trustworthy way regardless of any cleanups in a database, or potential resets of a counter, etc.
Please note that network latency will always be an uncontrollable factor, so consider the revision
property if your integration is prone to this issue