Brands API
Brands¶
Brands represents the UI of chat windows, lead forms, chat buttons, etc. which are shown to visitor (both mobile and desktop). There are some restricted customization options for them. In order to use some specific brand in a room, it can be set by changing the brand
attribute in organization room settings API.
Warning
Currently Brands are affecting only mobile chat windows!
A brand has the following attributes:
Attribute | Type | Editable | Description |
---|---|---|---|
id |
UUID | read-only | Unique identifier for the brand. |
organization_id |
UUID | read-only | ID of the organization which owns the brand. |
organization |
object | read-only | Organization which owns the brand. |
created_at |
datetime | read-only | When the brand was created. |
updated_at |
datetime | read-only | When was the last time the brand was updated. |
created_by_user_id |
UUID | read-only | ID of the user which created this brand. |
created_by_user |
object | read-only | User which created this brand. |
updated_by_user_id |
UUID | read-only | ID of the last user which updated this brand. |
updated_by_user |
object | read-only | Last user which updated this brand. |
name |
string | required | Name of this brand. |
primary_color_code |
string | required | Primary color code in hexadecimal format. If null then the default color is used. |
secondary_color_code |
string | required | Secondary color code in hexadecimal format. If null then the default color is used. |
logo_asset_id |
UUID | optional | ID of the logo (asset) used in this brand. The asset's kind must be a image . |
logo_asset |
object | read-only | logo (asset) used in this brand. Supported formats are PNG , JPEG , and GIF . Logo will resized to fit the position. |
List organization's brands¶
1 |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
|
You can list brands for an organization:
GET /api/v5/orgs/<organization_id>/brands
This API endpoint returns a paginated collection. They are sorted by the creation time of the brands, in ascending order.
This endpoint takes the following GET-parameters:
Parameter | Type | Default | Description |
---|---|---|---|
ordering |
ordering | created_at |
Ordering of results with options created_at or -created_at . |
This endpoint returns:
- 200 if the request was successful
- 401 if you are not authenticated
- 403 if you do not have active subscription
- 403 if you do not have access to the organization
- 403 if you do not have
settings
permission
Creating a new brand¶
Example request for creating a new brand
1 |
|
Example request payload
1 2 3 4 5 6 |
|
You can create a new brand for an organization by:
POST /api/v5/orgs/<organization_id>/brands
This endpoint returns:
- 201 if the request was successful
- 400 if required attributes are missing from the request
- 400 if the request payload is in wrong format
- 401 if you are not authenticated
- 403 if you do not have active subscription
- 403 if you do not have access to the organization
- 403 if you do not have
settings
permission
Retrieve details of organization's brand¶
You can retrieve details of organization's brand:
GET /api/v5/orgs/<organization_id>/brands/<brand_id>
This endpoint returns:
- 200 if the request was successful
- 401 if you are not authenticated
- 403 if you do not have active subscription
- 403 if you do not have access to the organization
- 403 if you do not have
settings
permission - 404 if the brand was not found
Update existing brand¶
Example request for updating primary color of existing brand
1 |
|
Example request payload
1 2 3 4 5 |
|
You can change the brand's attributes by:
PUT /api/v5/orgs/<organization_id>/brands/<brand_id>
or
PATCH /api/v5/orgs/<organization_id>/brands/<brand_id>
This endpoint returns:
- 200 if the request was successful
- 400 if required attributes are missing from the request
- 400 if the request payload is in wrong format
- 401 if you are not authenticated
- 403 if you do not have active subscription
- 403 if you do not have access to the organization
- 403 if you do not have
settings
permission - 404 if the brand was not found
Delete a brand¶
Example request for removing a brand
1 |
|
You can remove a brand by:
DELETE /api/v5/orgs/<organization_id>/brands/<brand_id>
This endpoint returns:
- 204 if the request was successful
- 401 if you are not authenticated
- 403 if you do not have active subscription
- 403 if you do not have access to the organization
- 403 if you do not have
settings
permission - 404 if the brand was not found
List rooms where a brand is in use¶
Example request and payload: Retrieve rooms which use current brand
1 |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
|
Return a paginated collection of all the room resources in which the given brand is in use for the given organization.
GET https://service.giosg.com/api/v5/orgs/<organization_id>/brands/<brand_id>/rooms
This endpoint returns:
- 200 if the request was successful
- 401 if you are not authenticated
- 403 if you do not have active subscription
- 403 if you do not have access to the organization
- 403 if you do not have
settings
permission - 404 if the brand was not found