As an application developer I only want to load the updated data from Wikibase instance, so I can update it in my app only when data changes
See `If-None-Match` and `If-Modified-Since` parameters in the specification: https://gerrit.wikimedia.org/r/773447
**BDD**
As an API user
GIVEN there is a newer version of item data than revision ID N
WHEN I make a GET request to /entities/items/{item_id}
AND I provide N as the revision ID in `If-None-Match` header
THEN I receive 200 HTTP response from the API
AND response contains item data
As an API user
GIVEN The most recent version of an item is N
WHEN I make a GET request to /entities/items/{item_id}
AND I provide N as the revision ID in `If-None-Match` header
THEN I receive 304 HTTP response from the API
AND response headers contain the item metadata as indicated in the specs
As an API user
GIVEN there is a newer version of item data than published on or before the timestamp Y
WHEN I make a GET request to /entities/items/{item_id}
AND I provide Y as a timestamp in `If-Modified-Since` header
THEN I receive 200 HTTP response from the API
AND response contains item data
As an API user
GIVEN The most recent version of an item is the version published on or before the timestamp Y
WHEN I make a GET request to /entities/items/{item_id}
AND I provide Y as a timestamp in `If-Modified-Since` header
THEN I receive 304 HTTP response from the API
AND response headers contain the item metadata as indicated in the specs
As an API user
WHEN I make a GET request to /entities/items/{item_id}
AND I provide the text that is not a number in the `If-None-Match` header
THEN I get 400 HTTP response
AND it contains a `invalid-revision-id` code and a message "Not a revision ID: {value}"
AND a HTTP header Content-Language set to `en`
As an API user
GIVEN An item does not have a revision number M
WHEN I make a GET request to /entities/items/{item_id}
AND I provide M the `If-None-Match` header
THEN I get 404 HTTP response
AND it contains a `revision-not-found` code and a message "Could not find a revision {revision_id} of an Item {item_id}"
AND a HTTP header Content-Language set to `en`
As an API user
WHEN I make a GET request to /entities/items/{item_id}
AND I provide the text which is not a valid HTTP date in the `If-Modified-Since` header
THEN I get 400 HTTP response
AND it contains a `invalid-date` code and a message "Invalid date: {timestamp}"
AND a HTTP header Content-Language set to `en`
**Note:**
- timestamps must be HTTP dates as defined in [RFC 7231](https://datatracker.ietf.org/doc/html/rfc7231#section-7.1.1.1) (see also [date syntax](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Modified-Since#syntax), [HttpDate](https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/core/+/refs/heads/master/includes/Rest/HeaderParser/HttpDate.php) class in Mediawiki REST API)
- weak comparison of ETags is out of scope of this story, and will be handled separately: T304832