GET, COUNT, CREATE, UPDATE and DELETE operations available on collections.
Collections Operations
GET
URL
POST https://your-secured-store-url:443/api/v1/products/collections/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' : ['Collection 1','Collection 2'],
'slug' : ['collection-1','collection-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: Collection). Please refer to error messages to learn more about the possible error responses.
[
{
"id": "00000000-0000-0000-0000-000000000000",
"name": "Collection 1",
"slug": "collection-1",
"description": "Description example for collection 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": "Collection 2",
"slug": "collection-2",
"description": "Description example for collection 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/collections/count
Filters
Request
Count the items
{
'authentication' : {
'apiKey' : 'jjns7519v1v3ns6xU162'
}
}
Count specific items by creation date
{
'authentication' : {
'apiKey' : 'jjns7519v1v3ns6xU162'
},
'filters' : {
'createdon_min' : '2015-01-01',
'createdon_max' : '2042-01-01'
}
}
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' : ['Collection 1','Collection 2'],
'slug' : ['collection-1','collection-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/collections/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' : 'Collection 3',
'slug' : 'collection-3',
'description' : 'Description example for collection 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": "07bbae61-5623-4118-97be-368378b0abb0",
"name": "Collection 3",
"slug": "collection-3",
"description": "Description example for collection 3",
"seopagetitle": "SEO page title",
"seometakeywords": "SEO META keywords",
"seopagedescription": "SEO META description",
"author": "",
"createdon": "2016-09-14 20:26:13"
}
]
UPDATE
URL
POST https://your-secured-store-url:443/api/v1/products/collections/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' : '07bbae61-5623-4118-97be-368378b0abb0',
'name' : 'Collection 3',
'slug' : 'collection-3',
'description' : 'Description example for collection 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": "07bbae61-5623-4118-97be-368378b0abb0",
"name": "Collection 3",
"slug": "collection-3",
"description": "Description example for collection 3",
"seopagetitle": "SEO page title",
"seometakeywords": "SEO META keywords",
"seopagedescription": "SEO META description",
"author": "",
"createdon": "2016-09-14 20:26:13"
}
]
DELETE
URL
POST https://your-secured-store-url:443/api/v1/products/collections/delete
Filters
Request
Normal request
{
'authentication' : {
'apiKey' : 'jjns7519v1v3ns6xU162'
},
'filter' : [{
'id': ['07bbae61-5623-4118-97be-368378b0abb0']
}]
}
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.