Tags (Admin)
Tags can be used to associate products to some words or categories. A tag can be used to filter products into the e-commerce.
Service Methods
Creates a new tag inside a company
Rest API reference:
post
Create a company tag
Authorizations
Path parameters
companyIdstringRequired
Body
namestringRequiredExample:
Tag 1
parentIdstring · uuidOptional
hidebooleanRequiredExample:
false
Responses
201Success
application/json
401
User doesn't have any of the expected roles: administrator, admin, superAdmin, integration
post
POST /admin/companies/{companyId}/tags HTTP/1.1
Host: commerce.w3block.io
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 45
{
"name": "Tag 1",
"parentId": null,
"hide": false
}
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"companyId": "123e4567-e89b-12d3-a456-426614174000",
"name": "text",
"products": [
{}
],
"parentId": "123e4567-e89b-12d3-a456-426614174000",
"parent": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"companyId": "123e4567-e89b-12d3-a456-426614174000",
"name": "text",
"products": [
{}
],
"parentId": "123e4567-e89b-12d3-a456-426614174000",
"hide": true
},
"hide": true,
"children": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"companyId": "123e4567-e89b-12d3-a456-426614174000",
"name": "text",
"products": [
{}
],
"parentId": "123e4567-e89b-12d3-a456-426614174000",
"hide": true
}
]
}
Lists all company tags
Rest API reference:
get
Get all company tags paginated
Authorizations
Path parameters
companyIdstringRequired
Query parameters
pagenumberOptionalDefault:
1
limitnumberOptionalDefault:
10
searchstringOptional
sortBystring · enumOptionalExample:
createdAt
Possible values: orderBystring · enumOptionalPossible values:
Responses
200Success
application/json
401
User doesn't have any of the expected roles: administrator, admin, superAdmin, integration
get
GET /admin/companies/{companyId}/tags HTTP/1.1
Host: commerce.w3block.io
Authorization: Bearer JWT
Accept: */*
{
"items": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"companyId": "123e4567-e89b-12d3-a456-426614174000",
"name": "text",
"products": [
{}
],
"parentId": "123e4567-e89b-12d3-a456-426614174000",
"parent": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"companyId": "123e4567-e89b-12d3-a456-426614174000",
"name": "text",
"products": [
{}
],
"parentId": "123e4567-e89b-12d3-a456-426614174000",
"hide": true
},
"hide": true,
"children": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"companyId": "123e4567-e89b-12d3-a456-426614174000",
"name": "text",
"products": [
{}
],
"parentId": "123e4567-e89b-12d3-a456-426614174000",
"hide": true
}
]
}
],
"meta": {
"itemCount": 1,
"totalItems": 1,
"itemsPerPage": 1,
"totalPages": 1,
"currentPage": 1
},
"links": {
"first": "http://example.com?page=1",
"prev": "http://example.com?page=1",
"next": "http://example.com?page=2",
"last": "http://example.com?page=3"
}
}
Gets some company tag by id
Rest API reference:
get
Get some company tag by id
Authorizations
Path parameters
idstringRequired
companyIdstringRequired
Responses
200Success
application/json
401
User doesn't have any of the expected roles: administrator, admin, superAdmin, integration
get
GET /admin/companies/{companyId}/tags/{id} HTTP/1.1
Host: commerce.w3block.io
Authorization: Bearer JWT
Accept: */*
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"companyId": "123e4567-e89b-12d3-a456-426614174000",
"name": "text",
"products": [
{}
],
"parentId": "123e4567-e89b-12d3-a456-426614174000",
"parent": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"companyId": "123e4567-e89b-12d3-a456-426614174000",
"name": "text",
"products": [
{}
],
"parentId": "123e4567-e89b-12d3-a456-426614174000",
"hide": true
},
"hide": true,
"children": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"companyId": "123e4567-e89b-12d3-a456-426614174000",
"name": "text",
"products": [
{}
],
"parentId": "123e4567-e89b-12d3-a456-426614174000",
"hide": true
}
]
}
Updates some company tag
Rest API reference:
patch
Updates some company tag
Authorizations
Path parameters
idstringRequired
companyIdstringRequired
Body
namestringRequiredExample:
Tag 1
parentIdstring · uuidOptional
hidebooleanRequiredExample:
false
Responses
200Success
application/json
401
User doesn't have any of the expected roles: administrator, admin, superAdmin, integration
patch
PATCH /admin/companies/{companyId}/tags/{id} HTTP/1.1
Host: commerce.w3block.io
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 45
{
"name": "Tag 1",
"parentId": null,
"hide": false
}
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"companyId": "123e4567-e89b-12d3-a456-426614174000",
"name": "text",
"products": [
{}
],
"parentId": "123e4567-e89b-12d3-a456-426614174000",
"parent": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"companyId": "123e4567-e89b-12d3-a456-426614174000",
"name": "text",
"products": [
{}
],
"parentId": "123e4567-e89b-12d3-a456-426614174000",
"hide": true
},
"hide": true,
"children": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"companyId": "123e4567-e89b-12d3-a456-426614174000",
"name": "text",
"products": [
{}
],
"parentId": "123e4567-e89b-12d3-a456-426614174000",
"hide": true
}
]
}
Last updated