Symptom
- When querying the Case API in SAP Sales & Service Cloud Version 2 using the following format:
GET /sap/c4c/api/v1/case-service/cases?$filter=account.id eq <ACCOUNT_ID> - Only a subset of the expected case records is returned.
- Known cases associated with the specified account may not appear in the initial response.
Environment
- SAP Service Cloud Version 2 1.0
- SAP Sales Cloud Version 2 1.0
Cause
- Consulting
Resolution
- Such behavior is due to server-side pagination enforced by the Case API:
- The API limits the number of records returned per request, typically defaulting to 50 or 100 items.
- To retrieve the complete result set, clients must use the $top and $skip query options for manual pagination.
- Example Scenario (assuming there are 188 cases linked to an account):
- Retrieving All 188 Matching Cases related to a specific account.
- To get the total count of matching cases related to the account:
-> GET /sap/c4c/api/v1/case-service/cases/$count?$filter=account.id eq <ACCOUNT_ID> - Retrieve the first 100 cases:
-> GET /sap/c4c/api/v1/case-service/cases?$top=100&$filter=account.id eq <ACCOUNT_ID> - Continue using $skip=200, $skip=300, etc., as needed, based on the total count.
- To get the total count of matching cases related to the account:
- Important:
- The Case API does not support auto-pagination using @odata.nextLink.
- Always include $count to determine the total number of records.
- Ensure filter consistency across all paginated calls to avoid mismatches.
- Retrieving All 188 Matching Cases related to a specific account.
See Also
Keywords
sap service cloud version 2, api cases, missing cases, closed cases, api response, $top parameter, postman, insomnia, case-service, sap c4c, isIrrelevant filter, account.id filter, status filter, integration, cx service v2, sap api troubleshooting , KBA , CEC-CRM-CAS , Case Management for SAP Sales/Service Cloud , Problem
Product
SAP Service Cloud Version 2 all versions
SAP Knowledge Base Article - Public