ProductTag
By using this api, you can manage tags of your products.
Models
ProductTag
type ProductTag {
id: ID!
name: String!
translations: [ProductTagTranslation!]
}
Fields
The name of the product's tag.
translations
[ProductTagTranslation!]The name of the product's tag.
ProductTagTranslation
type ProductTagTranslation {
description: String
locale: String!
name: String
}
Fields
description
StringIt is the description information of the translation.
It is the name information of the translation.
name
StringIt is the information in which language the translation is saved.
Queries
List Product Tags
Using this api, you can view the tags of products.
listProductTag(
id: StringFilterInput
name: StringFilterInput
updatedAt: DateFilterInput
): [ProductTag!]!
Arguments
You can filter by product tag name.
updatedAt
DateFilterInputReturn Type
ProductTag
ProductTagMutations
Save Product Tag
Using this api, you can update the tags of products.
saveProductTag(
input: ProductTagInput!
): ProductTag!
Arguments
Return Type
ProductTag
ProductTagDelete Product Tag List
Using this api, you can delete the tags of products.
deleteProductTagList(
idList: [String!]!
): Boolean!
Arguments
Return Type
Boolean
BooleanThe Boolean
scalar type represents true
or false
.
Examples
Retrieves a list of tags
- BASH
- NODE.JS
curl --location --request POST 'https://api.myikas.com/api/v1/admin/graphql' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <your_access_token>' \
--data-raw '{"query":"{ listProductTag { id name } }"}'
const axios = require('axios');
const data = {"query":`{
listProductTag {
id
name
}
}
`};
const config = {
method: 'POST',
url: 'https://api.myikas.com/api/v1/admin/graphql',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer your_token'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
if (error.response) {
console.log(JSON.stringify(error.response.data));
}
});
Response
{
"data": {
"listProductTag": [
{
"id": "a8befae6-2cb9-487a-bd7f-5e0bfff3676b",
"name": "Tag name"
}
]
}
}