Get needs configuration by product
This endpoint returns the needs configuration defined for the product specified in the URL.
GET /api/v1/businesses/{businessId}/products/{productId}/needs-config
If the data included in the URL is correct, the response will contain the product’s needs configuration, including its seasons (seasons), active proposals (proposals), and the list of day types (dayTypes) and tasks (locations) that can be referenced when defining the configuration through the API.
Response example
{
"productId": "0001-GENERAL",
"productName": "GENERAL",
"seasons": [
{
"id": "2026-GEN",
"name": "General",
"fromMonthDay": "01-01",
"toMonthDay": "12-31",
"addressable": true,
"proposals": [
{
"id": "PRT",
"name": "Productivity",
"defaultProposal": true,
"addressable": true,
"steps": [
{
"id": "STP1",
"name": "Productivity",
"order": 4,
"type": "PRODUCTIVITY",
"addressable": true
}
]
},
{
"name": "Dynamic template",
"defaultProposal": false,
"addressable": false,
"steps": [
{
"name": "Dynamic template",
"order": 1,
"type": "DYNAMIC_TEMPLATES",
"addressable": false
},
{
"name": "Dynamic template 2",
"order": 2,
"type": "DYNAMIC_TEMPLATES",
"addressable": false
}
]
},
{
"name": "Hourly budget",
"defaultProposal": false,
"addressable": false,
"steps": [
{
"name": "Recommendation based on hourly budget",
"order": 1,
"type": "BUDGET_HOUR",
"addressable": false
}
]
},
{
"name": "Training",
"defaultProposal": false,
"addressable": false,
"steps": [
{
"name": "Training",
"order": 1,
"type": "PREPARATION",
"addressable": false
},
{
"name": "Productivity",
"order": 2,
"type": "PRODUCTIVITY",
"addressable": false
},
{
"name": "Test template",
"order": 3,
"type": "DYNAMIC_TEMPLATES",
"addressable": false
}
]
}
]
}
],
"dayTypes": [
{
"name": "ALL",
"node": null,
"priority": -400
},
{
"name": "WORKED_EXCLUDING_HOLIDAYS",
"node": null,
"priority": -300
},
{
"name": "MONDAY_SATURDAY",
"node": null,
"priority": -300
},
{
"name": "Closing holiday",
"node": "0001",
"priority": 5
}
],
"locations": [
{
"id": "01",
"zone": "General",
"name": "OPENING",
"type": "FIXED",
"addressable": true
},
{
"id": "03",
"zone": "General",
"name": "SALES",
"type": "VARIABLE",
"addressable": true
},
{
"id": "AUTO",
"zone": "General",
"name": "AUTO",
"type": "FIXED",
"addressable": false
}
]
}
Details
-
productId: external identifier of the product or section.
-
productName: name of the product or section.
-
seasons: seasons configured for the product. Each season includes the following information:
-
id: external identifier of the season. Can be
null, in which case the season cannot be referenced through the API. -
name: name of the season.
-
fromMonthDay: start of the season, in
MM-ddformat. -
toMonthDay: end of the season, in
MM-ddformat. -
year: year the season is restricted to. Can be
nullif it applies to every year. -
addressable: indicates whether this season can be referenced through the API. It is
falsewhen it has no external identifier. -
proposals: needs generator proposals active in the season. Each proposal includes the following information:
-
id: external identifier of the proposal. Can be
nullif it has not been defined in the system. -
name: name of the proposal.
-
defaultProposal: indicates whether this is the default proposal.
-
addressable: indicates whether this proposal can be referenced through the API. It is
falsewhen it has no external identifier. -
steps: steps of the proposal, in execution order. Each step includes the following information:
-
id: external identifier of the step. Can be
null, in which case the step cannot be referenced through the API. -
name: name of the step.
-
order: position of the step within the proposal, as stored.
-
type: type of the step, which determines how it is configured. Possible values are
BRMS,PRODUCTIVITY,ASSISTED_SALE,BUDGET_HOUR,PREPARATION,REST,DYNAMIC_TEMPLATES,ACCUMULATIVE,LOWEST_DEMAND,CHECKOUT_SIMULATION. -
addressable: indicates whether this step can be modified through the API. It is
falsewhen it has no external identifier or when its type is not yet supported.
-
-
-
-
dayTypes: day types that can be used when configuring a step of this product. Each day type includes the following information:
-
name: name of the day type, which is how it is referenced when configuring a step.
-
node: external identifier of the node where the day type is defined. Allows distinguishing two day types with the same name inherited from different nodes. Can be
nullfor a system day type and for one defined on a node with no external identifier. -
priority: priority of the day type. When several apply to the same day, the one with the highest value prevails.
-
-
locations: tasks that can be used when configuring the employee distribution of a step. Each task includes the following information:
-
id: external identifier of the task. It is
nullwhen it has none defined, in which case the task cannot be referenced. -
zone: external identifier of the zone the task belongs to.
-
name: name of the task.
-
type: type of need linked to the task, which can be
VARIABLE,FIXEDorUNPLANNED. -
addressable: indicates whether this task can be referenced when configuring a step. It is
falsefor system tasks and for those with no external identifier.
-
Considerations
If the product has no active proposal associated with a season, the response will return "seasons": [].
If a proposal has no configured steps, the response will return "steps": [] for that proposal.
The addressable field will be true if the element has an external identifier and can be referenced through the API. For steps (steps), its generation type must also be supported for writing.
Error codes
In addition to the common errors, this endpoint can return the following codes:
| Code | Message | Description |
|---|---|---|
|
Needs configuration not found |
The product exists, but has no needs configuration (seasons, proposals or steps) defined. |