Documentation / API / Operations on Collections

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

Filter Type
id Array of GUID
name Array of String (max 255 chars)
slug Array of String (max 255 chars)
createdon_min DateTime
createdon_max DateTime

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

Filter Type
id Array of GUID
name Array of String (max 255 chars)
slug Array of String (max 255 chars)
createdon_min DateTime
createdon_max DateTime

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.

{
   "count": "2"
}

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

Filter Type
id GUID

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.

{
   "success": "true"
}