Documentation / API / Operations on Blog Posts

GET, COUNT, CREATE, UPDATE and DELETE operations available on blog posts.

Blog Posts Operations

GET

URL

POST https://your-secured-store-url:443/api/v1/blog/posts/get

Filters

Filter Type
id Array of GUID
title Array of String (max 255 chars)
slug Array of String (max 255 chars)
visible Boolean
visibledate_min DateTime
visibledate_max DateTime
visibledateend_min DateTime
visibledateend_max DateTime
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'],
            'title': ['Title A', 'Title B'],
            'slug': ['slug-a', 'slug-b'],
            'visible': 'true',
            'visibledate_min': '2016-01-01 01:00:00',
            'visibledate_max': '2020-12-31 23:59:59',
            'visibledateend_min': '2016-01-01 01:00:00',
            'visibledateend_max': '2020-12-31 23:59:59',
            'createdon_min': '2016-01-01 01:00:00',
            'createdon_max': '2020-12-31 23:59:59'
        },
        'pagination' : {
            'pageNumber' : '1',
            'pageSize' : '1000'
        }
    }

Response

If no error occured, you will receive a response like this one (object type: Blog Post). Please refer to error messages to learn more about the possible error responses.

[
   {
      "id": "00000000-0000-0000-0000-000000000000",
      "title": "Title A",
      "slug": "slug-a",
      "content": "Example A",
      "visible": "true",
      "visibledate": "2016-01-07 00:00:00",
      "visibledateend": "2017-01-01 00:00:00",
      "seopagetitle": "SEO page title",
      "seopagedescription": "SEO META description",
      "seometakeywords": "SEO META keywords",
      "tags": [
         {
            "tag": "tag1"
         },
         {
            "tag": "tag2"
         }
      ],
      "versions": [
         {
            "id": "92660d48-8844-485f-81be-1c7c178e768a",
            "content": "example",
            "version": "1",
            "createdon": "2016-01-07 14:08:30"
         }
      ],
      "comments": [],
      "author": "Mr Example",
      "createdon": "2016-01-07 14:08:30"
   },
   {
      "id": "12345678-1234-1234-1234-123456781234",
      "title": "Title B",
      "slug": "slug-b",
      "content": "Example B",
      "visible": "true",
      "visibledate": "2016-05-17 20:30:10",
      "visibledateend": "2017-01-01 00:00:00",
      "seopagetitle": "",
      "seopagedescription": "",
      "seometakeywords": "",
      "tags": [],
      "versions": [],
      "comments": [],
      "author": "Mr Example",
      "createdon": "2016-05-17 20:30:10"
   }
]

COUNT

URL

POST https://your-secured-store-url:443/api/v1/blog/posts/count

Filters

Filter Type
id Array of GUID
title Array of String (max 255 chars)
slug Array of String (max 255 chars)
visible Boolean
visibledate_min DateTime
visibledate_max DateTime
visibledateend_min DateTime
visibledateend_max DateTime
createdon_min DateTime
createdon_max DateTime

Request

Count the items

{
        'authentication' : {
            'apiKey' : 'jjns7519v1v3ns6xU162'
        }
    }

Count specific items by visibility

{
        'authentication' : {
            'apiKey' : 'jjns7519v1v3ns6xU162'
        },
        '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'],
            'title': ['Title A', 'Title B'],
            'slug': ['slug-a', 'slug-b'],
            'visible': 'false',
            'visibledate_min': '2016-01-01 01:00:00',
            'visibledate_max': '2020-12-31 23:59:59',
            'visibledateend_min': '2016-01-01 01:00:00',
            'visibledateend_max': '2020-12-31 23:59:59',
            'createdon_min': '2016-01-01 01:00:00',
            'createdon_max': '2020-12-31 23:59:59'
        }
    }

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/blog/posts/create

Data properties

Mandatory
Property Type
title String (max 255 chars)
slug String (max 255 chars)
content String (max 255 chars)
visible Boolean
visibledate DateTime
visibledateend DateTime
seopagetitle String (max 255 chars)
seopagedescription String (max 255 chars)
seometakeywords String (max 255 chars)
tags Array of String (max 255 chars)

Request

Most complete request

{
    'authentication' : {
        'apiKey' : 'jjns7519v1v3ns6xU162'
    },
	'data' : [
		{
			'title' : 'Title C',
			'slug' : 'slug-c',
			'content' : 'Example C',
			'visible' : 'true',
			'visibledate' : '2001-01-01',
			'visibledateend' : '2100-12-31',
			'seopagetitle' : 'SEO page title',
			'seopagedescription' : 'SEO META description',
			'seometakeywords' : 'SEO META keywords',
			'tags' : ["tag-api-1","tag-api-2"]
		}
	]
}

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": "24d4cbe9-aaae-4e3c-bef4-4391a1d94427",
      "title": "Title C",
      "slug": "slug-c",
      "content": "Example C",
      "visible": "1",
      "visibledate": "2001-01-01 00:00:00",
      "visibledateend": "2100-12-31 00:00:00",
      "seopagetitle": "SEO page title",
      "seopagedescription": "SEO META description",
      "seometakeywords": "SEO META keywords",
      "tags": [
         {
            "tag": "tag-api-1"
         },
         {
            "tag": "tag-api-2"
         }
      ],
      "versions": [
         {
            "id": "5b31614e-89a5-4072-83d2-1a5b2ace2b91",
            "content": "Example C",
            "version": "1",
            "createdon": "2016-09-11 14:53:06"
         }
      ],
      "comments": [],
      "author": "",
      "createdon": "2016-09-11 14:53:06"
   }
]

UPDATE

URL

POST https://your-secured-store-url:443/api/v1/blog/posts/update

Data properties

Mandatory
Property Type
id GUID
title String (max 255 chars)
slug String (max 255 chars)
content String (max 255 chars)
visible Boolean
visibledate DateTime
visibledateend DateTime
seopagetitle String (max 255 chars)
seopagedescription String (max 255 chars)
seometakeywords String (max 255 chars)
tags Array of String (max 255 chars)

Request

Most complete request

{
    'authentication' : {
        'apiKey' : 'jjns7519v1v3ns6xU162'
    },
	'data' : [
		{
			'id' : '24d4cbe9-aaae-4e3c-bef4-4391a1d94427',
			'title' : 'Title C',
			'slug' : 'slug-c',
			'content' : 'Example C',
			'visible' : 'true',
			'visibledate' : '2001-01-01',
			'visibledateend' : '2100-12-31',
			'seopagetitle' : 'SEO page title',
			'seopagedescription' : 'SEO META description',
			'seometakeywords' : 'SEO META keywords',
			'tags' : ["tag-api-1","tag-api-2"]
		}
	]
}

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": "24d4cbe9-aaae-4e3c-bef4-4391a1d94427",
      "title": "Title C",
      "slug": "slug-c",
      "content": "Example C",
      "visible": "1",
      "visibledate": "2001-01-01 00:00:00",
      "visibledateend": "2100-12-31 00:00:00",
      "seopagetitle": "SEO page title",
      "seopagedescription": "SEO META description",
      "seometakeywords": "SEO META keywords",
      "tags": [
         {
            "tag": "tag-api-1"
         },
         {
            "tag": "tag-api-2"
         }
      ],
      "versions": [
         {
            "id": "5b31614e-89a5-4072-83d2-1a5b2ace2b91",
            "content": "Example C",
            "version": "1",
            "createdon": "2016-09-11 14:53:06"
         },
         {
            "id": "b8fd8014-bf6e-4c2a-a670-c3a082699d44",
            "content": "Example C",
            "version": "2",
            "createdon": "2016-09-11 14:56:01"
         }
      ],
      "comments": [],
      "author": "",
      "createdon": "2016-09-11 14:53:06"
   }
]

DELETE

URL

POST https://your-secured-store-url:443/api/v1/blog/posts/delete

Filters

Filter Type
id GUID

Request

Normal request

{
    'authentication' : {
        'apiKey' : 'jjns7519v1v3ns6xU162'
    },
    'filter' : [{
        'id': ['5b31614e-89a5-4072-83d2-1a5b2ace2b91']
    }]
}

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"
}