search_brand_members

The search_brand_members method retrieves a list of domains or users that have the requested brand applied to them.

Syntax

{
    <credentials object>, 
    "criteria": {
      "company": <company>, 
      "brand": <brand name>, 
      "type": ["domain","user"]
    } 
    range:{
      "first": <number>,
      "Limit": <number> 
}

Request fields for search_brands

The following fields can be used in the search_brands method:

Field nameObligationDefinition/Value
criteriaRequiredNarrows the search for brands.

Allowed values are:

company—The company in which the brand resides. If not specified, the requester's company is used.

brand— The brand name you are searching for members within

* type—An array, with two possible values. Include "domain" to have domains included in results, include "user" to have users included in results.
rangeOptionalRestricts the number of results that are returned. Allowed values are:

first—The 0-based index of the first result to return.

limit—The maximum number of results to return.

Response fields for search_brands

The following fields may be returned in response to the search_brands method:

Field nameObligationDescription/Value
brand_membersReturned if success = trueAn array of objects that detail which domains and/or users are assigned to the brand.

Each object contains a "type" value that will be either "domain" or "user". Each object also contains a "member" value that will be the domain or user.
countReturned if success = trueThe number of members returned in the response.
errorReturned if success = falseA text string that explains the error.
error_numberReturned if success = falseA number that represents the error.
successAlways returnedIndicates whether the request was successful or not. Allowed values are true and false.
total_countReturned if success = trueThe total number of brands that meet the criteria specified in the request.

Note: If range is specified in the request, this value may be larger than the value of count.

Examples for search_brand_members

Example 1

Retrieves the domains and users assigned to the brand named "April10"
Request

{
  "credentials": {
    "user": "[email protected]",
    "password": "sw0rdf1sh"
  },
	"criteria": {
		"brand": "april10",
		"type": [
			"domain",
			"user"
		]
	}
}

Response

{
	"success": true,
	"brand_members": [
		{
			"member": "aprildomain.com",
			"type": "domain"
		},
		{
			"member": "[email protected]",
			"type": "user"
		}
	],
	"count": 2,
	"total_count": 2,
	"audit": "shop15_5ae8d1bb16"
}