ProductBrand
By using this api, you can manage brands of your products.
Models
ProductBrand
type ProductBrand {
id: ID!
description: String
imageId: String
metaData: HTMLMetaData
name: String!
orderType: CategoryProductsOrderTypeEnum
salesChannelIds: [String!]
translations: [ProductBrandTranslation!]
}
Fields
description
StringThe description of the product's brand.
imageId
StringThe image information of the product's brand.
metaData
HTMLMetaDataIt is the metadata information of the product brand.
The name of the product's brand.
orderType
CategoryProductsOrderTypeEnumsalesChannelIds
[String!]It is the information of which sales channel the product brand is in.
translations
[ProductBrandTranslation!]It is the translation information of the product brand.
ProductBrandTranslation
type ProductBrandTranslation {
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 Brands
Using this api, you can view the brands of products.
Search applies to following fields: name
listProductBrand(
id: StringFilterInput
name: StringFilterInput
search: String
updatedAt: DateFilterInput
): [ProductBrand!]!
Arguments
You can filter by product brand name.
search
StringSome listing APIs have searchable fields. You can search in these fields as you wish. For example, in an API; Let the searchableFields :['name', 'description']
. If we send search: AAA
as input in args, it will return records with 'AAA' in both the name and description fields.
updatedAt
DateFilterInputReturn Type
ProductBrand
ProductBrandMutations
Save Product Brand
Using this api, you can update the brands of products.
saveProductBrand(
input: ProductBrandInput!
): ProductBrand!
Arguments
Return Type
ProductBrand
ProductBrandDelete Product Brand List
Using this api, you can delete the brands of products.
deleteProductBrandList(
idList: [String!]!
): Boolean!
Arguments
Return Type
Boolean
BooleanThe Boolean
scalar type represents true
or false
.
Examples
Retrieves a list of brands
- 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":"{ listProductBrand { id name createdAt } }"}'
const axios = require('axios');
const data = {"query":`{
listProductBrand {
id
name
createdAt
}
}
`};
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": {
"listProductBrand": [
{
"id": "a8befae6-2cb9-487a-bd7f-5e0bfff3676b",
"name": "Brand name",
"createdAt": 1634019877744
}
]
}
}