Provides target group feasibility on draft mode (Deprecated)
POST/demand/accounts/{account_id}/projects/{project_id}/target-groups/calculate-feasibility
This endpoint has been deprecated and may be replaced or removed in future versions of the API.
Returns feasibility information for the draft target group Specification based on the Target Group details and profiles.
If profiles are provided, response includes per quota feasibility based on profile conditions.
This endpoint will be removed from a future release of the Cint Exchange API but will be supported for the lifetime of this release.
Important Note-1 on Integration
Problem:
A common integration issue occurs when the response from the generateInterlocked endpoint is incorrectly used as input for the calculateFeasibility endpoint. This misuse leads to processing failures.
Background: Within quota objects in the interlocked profile, related conditions can be structured in two formats:
- Map of Related Conditions
- Array of Related Conditions
The generateInterlocked endpoint returns maps of related conditions. However, the calculateFeasibility endpoint expects an array format. Passing the map format directly causes the feasibility calculation to fail.
Recommended Mitigation: To ensure successful processing, the map structure must be converted to the expected array format.
Step 1: Example Response from generateInterlocked
"related_condition": {
"42": [
{
"text": "35-39",
"text_translated": "35-39",
"min": 35,
"max": 39
}
],
"43": [
{
"text": "Female",
"text_translated": "Female",
"option": "2"
}
]
}
Step 2: Transform to Array Format
"related_condition": [
{
"question_id": 42,
"conditions": [
{
"text": "35-39",
"text_translated": "35-39",
"min": 15,
"max": 39
}
]
},
{
"question_id": 43,
"conditions": [
{
"text": "Female",
"text_translated": "Female",
"option": "2"
}
]
}
]
Step 3:
Submit the transformed data to the calculateFeasibility endpoint. The endpoint will then process the request successfully.
Root Cause: This issue arises due to schema version inconsistencies across clients. An upcoming release will consolidate all versions into a single, unified schema.
Important Note-2
Though the Quota object's ungrouped conditions schema includes quota_percentage and quota_nominal fields as shown in the following example, these fields are not used internally for any calculations or logic.
Example:
"ungrouped": [
{
"id": "01GV070G3SJECZAGE3Q3J6FV56",
"condition": {
"related_condition": [ ... ]
},
"quota_percentage": 40,
"quota_nominal": 906
}
]
The quota_percentage and quota_nominal field values in the above example will be ignored by our backend services, These fields are retained for backward compatibility and documentation purposes only.
Request
Responses
- 200
- 400
- 401
- 403
- 404
- 422
- 500
Successfully obtained target group feasibility.
Response Headers
The traceparent header primarily carries essential trace context information, including the trace ID and parent span ID as defined by the W3C trace context specification. It's used to pinpoint the position of an incoming request within the trace graph, facilitating the tracking of distributed operations.
The tracestate header complements the traceparent header by providing additional contextual information, thereby allowing for the enrichment of tracing context and offering more fine-grained control.
A request is not valid and can't be processed.
A request is unauthorized.
A requested is forbidden.
A requested resource isn't found.
A request failed due to invalid state of the entity
A request failed due to an internal error.