{"_id":"5ae8d788d4b107000388e26a","project":"569f9cf6650e1d1900f96b5b","version":{"_id":"569f9cf6650e1d1900f96b5e","project":"569f9cf6650e1d1900f96b5b","__v":12,"createdAt":"2016-01-20T14:43:02.785Z","releaseDate":"2016-01-20T14:43:02.785Z","categories":["569f9cf7650e1d1900f96b5f","56abdd81d4432d1900eed235","56abe0558beeff0d003b8118","56ad2f8b1c09150d00a183a8","56ad4e1cd21f1b0d00fd2f97","56b00ad88f7a4f0d0029dc92","56b2432e9621f20d00efb2bd","56b25826147e900d00d6497a","56b7af2a4b372d2100722c48","56b8c4d938b1070d0028920f","56b8cdab14feef0d0082415d","58599813cf9e112d0032cdab"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"category":{"_id":"56b7af2a4b372d2100722c48","pages":["56b8c1a18a9e7c0d004bb180","56b8c1c59fc0de1700b60a37","56b8c921ddeb231700e69842"],"version":"569f9cf6650e1d1900f96b5e","__v":3,"project":"569f9cf6650e1d1900f96b5b","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-02-07T20:55:06.303Z","from_sync":false,"order":8,"slug":"brand-methods","title":"Brand Methods"},"user":"5ae8c2a466355e0003269bc6","githubsync":"","__v":0,"parentDoc":null,"metadata":{"title":"","description":"","image":[]},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-05-01T21:09:28.179Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"settings":"","results":{"codes":[]},"examples":{"codes":[]},"auth":"required","params":[],"url":""},"isReference":false,"order":5,"body":"## Syntax \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n    <credentials object>, \\n    \\\"criteria\\\": {\\n      \\\"company\\\": <company>, \\n      \\\"brand\\\": <brand name>, \\n      \\\"type\\\": [\\\"domain\\\",\\\"user\\\"]\\n    } \\n    range:{\\n      \\\"first\\\": <number>,\\n      \\\"Limit\\\": <number> \\n}\",\n      \"language\": \"perl\",\n      \"name\": \"  \"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Request fields for search_brands\"\n}\n[/block]\nThe following fields can be used in the **search_brands** method:\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Field name\",\n    \"h-1\": \"Obligation\",\n    \"h-2\": \"Definition/Value\",\n    \"0-0\": \"criteria\",\n    \"0-1\": \"Required\",\n    \"0-2\": \"Narrows the search for brands. \\n\\nAllowed values are:\\n\\n  * **company**—The company in which the brand resides. If not specified, the requester's company is used.\\n\\n  * **brand**— The brand name you are searching for members within\\n\\n  * **type**—An array, with two possible values. Include \\\"domain\\\" to have domains included in results, include \\\"user\\\" to have users included in results.\",\n    \"1-0\": \"range\",\n    \"1-1\": \"Optional\",\n    \"1-2\": \"Restricts the number of results that are returned. Allowed values are:\\n\\n  * **first**—The 0-based index of the first result to return.\\n\\n  * **limit**—The maximum number of results to return.\"\n  },\n  \"cols\": 3,\n  \"rows\": 2\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Response fields for search_brands\"\n}\n[/block]\nThe following fields may be returned in response to the **search_brands** method:\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Field name\",\n    \"h-1\": \"Obligation\",\n    \"h-2\": \"Description/Value\",\n    \"0-0\": \"brand_members\",\n    \"0-1\": \"Returned if **success = true**\",\n    \"0-2\": \"An array of objects that detail which domains and/or users are assigned to the brand.\\n\\nEach 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.\",\n    \"1-0\": \"count\",\n    \"1-1\": \"Returned if **success = true**\",\n    \"1-2\": \"The number of members returned in the response.\",\n    \"2-0\": \"error\",\n    \"2-1\": \"Returned if **success = false**\",\n    \"2-2\": \"A text string that explains the error.\",\n    \"3-0\": \"error_number\",\n    \"3-1\": \"Returned if **success = false**\",\n    \"3-2\": \"A number that represents the error.\",\n    \"4-0\": \"success\",\n    \"4-1\": \"Always returned\",\n    \"4-2\": \"Indicates whether the request was successful or not. Allowed values are **true** and **false**.\",\n    \"5-0\": \"total_count\",\n    \"5-1\": \"Returned if **success = true**\",\n    \"5-2\": \"The total number of brands that meet the criteria specified in the request.\\n\\n**Note**: If **range** is specified in the request, this value may be larger than the value of **count**.\"\n  },\n  \"cols\": 3,\n  \"rows\": 6\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Examples for search_brand_members\"\n}\n[/block]\n## Example 1\n\nRetrieves the domains and users assigned to the brand named \"April10\"\n**Request** \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"credentials\\\": {\\n    \\\"user\\\": \\\"company_admin:::at:::example.com\\\",\\n    \\\"password\\\": \\\"sw0rdf1sh\\\"\\n  },\\n\\t\\\"criteria\\\": {\\n\\t\\t\\\"brand\\\": \\\"april10\\\",\\n\\t\\t\\\"type\\\": [\\n\\t\\t\\t\\\"domain\\\",\\n\\t\\t\\t\\\"user\\\"\\n\\t\\t]\\n\\t}\\n}\",\n      \"language\": \"perl\",\n      \"name\": \"  \"\n    }\n  ]\n}\n[/block]\n**Response** \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\t\\\"success\\\": true,\\n\\t\\\"brand_members\\\": [\\n\\t\\t{\\n\\t\\t\\t\\\"member\\\": \\\"aprildomain.com\\\",\\n\\t\\t\\t\\\"type\\\": \\\"domain\\\"\\n\\t\\t},\\n\\t\\t{\\n\\t\\t\\t\\\"member\\\": \\\"april@monthly.com\\\",\\n\\t\\t\\t\\\"type\\\": \\\"user\\\"\\n\\t\\t}\\n\\t],\\n\\t\\\"count\\\": 2,\\n\\t\\\"total_count\\\": 2,\\n\\t\\\"audit\\\": \\\"shop15_5ae8d1bb16\\\"\\n}\",\n      \"language\": \"perl\",\n      \"name\": \"  \"\n    }\n  ]\n}\n[/block]","excerpt":"The **search_brand_members** method retrieves a list of domains or users that have the requested brand applied to them.","slug":"search_brand_members","type":"basic","title":"search_brand_members"}

search_brand_members

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

## Syntax [block:code] { "codes": [ { "code": "{\n <credentials object>, \n \"criteria\": {\n \"company\": <company>, \n \"brand\": <brand name>, \n \"type\": [\"domain\",\"user\"]\n } \n range:{\n \"first\": <number>,\n \"Limit\": <number> \n}", "language": "perl", "name": " " } ] } [/block] [block:api-header] { "type": "basic", "title": "Request fields for search_brands" } [/block] The following fields can be used in the **search_brands** method: [block:parameters] { "data": { "h-0": "Field name", "h-1": "Obligation", "h-2": "Definition/Value", "0-0": "criteria", "0-1": "Required", "0-2": "Narrows the search for brands. \n\nAllowed values are:\n\n * **company**—The company in which the brand resides. If not specified, the requester's company is used.\n\n * **brand**— The brand name you are searching for members within\n\n * **type**—An array, with two possible values. Include \"domain\" to have domains included in results, include \"user\" to have users included in results.", "1-0": "range", "1-1": "Optional", "1-2": "Restricts the number of results that are returned. Allowed values are:\n\n * **first**—The 0-based index of the first result to return.\n\n * **limit**—The maximum number of results to return." }, "cols": 3, "rows": 2 } [/block] [block:api-header] { "type": "basic", "title": "Response fields for search_brands" } [/block] The following fields may be returned in response to the **search_brands** method: [block:parameters] { "data": { "h-0": "Field name", "h-1": "Obligation", "h-2": "Description/Value", "0-0": "brand_members", "0-1": "Returned if **success = true**", "0-2": "An array of objects that detail which domains and/or users are assigned to the brand.\n\nEach 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.", "1-0": "count", "1-1": "Returned if **success = true**", "1-2": "The number of members returned in the response.", "2-0": "error", "2-1": "Returned if **success = false**", "2-2": "A text string that explains the error.", "3-0": "error_number", "3-1": "Returned if **success = false**", "3-2": "A number that represents the error.", "4-0": "success", "4-1": "Always returned", "4-2": "Indicates whether the request was successful or not. Allowed values are **true** and **false**.", "5-0": "total_count", "5-1": "Returned if **success = true**", "5-2": "The total number of brands that meet the criteria specified in the request.\n\n**Note**: If **range** is specified in the request, this value may be larger than the value of **count**." }, "cols": 3, "rows": 6 } [/block] [block:api-header] { "type": "basic", "title": "Examples for search_brand_members" } [/block] ## Example 1 Retrieves the domains and users assigned to the brand named "April10" **Request** [block:code] { "codes": [ { "code": "{\n \"credentials\": {\n \"user\": \"company_admin@example.com\",\n \"password\": \"sw0rdf1sh\"\n },\n\t\"criteria\": {\n\t\t\"brand\": \"april10\",\n\t\t\"type\": [\n\t\t\t\"domain\",\n\t\t\t\"user\"\n\t\t]\n\t}\n}", "language": "perl", "name": " " } ] } [/block] **Response** [block:code] { "codes": [ { "code": "{\n\t\"success\": true,\n\t\"brand_members\": [\n\t\t{\n\t\t\t\"member\": \"aprildomain.com\",\n\t\t\t\"type\": \"domain\"\n\t\t},\n\t\t{\n\t\t\t\"member\": \"april@monthly.com\",\n\t\t\t\"type\": \"user\"\n\t\t}\n\t],\n\t\"count\": 2,\n\t\"total_count\": 2,\n\t\"audit\": \"shop15_5ae8d1bb16\"\n}", "language": "perl", "name": " " } ] } [/block]