Category
Category contains a collection of linked internet addresses which are mostly sorted according to specific criteria e.g. Bottoms, Nightwear, Athleisure, etc. On this page, we'll dive into the different category endpoints you can use to manage Categories programmatically.
Get all categories
This endpoint allows you to retrieve a list of all the categories defined.
Developers - API Operations:
Operation | Endpoint | Response |
---|---|---|
Category Details | /api/v2/catalog/category | Get All Category. |
Response Properties
- Name
statusCode
- Type
- number
- Description
Status code of the response
- Name
status
- Type
- string
- Description
Status of the response
- Name
errors
- Type
- array
- Description
List of errors in the response
- Name
success
- Type
- boolean
- Description
Success status of the response
- Name
message
- Type
- string
- Description
Message of the response
- Name
messageCode
- Type
- string
- Description
Message code of the response
- Name
result
- Type
- object
- Description
Result of the response
- Name
id
- Type
- string
- Description
Id of the category
- Name
name
- Type
- string
- Description
Name of the category
- Name
link
- Type
- string
- Description
Link associated with each category
- Name
description
- Type
- string
- Description
Description of the product category
- Name
isFeatured
- Type
- boolean
- Description
Flag to check is category featured or not
- Name
breadCrumbs
- Type
- array
- Description
Array to sort in the List.
- Name
slugType
- Type
- string
- Description
Describes the type of slug.
- Name
title
- Type
- string
- Description
Title of the category
- Name
image
- Type
- string
- Description
URL of the Image of the product
- Name
images
- Type
- array
- Description
Array containing the list of Images
- Name
tag
- Type
- string
- Description
Tag associated with the Product
- Name
url
- Type
- string
- Description
URL of the Image
- Name
mobileUrl
- Type
- string
- Description
URL for mobile
- Name
alt
- Type
- string
- Description
Alternate text to be added in Image
- Name
subTitle
- Type
- string
- Description
Subtitle of the Category
- Name
linkType
- Type
- string
- Description
Name of the Logo Image
- Name
buttonText
- Type
- string
- Description
Text to be added in button
- Name
eventCategory
- Type
- string
- Description
Category of the event
- Name
eventAction
- Type
- string
- Description
Action of the event
- Name
gaValue
- Type
- string
- Description
Value of the GA data
- Name
isActive
- Type
- string
- Description
Flag to check the Active status
- Name
displayOrder
- Type
- number
- Description
Order of the display associated with the product
- Name
imageTags
- Type
- array
- Description
Tags associated with each Image
- Name
recordId
- Type
- string
- Description
Id of the Brand Record
- Name
src
- Type
- string
- Description
Source URL of the image
- Name
text
- Type
- string
- Description
Contains the Text content
- Name
productType
- Type
- string
- Description
Defines the type of Product
- Name
subcategories
- Type
- array
- Description
Contains the subcategories of each category
- Name
linkGroups
- Type
- array
- Description
Group of links for the Category
- Name
groupType
- Type
- string
- Description
Type of group particular category belongs
- Name
attributeInputType
- Type
- string
- Description
Type of the attribute taken as input
- Name
metaTitle
- Type
- string
- Description
MetaTitle associated with the product
- Name
metaDescription
- Type
- string
- Description
MetaDescription associated with the product
- Name
metaKeywords
- Type
- string
- Description
MetaKeywords associated with the product
- Name
canonicalTags
- Type
- string
- Description
Cannonical Tags associated with the product
- Name
langCulture
- Type
- string
- Description
Language associated with the product
- Name
displayText
- Type
- string
- Description
The text to be displayed
- Name
additionInfo1
- Type
- string
- Description
The text to be displayed as additionalInfo1
- Name
additionInfo2
- Type
- string
- Description
The text to be displayed as additionalInfo2
- Name
additionInfo3
- Type
- string
- Description
The text to be displayed as additionalInfo3
- Name
additionInfo4
- Type
- string
- Description
The text to be displayed as additionalInfo4
- Name
additionInfo5
- Type
- string
- Description
The text to be displayed as additionalInfo5
- Name
snippets
- Type
- string
- Description
Additional code pieces to be added with the category
Request
curl --location --request GET 'https://api20.bettercommerce.io/api/v2/catalog/category' \
--header 'Cookie: ARRAffinity=b13bb339e1ac28f5b31d8289818f929ee76838eb63e5c727c2b61a385a402597; ARRAffinitySameSite=b13bb339e1ac28f5b31d8289818f929ee76838eb63e5c727c2b61a385a402597'
Response
{
"statusCode": 100,
"status": "string",
"errors": [
"string"
],
"success": true,
"message": "string",
"messageCode": "string",
"result": [
{
"id": "string",
"name": "string",
"link": "string",
"description": "string",
"isFeatured": true,
"breadCrumbs": [
{
"slugType": "string",
"slug": {
"title": "string",
"slug": "string",
"childSlug": {}
}
}
],
"image": "string",
"images": [
{
"name": "string",
"tag": "string",
"image": "string",
"imageTypes": 0,
"url": "string",
"mobileUrl": "string",
"alt": "string",
"link": "string",
"description": "string",
"subTitle": "string",
"linkType": "string",
"buttonText": "string",
"eventCategory": "string",
"eventAction": "string",
"gaValue": "string",
"isActive": true,
"cssClass": "string",
"title": "string",
"displayOrder": 0,
"imageTags": [
{
"recordId": "00000000-0000-0000-0000-000000000000",
"src": "string",
"text": "string",
"name": "string",
"link": "string",
"shapes": [
{
"type": "string",
"units": "string",
"geometry": {
"x": 0,
"y": 0,
"width": 0,
"height": 0
}
}
],
"productType": 0
}
]
}
],
"subCategories": [
{}
],
"linkGroups": [
{
"name": "string",
"groupType": 1,
"displayOrder": 0,
"items": [
{
"id": "string",
"name": "string",
"link": "string",
"displayOrder": 0,
"info1": "string",
"ingo2": "string"
}
],
"attributeInputType": 0,
"breadCrumbs": [
{
"langCulture": "string",
"value": "string",
"slugType": 1,
"slug": {
"title": "string",
"slug": "string",
"childSlug": {}
}
}
]
}
],
"langCulture": "string",
"metaTitle": "string",
"metaDescription": "string",
"metaKeywords": "string",
"canonicalTags": "string",
"displayText": "string",
"additionalInfo1": "string",
"additionalInfo2": "string",
"additionalInfo3": "string",
"additionalInfo4": "string",
"additionalInfo5": "string"
}
],
"snippets": [
{
"name": "string",
"type": 1,
"placement": 0,
"content": "string",
"excludedUrl": "string",
"microsites": [
"00000000-0000-0000-0000-000000000000"
]
}
],
"slugType": 1
}
Get category by slug
This endpoint retrieves a category based on the Slug passed.
Developers - API Operations:
Operation | Endpoint | Response |
---|---|---|
Category by Slug | /api/v2/catalog/category/slug?slug={{variable_slug}} | Get All Category by slug. |
Required attributes
- Name
slug
- Type
- string
- Description
Unique slug for each Category.
Response Properties
- Name
statusCode
- Type
- number
- Description
Status code of the response
- Name
status
- Type
- string
- Description
Status of the response
- Name
errors
- Type
- array
- Description
List of errors in the response
- Name
success
- Type
- boolean
- Description
Success status of the response
- Name
message
- Type
- string
- Description
Message of the response
- Name
messageCode
- Type
- string
- Description
Message code of the response
- Name
result
- Type
- object
- Description
Result of the response
- Name
id
- Type
- string
- Description
Id of the category
- Name
name
- Type
- string
- Description
Name of the category
- Name
link
- Type
- string
- Description
Link associated with each category
- Name
description
- Type
- string
- Description
Description of the product category
- Name
isFeatured
- Type
- boolean
- Description
Flag to check is category featured or not
- Name
breadCrumbs
- Type
- array
- Description
Array containing previous navigated slugs
- Name
slugType
- Type
- string
- Description
Describes the type of slug.
- Name
image
- Type
- string
- Description
URL of the Image of the product
- Name
images
- Type
- array
- Description
Array containing the list of Images
- Name
subcategories
- Type
- array
- Description
Contains the subcategories of each category
- Name
linkGroups
- Type
- array
- Description
Group of links for the Category
- Name
metaTitle
- Type
- string
- Description
MetaTitle associated with the product
- Name
metaDescription
- Type
- string
- Description
MetaDescription associated with the product
- Name
metaKeywords
- Type
- string
- Description
MetaKeywords associated with the product
- Name
langCulture
- Type
- string
- Description
Language associated with the product
- Name
snippets
- Type
- string
- Description
Additional code pieces to be added with the category
Request
curl --location --request POST 'https://api20.bettercommerce.io/api/v2/catalog/category/slug?slug=category/matching-sets' \
--header 'Cookie: ARRAffinity=b13bb339e1ac28f5b31d8289818f929ee76838eb63e5c727c2b61a385a402597; ARRAffinitySameSite=b13bb339e1ac28f5b31d8289818f929ee76838eb63e5c727c2b61a385a402597'
Response
{
"statusCode": 200,
"status": "OK",
"errors": [],
"success": true,
"message": null,
"messageCode": null,
"result": {
"id": "45d6351d-4846-40be-acd6-0455e3f49c90",
"name": "MATCHING SETS",
"link": "category/matching-sets",
"description": "",
"isFeatured": false,
"breadCrumbs": [],
"image": "",
"images": [],
"subCategories": [
{
"id": "eeeab053-9965-4cd0-97b9-ec7f2840b8b0",
"name": "TRACKSUITS",
"link": "category/matching-sets/tracksuits",
"description": null,
"isFeatured": false,
"breadCrumbs": null,
"image": "",
"images": null,
"subCategories": [],
"linkGroups": null,
"langCulture": null,
"metaTitle": null,
"metaDescription": null,
"metaKeywords": null,
"canonicalTags": null,
"displayText": null
}
],
"linkGroups": [],
"langCulture": null,
"metaTitle": "betterstore",
"metaDescription": "betterstore",
"metaKeywords": "betterstore",
"canonicalTags": "",
"displayText": null
},
"snippets": [],
"slugType": 4
}