I'm aware of the general distinction between data and content, namely context, but here I have a case that is clearly causing a lot of confusion and debate within the company I work for.
There is a front-end team which manage an application which calls our data API. The confusion is that they want the content structured the way they are presenting it, because according them the structure implies domain knowledge (business logic) which they don't know anything about. The thing is, they came up with the structure in the first place... together with business. So is it business logic or GUI logic?
To illustrate, here's an example:
Our REST endpoint /car/123/repair/status
returns:
{
"status": "being_painted" /* actually an enumeration */
}
One customer journey scenario conjured up by the UX guy from the front-end team includes the concept of 'stages' in which the various repair statuses can be categorized into. This was discussed and agreed upon with our business product owner. The idea is that it provides a better visual overview to the end-user (not being business).
So instead of applying GUI logic to display 'stages' correlating to the 'repair status', they want us to provide it as data. Data that has no bearing on any IT process using a concept we don't officially know.
What they want:
{
"currentStage": {
"stage": "stage_recovery"
"status": "being_painted"
}
}
Is this business logic that should be part of the data API or is it GUI logic that should be part of the front-end application? Rephrased: should we provide such a granular API that it is completely specced for the highly specific presentational need or should we stick with just the statuses and create an API that only deals with data known to us internally?
One argument for providing statuses but not stages is the fact that statuses are based on the source data from our domain, while stages are based on the result of this (so not on source data). But I'm not sure how much of a real argument that is.