search_brands
The search_brands method retrieves a list of brands in a company.
Syntax
{
<credentials object>,
"criteria": {
"company": <company>,
"match": <wildcard pattern>,
"deleted": true | false
}
range:{
"first": <number>,
"Limit": <number>
}
Request fields for search_brands
The following fields can be used in the search_brands method:
Field name | Obligation | Definition/Value |
---|---|---|
criteria | Optional | Narrows the search for brands. Allowed values are:
|
range | Optional | Restricts the number of results that are returned. Allowed values are:
|
Response fields for search_brands
The following fields may be returned in response to the search_brands method:
Field name | Obligation | Description/Value |
---|---|---|
brands | Returned if success = true | An array that contains an alphabetical list of the brands that meet the specified criteria and indicates the brands usage. Displays the following:
|
count | Returned if success = true | The number of brands returned in the response. |
error | Returned if success = false | A text string that explains the error. |
error_number | Returned if success = false | A number that represents the error. |
success | Always returned | Indicates whether the request was successful or not. Allowed values are true and false. |
total_count | Returned if success = true | The total number of brands that meet the criteria specified in the request.
|
Examples for search_brands
Example 1
Retrieves all brands in the requester's company.
Request
{
"credentials": {
"user": "[email protected]",
"password": "sw0rdf1sh"
}
}
Response
{
"success": true,
"brands": [
{
"brand": "Example Co Brand",
"counts": {
"domain": 0,
"user": 0,
"total": 0
}
},
{
"brand": "Example Co Test Brand",
"counts": {
"domain": 0,
"user": 0,
"total": 0
}
}
],
"count": 2,
"total_count": 2
}
Example 2
Retrieves all brands that contain "Test" in the brand name.
Request
{
"credentials": {
"user": "[email protected]",
"password": "sw0rdf1sh"
},
"criteria": {
"match": "*Test*"
}
}
Response
{
"success": true,
"brands": [
{
"brand": "Example Co Test Brand",
"counts": {
"domain": 0,
"user": 0,
"total": 0
}
}
],
"count": 1,
"total_count": 1
}
Updated 1 day ago