List brands
const url = 'https://api.optizmo.com/deploy/v1/brands?page=1&pageSize=200&sort=name';const options = {method: 'GET', headers: {Authorization: '<Authorization>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.optizmo.com/deploy/v1/brands?page=1&pageSize=200&sort=name' \ --header 'Authorization: <Authorization>'Lists the brands in your account, one page at a time, sorted by name.
Disabled brands are included with enabled: false.
The list can be filtered by name. See the name parameter for the
available filter operators. Filter values are matched literally; there
is no support for regex or other search syntax.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters ”1-based page number.
Number of brands per page.
Sort by name, ascending (name) or descending (-name).
Return only enabled (true) or only disabled (false) brands. Both are returned when omitted.
Brand name to match. By default this behaves the same as name[equal].
Optional filter operators can be provided in bracket notation to refine the search (at most one name filter per request):
name[equal]: name matches exactlyname[not_equal]: name does not match exactlyname[starts_with]: name starts with the valuename[ends_with]: name ends with the valuename[contains]: name contains the valuename[starts_with_case_sensitive]: case-sensitivestarts_withname[ends_with_case_sensitive]: case-sensitiveends_withname[contains_case_sensitive]: case-sensitivecontains
Responses
Section titled “ Responses ”One page of brands.
One page of the account’s brands.
object
object
The brand id accepted by the contact subscriptions endpoints and by POST /deploy/v1/contacts’ brandIds field.
object
The number of brands matching the request across all pages.
The total number of pages.
Example
{ "data": [ { "name": "Acme" } ]}A query parameter fails validation, an unknown name filter operator was provided, or more than one name filter was given.
Error envelope returned by every v1 endpoint for failures, following RFC 9457
Problem Details with code and errors extensions.
object
URI identifying the problem type; dereferences to its documentation.
HTTP status code applicable to this problem.
Short, human-readable summary of the problem type.
Detailed explanation specific to this occurrence.
Error code identifying the specific error condition.
URI reference identifying this specific occurrence (the request URI).
Provides additional information when the error relates to specific request fields.
object
Detailed explanation for this specific field error.
JSON Pointer (RFC 6901) to the request body value that caused the error (e.g. /email, /attributes/firstName).
The URI query parameter that caused the error (e.g. pageSize, name[invalid]).
Examples
A query parameter fails validation
{ "type": "https://docs.optizmo.com/deploy/error-codes#invalid_request_error", "status": 400, "title": "Invalid request", "detail": "pageSize must not be greater than 200", "code": "invalid_request_error", "instance": "/deploy/v1/brands?pageSize=201", "errors": [ { "detail": "pageSize must not be greater than 200" } ]}Unrecognised name filter operator
{ "type": "https://docs.optizmo.com/deploy/error-codes#invalid_request_error", "status": 400, "title": "Invalid request", "detail": "Unknown name filter operator in \"name[invalid]\"", "code": "invalid_request_error", "instance": "/deploy/v1/brands?name[invalid]=acme", "errors": [ { "detail": "Unknown name filter operator in \"name[invalid]\"", "parameter": "name[invalid]" } ]}More than one name filter provided
{ "type": "https://docs.optizmo.com/deploy/error-codes#invalid_request_error", "status": 400, "title": "Invalid request", "detail": "Provide at most one name filter", "code": "invalid_request_error", "instance": "/deploy/v1/brands?name=acme&name[contains]=ac", "errors": [ { "detail": "Provide at most one name filter", "parameter": "name" } ]}Missing or invalid API key.
Error envelope returned by every v1 endpoint for failures, following RFC 9457
Problem Details with code and errors extensions.
object
URI identifying the problem type; dereferences to its documentation.
HTTP status code applicable to this problem.
Short, human-readable summary of the problem type.
Detailed explanation specific to this occurrence.
Error code identifying the specific error condition.
URI reference identifying this specific occurrence (the request URI).
Provides additional information when the error relates to specific request fields.
object
Detailed explanation for this specific field error.
JSON Pointer (RFC 6901) to the request body value that caused the error (e.g. /email, /attributes/firstName).
The URI query parameter that caused the error (e.g. pageSize, name[invalid]).
Example
{ "type": "https://docs.optizmo.com/deploy/error-codes#authentication_error", "status": 401, "title": "Authentication failed", "detail": "credentials required", "code": "authentication_error", "instance": "/deploy/v1/contacts"}Permission denied.
Error envelope returned by every v1 endpoint for failures, following RFC 9457
Problem Details with code and errors extensions.
object
URI identifying the problem type; dereferences to its documentation.
HTTP status code applicable to this problem.
Short, human-readable summary of the problem type.
Detailed explanation specific to this occurrence.
Error code identifying the specific error condition.
URI reference identifying this specific occurrence (the request URI).
Provides additional information when the error relates to specific request fields.
object
Detailed explanation for this specific field error.
JSON Pointer (RFC 6901) to the request body value that caused the error (e.g. /email, /attributes/firstName).
The URI query parameter that caused the error (e.g. pageSize, name[invalid]).
Example
{ "type": "https://docs.optizmo.com/deploy/error-codes#permission_error", "status": 403, "title": "Permission denied", "detail": "api key required", "code": "permission_error", "instance": "/deploy/v1/contacts"}