Migration: Wrapper Version 1.5.0
Introduction
The Sparque Wrapper 1.5.0 introduces API Version 3. This guide outlines the changes introduced in API v3 and provides migration instructions from API v2.
Deprecation Notice
As part of our ongoing efforts to improve performance, consistency, and functionality, API v2 has been deprecated following the release of API v3.
Key Details
- Deprecation status: API v2 is still functional but will no longer receive updates or new features.
- Removal timeline: API v2 will be retired in the future. The removal date will be announced well in advance to allow sufficient time for migration.
- Impact: Once API v2 is retired, all requests to v2 endpoints will result in errors.
- Action required: We strongly recommend migrating to API v3 as soon as possible to ensure uninterrupted service. Note that only the /categorytree endpoint was modified, all other endpoints are identical to v2.
Summary of Changes
Endpoint | Change Type | Requires Sparque Changes | Description |
---|---|---|---|
/categorytree | Breaking change | No | Removed empty arrays from categorytree response |
Removed Empty Arrays From /categorytree Response
Affected Endpoints
- /api/v3/categorytree
Changes
The endpoint /api/v2/categorytree always includes the fields subCategories
and attributes
in its response, even if they are empty. For large category trees, this can create unnecessary overhead when processing the data. In /api/v3/categorytree, we have improved this by omitting these fields from the response when they do not contain any data.
/api/v2/categorytree:
{
"categories": [
{
"categoryID": "categoryId",
"categoryName": "categoryName",
"totalCount": 0,
"subCategories": [],
"attributes": []
}
]
}
/api/v3/categorytree:
{
"categories": [
{
"categoryID": "categoryId",
"categoryName": "categoryName",
"totalCount": 0
}
]
}