nodejs
nodejs copied to clipboard
Fetched categories length different from commerce tools dasboard
Trying to get all existing categories with the following method:
async getAllCategories() {
try {
const response = await this.apiRoot
.withProjectKey({ projectKey: this.projectKey })
.categories()
.get()
.execute()
return response.body.results
} catch (e) {
console.log(e)
throw e
}
}
I'm getting 19 categories. But in the admin dashboard i have 40 categories