Tags
This is used to view, create, update and delete tags.
Tag Properties
id |
{ "id" : 255 }
The unique ID of the tag |
title |
{ "title" : "XYZ" }
The title/name of the tag |
description |
{ "description" : "This tag does XYZ"}
The description for the tag |
url |
{ "url" : "http://www.shopname.com/acme" }
The full URL for the tag |
active |
{ "active" : true }
Either true or false |
metaTitle |
{ "metaTitle" : "XYZ Page" }
The title tag for the tag page |
metaDescription |
{ "metaDescription" : "This is a page for XYZ." }
The meta description for the tag page |
metaKeywords |
{ "metaKeywords" : "x, y, z" }
The meta keywords for the tag page |
image |
{ "image" : "https://static.ecommercedns.uk/images/456e0.jpg" }
The image object (present only when the Brand has an image), the image object has a single property url |
What you can do with tags
GET /v1/tags
Receive a list of all tags
GET /v1/tags/count
Count the number of tags
GET /v1/tags/ID
Receive a single tag
POST /v1/tags
Create a new tag
PUT /v1/tags/ID
Update a tag
DELETE /v1/tags/ID
Delete a tag
GET /v1/tags
Returns all tags. By default the first 50 tags (both active and inactive) are returned, sorted by creation date.
fields | Comma separated list of properties to include |
sort | title or title_desc (default is creation date) |
active | 0 or 1 |
count | Count |
offset | Offset |
GET /v1/tags
HTTP/1.1 200 OK [ { "id": 1, "title": "...", "description": "...", "url": "http://www.shopname.com/slug", "active": true, "metaTitle": "...", "metaKeywords": "...", "metaDescription": "...", "image": { "url": "https://static.ecommercedns.uk/images/456e70cea611e36883b4dd3e02bb3a70.jpg?1" } } ]
GET /v1/tags/count
Returns a count of the tags.
active | 0 or 1 |
GET /v1/tags/count
HTTP/1.1 200 OK { "count": 99 }
GET /v1/tags/ID
Returns a single tag.
fields | Comma separated list of properties to include |
GET /v1/tags/1
HTTP/1.1 200 OK { "id": 1, "title": "...", "description": "...", "url": "http://www.domain.com/slug", "active": true, "metaTitle": "...", "metaKeywords": "...", "metaDescription": "...", "image": { "url": "https://static.ecommercedns.uk/images/456e70cea611e36883b4dd3e02bb3a70.jpg?1" } }
POST /v1/tags
Creates a new tag.
title | required |
description | optional |
active | default is true |
metaTitle | optional |
metaDescription | optional |
metaKeywords | optional |
slug | optional, do not include the domain name |
image | URL or base64 encoded image |
POST /v1/tags
POST /v1/tags { "title": "Tag Title" "slug": "tag-title", "image": "http://www.domain.com/images/test.jpg" }
POST /v1/tags
HTTP/1.1 201 Created { "id": 3, "title": "Tag Title", "description": "", "url": "http://www.shopname.com/tag-title", "active": true, "metaTitle": "", "metaKeywords": "", "metaDescription": "", "image": { "url": "https://static.ecommercedns.uk/images/456e70cea611e36883b4dd3e02bb3a70.jpg?1" } }
PUT /v1/tags/ID
Update a tag. All object properties are allowed.
PUT /v1/tags/3
PUT /v1/tags/3 { "active": false, "slug": "tag" }
PUT /v1/tags/3
HTTP/1.1 200 OK { "id": 3, "title": "Tag Title", "description": "", "url": "http://www.shopname.com/tag", "active": false, "metaTitle": "", "metaKeywords": "", "metaDescription": "", "image": { "url": "https://static.ecommercedns.uk/images/456e70cea611e36883b4dd3e02bb3a70.jpg?1" } }
DELETE /v1/tags/ID
Deletes an existing tag.
Returns 204 No Content on success.