Category API
Author:
Fluent Commerce
Changed on:
3 Oct 2024
Overview
Below are the properties available in the Category object, which can be updated and retrieved through the APIs in this document.
Key points
- Below are the properties available in the Category object
- This can be updated and retrieved through the APIs in this document.
1categoryResponse{
2 start (integer),
3 count (integer),
4 total (integer),
5 retailerId (string),
6 results (integer):[
7 {
8 id (string),
9 categoryRef (string),
10 name (string),
11 createdOn (Date-time)
12 updatedOn (Date-time)
13 }
14 ]
15 }
16
Language: json
Name: Category Response
Description:
Category response and example
1{
2 "start": 1,
3 "count": 10,
4 "total": 727,
5 "retailerId": null,
6 "results": [
7 {
8 "id": 73,
9 "categoryRef": "1401",
10 "name": "MENS CREW FLEECE",
11 "updatedOn": "2015-06-14T11:57:14.000+0000",
12 "createdOn": "2015-06-14T11:57:14.000+0000"
13 },
14 {
15 "id": 673,
16 "categoryRef": "1",
17 "name": "TG WOVEN TOPS",
18 "updatedOn": "2016-11-07T09:02:37.035+0000",
19 "createdOn": "2015-11-09T12:44:01.000+0000"
20 }
21 ]
22}
Language: json
Name: Category example
Description:
Category example
1. createdOn
Type: DateTime
Description:
`{ "createdOn" : "2016-05-06T23:41:12.242Z" }`
Date/time when the Category was created
2. updatedOn
Type: DateTime
Description:
`{ "updatedOn" : "2016-06-23T07:58:58.000+0000" }`
Date/time when the Category was last updated
3. categoryId
Type: String
Description:
`{ "categoryId" : "427323" }`
The unique identifier assigned by Fluent Commerce
4. parentCategoryId
Type: String
Description:
`{ "parentCategoryId" : "427098" }`
The unique identifier of the parent Category i.e. Shoes > Kids Shoes
5. categoryRef
Type: String
Description:
`{ "categoryRef" : "S3675" }`
The unique identifier used by the Retailer
6. name
Type: String
Description:
`{ "name" : "Womens Shoes" }`
The Category name
7. retailerId
Type: String
Description:
`{ "retailerId" : "197" }`
The retailer identifier assigned by Fluent Commerce
What you can do with Category?
Create a Category in the Fluent Retail system.
POST: /api/v4.1/category
Request and response
Request parameters and sample.
Category request
1CategoryRequest {
2 categoryRef (string, compulsory),
3 name (string, compulsory),
4 parentCategoryId (string, optional),
5 retailerId (string, compulsory)
6 }
Language: graphqlschema
Name: Category request
Description:
Category Request and Response with example.
1{
2 "categoryRef":"S3675"
3 "name":"Womens Shoes"
4 "parentCategoryId":""
5 "retailerId":"197"
6}
Language: json
Name: Example of CategoryRequest
Description:
Example of CategoryRequest
Response Parameters and Sample
1SuccessMessageResponse {
2 id (string, optional)
3}
Language: json
Name: Category Response
Description:
Example Response
1{
2 "id":"427323"
3}
Language: json
Name: Example response
Description:
Example Response
View Category details
Retrieve details of the Category
GET: /api/v4.1/category/{categoryId}
Request and response
Request parameters and sample
Category request
/api/v4.1/category/{categoryId}
Example request
/api/v4.1/category/S3675
Response Parameters and Sample
1CategoryResponse {
2categoryRef (string),
3categoryId (string),
4name (string),
5parentCategoryId (string),
6retailerId (string),
7createdOn (DateTime),
8updatedOn (DateTime)
9}
Language: json
Name: Category Response
Description:
Category Response parameters
1{
2 "categoryRef": "1401",
3 "categoryId": "73",
4 "name": "MENS CREW FLEECE",
5 "parentCategoryId": "70",
6 "retailerId": "433",
7 "createdOn": "2015-06-14T11:57:14.000+0000",
8 "updatedOn":"2016-11-06T23:41:12.242Z"
9}
Language: json
Name: Example response
Description:
Example response
Search Categories
Retrieve a list of Categories matching the search criteria
GET: /api/v4.1/category
Request and response
Request parameters and sample
1categoryRequest {
2 categoryRef (string, compulsory),
3 start (integer, optional),
4 count (integer, optional)
5}
Language: javascript
Name: Category Request parameters
Description:
Category Request parameters Sample
1{
2 "categoryRef":"S3675",
3 "start":"1",
4 "count":"10"
5 }
Language: json
Name: Category Request
Description:
Category Request example
Response Parameters and Sample
1categoryResponse {
2 start (integer),
3 count (integer),
4 total (integer),
5 retailerId (string),
6 results (integer): [
7 {
8 id (string),
9 categoryRef (string),
10 name (string),
11 createdOn (Date-time),
12 updatedOn (Date-time)
13 }
14 ]
15 }
Language: json
Name: Category response
Description:
Response Parameters and Sample
1{
2 "start": 1,
3 "count": 10,
4 "total": 727,
5 "retailerId": null,
6 "results": [
7 {
8 "id": 73,
9 "categoryRef": "1401",
10 "name": "MENS CREW FLEECE",
11 "updatedOn": "2015-06-14T11:57:14.000+0000",
12 "createdOn": "2015-06-14T11:57:14.000+0000"
13 },
14 {
15 "id": 673,
16 "categoryRef": "1",
17 "name": "TG WOVEN TOPS",
18 "updatedOn": "2016-11-07T09:02:37.035+0000",
19 "createdOn": "2015-11-09T12:44:01.000+0000"
20 }
21 ]
22}
Language: json
Name: Example response
Description:
Example response
Update Categories
Edit the Category information
PUT: /api/v4.1/category/{categoryId}
Request and response
Request parameters and sample
1CategoryRequest {
2 categoryRef (string, compulsory),
3 categoryId (string, compulsory),
4 name (string, compulsory),
5 parentCategoryId (string, optional),
6 retailerId (string, compulsory),
7 createdOn (DateTime, optional),
8 updatedOn (DateTime, optional)
9 }
Language: java
Name: Category request
Description:
Category request parameters and sample
1{
2 "categoryRef": "1401",
3 "categoryId": "73",
4 "name": "MENS CREW FLEECE",
5 "parentCategoryId": "70",
6 "retailerId": "433",
7 "createdOn": "2015-06-14T11:57:14.000+0000",
8 "updatedOn":"2016-11-06T23:41:12.242Z"
9}
Language: json
Name: Example request
Description:
Example request
Response Parameters and Sample
1SuccessMessageResponse {
2 id (string, optional)
3 }
Language: json
Name: Category response
Description:
Category response and sample
1{
2 "id":"427323"
3}
Language: json
Name: Category response Example
Description:
Category response Example
Response on Failures
NAME | TYPE | DESCRIPTION |
error | Array | Array of errors |
message | String | Additional information on the code Unauthorized | Bad Request | Forbidden | Not Found | Status 500 Error |
code | String | Status Code for the above messages 401 | 400 | 403 | 404 | 500 |