GET, COUNT, CREATE, UPDATE and DELETE operations available on categories.
Categories Operations
GET
URL
POST https://your-secured-store-url:443/api/v1/products/categories/get
Filters
Request
Retrieve all the items (max 1000)
{
'authentication' : {
'apiKey' : 'jjns7519v1v3ns6xU162'
}
}
Retrieve specific items by ID
{
'authentication' : {
'apiKey' : 'jjns7519v1v3ns6xU162'
},
'filters' : {
'id' : ['00000000-0000-0000-0000-000000000000', '12345678-1234-1234-1234-123456781234']
}
}
Most complete request (just to give you the format of each parameter)
{
'authentication' : {
'apiKey' : 'jjns7519v1v3ns6xU162'
},
'filters' : {
'id': ['00000000-0000-0000-0000-000000000000', '12345678-1234-1234-1234-123456781234'],
'name' : ['Category 1','Category 2'],
'slug' : ['category-1','category-2'],
'createdon_min' : '2015-01-01',
'createdon_max' : '2042-01-01'
},
'pagination' : {
'pageNumber' : '1',
'pageSize' : '1000'
}
}
Response
If no error occured, you will receive a response like this one (object type: Category). Please refer to error messages to learn more about the possible error responses.
[
{
"id": "00000000-0000-0000-0000-000000000000",
"name": "Category 1",
"slug": "category-1",
"description": "Description example for category 1",
"seopagetitle": "SEO page",
"seometakeywords": "SEO META keywords",
"seopagedescription": "SEO META",
"author": "Mr Example",
"createdon": "2016-10-03 16:03:21"
},
{
"id": "12345678-1234-1234-1234-123456781234",
"name": "Category 2",
"slug": "category-2",
"description": "Description example for category 2",
"seopagetitle": "SEO page",
"seometakeywords": "SEO META keywords",
"seopagedescription": "SEO META",
"author": "Mr Example",
"createdon": "2016-10-03 16:07:40"
}
]
COUNT
URL
POST https://your-secured-store-url:443/api/v1/products/categories/count
Filters
Request
Count the items
{
'authentication' : {
'apiKey' : 'jjns7519v1v3ns6xU162'
}
}
Count specific items by creation date
{
'authentication' : {
'createdon_min' : '2015-01-01',
'createdon_max' : '2042-01-01'
},
'filters' : {
'visible' : 'true'
}
}
Most complete request (just to give you the format of each parameter)
{
'authentication' : {
'apiKey' : 'jjns7519v1v3ns6xU162'
},
'filters' : {
'id': ['00000000-0000-0000-0000-000000000000', '12345678-1234-1234-1234-123456781234'],
'name' : ['Category 1','Category 2'],
'slug' : ['category-1','category-2'],
'createdon_min' : '2015-01-01',
'createdon_max' : '2042-01-01'
}
}
Response
If no error occured, you will receive a response like this one. Please refer to error messages to learn more about the possible error responses.
CREATE
URL
POST https://your-secured-store-url:443/api/v1/products/categories/create
Data properties
Mandatory
Property |
Type |
name |
String (max 255 chars) |
slug |
String (max 255 chars) |
description |
String (max 255 chars) |
seopagetitle |
String (max 255 chars) |
seopagedescription |
String (max 255 chars) |
seometakeywords |
String (max 255 chars) |
Request
Most complete request
{
'authentication' : {
'apiKey' : 'jjns7519v1v3ns6xU162'
},
'data' : [{
'name' : 'Category 3',
'slug' : 'category-3',
'description' : 'Description example for category 3',
'seopagetitle' : 'SEO page title',
'seopagedescription' : 'SEO META description',
'seometakeywords' : 'SEO META keywords'
}]
}
Response
If no error occured, you will receive a response like this one. Please refer to error messages to learn more about the possible error responses.
[
{
"id": "7865559d-5864-4926-8414-8bf55ad35741",
"name": "Category 3",
"slug": "category-3",
"description": "Description example for category 3",
"seopagetitle": "SEO page title",
"seometakeywords": "SEO META keywords",
"seopagedescription": "SEO META description",
"author": "",
"createdon": "2016-09-14 20:27:36"
}
]
UPDATE
URL
POST https://your-secured-store-url:443/api/v1/products/categories/update
Data properties
Mandatory
Property |
Type |
id |
GUID |
name |
String (max 255 chars) |
slug |
String (max 255 chars) |
description |
String (max 255 chars) |
seopagetitle |
String (max 255 chars) |
seopagedescription |
String (max 255 chars) |
seometakeywords |
String (max 255 chars) |
Request
Most complete request
{
'authentication' : {
'apiKey' : 'jjns7519v1v3ns6xU162'
},
'data' : [
{
'id' : '7865559d-5864-4926-8414-8bf55ad35741',
'name' : 'Category 3',
'slug' : 'category-3',
'description' : 'Description example for category 3',
'seopagetitle' : 'SEO page title',
'seopagedescription' : 'SEO META description',
'seometakeywords' : 'SEO META keywords'
}]
}
Response
If no error occured, you will receive a response like this one. Please refer to error messages to learn more about the possible error responses.
[
{
"id": "7865559d-5864-4926-8414-8bf55ad35741",
"name": "Category 3",
"slug": "category-3",
"description": "Description example for category 3",
"seopagetitle": "SEO page title",
"seometakeywords": "SEO META keywords",
"seopagedescription": "SEO META description",
"author": "Mr Example",
"createdon": "2016-09-14 20:27:36"
}
]
DELETE
URL
POST https://your-secured-store-url:443/api/v1/products/categories/delete
Filters
Request
Normal request
{
'authentication' : {
'apiKey' : 'jjns7519v1v3ns6xU162'
},
'filter' : [{
'id': ['7865559d-5864-4926-8414-8bf55ad35741']
}]
}
Response
If no error occured, you will receive a response like this one. Please refer to error messages to learn more about the possible error responses.