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 name

Obligation

Definition/Value

criteria

Required

Narrows 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.

range

Optional

Restricts 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 name

Obligation

Description/Value

brand_members

Returned if success = true

An 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.

count

Returned if success = true

The number of members 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.

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"
}