Set Brand Group Members
curl --request PUT \
--url https://app.backend.genezio.ai/customer/v1/brands/{brand_id}/brand-groups/{group_id}/members \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"members": [
{
"competitor_id": 123,
"rank": 1
}
]
}
'import requests
url = "https://app.backend.genezio.ai/customer/v1/brands/{brand_id}/brand-groups/{group_id}/members"
payload = { "members": [
{
"competitor_id": 123,
"rank": 1
}
] }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({members: [{competitor_id: 123, rank: 1}]})
};
fetch('https://app.backend.genezio.ai/customer/v1/brands/{brand_id}/brand-groups/{group_id}/members', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"brand_rank": 123,
"created_at": "2023-11-07T05:31:56Z",
"id": 123,
"include_brand": true,
"members": [
{
"competitor_id": 123,
"rank": 123,
"name": "<string>"
}
],
"name": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"description": "<string>"
}{
"error": {
"code": "brand_access_denied",
"message": "This API key has no access to this brand",
"details": [
{
"field": "page_size",
"message": "Input should be less than or equal to 100"
}
],
"request_id": "4f3c2e1a-9b7d-4c1e-8f2a-1d3e5b7c9a0f"
}
}{
"error": {
"code": "brand_access_denied",
"message": "This API key has no access to this brand",
"details": [
{
"field": "page_size",
"message": "Input should be less than or equal to 100"
}
],
"request_id": "4f3c2e1a-9b7d-4c1e-8f2a-1d3e5b7c9a0f"
}
}{
"error": {
"code": "brand_access_denied",
"message": "This API key has no access to this brand",
"details": [
{
"field": "page_size",
"message": "Input should be less than or equal to 100"
}
],
"request_id": "4f3c2e1a-9b7d-4c1e-8f2a-1d3e5b7c9a0f"
}
}{
"error": {
"code": "brand_access_denied",
"message": "This API key has no access to this brand",
"details": [
{
"field": "page_size",
"message": "Input should be less than or equal to 100"
}
],
"request_id": "4f3c2e1a-9b7d-4c1e-8f2a-1d3e5b7c9a0f"
}
}{
"error": {
"code": "brand_access_denied",
"message": "This API key has no access to this brand",
"details": [
{
"field": "page_size",
"message": "Input should be less than or equal to 100"
}
],
"request_id": "4f3c2e1a-9b7d-4c1e-8f2a-1d3e5b7c9a0f"
}
}{
"error": {
"code": "brand_access_denied",
"message": "This API key has no access to this brand",
"details": [
{
"field": "page_size",
"message": "Input should be less than or equal to 100"
}
],
"request_id": "4f3c2e1a-9b7d-4c1e-8f2a-1d3e5b7c9a0f"
}
}{
"error": {
"code": "brand_access_denied",
"message": "This API key has no access to this brand",
"details": [
{
"field": "page_size",
"message": "Input should be less than or equal to 100"
}
],
"request_id": "4f3c2e1a-9b7d-4c1e-8f2a-1d3e5b7c9a0f"
}
}Brand groups
Set the members of a brand group
Give the group its whole list of members, with their ranks.
A competitor that is not in the list leaves the group. Send the same list two times, and the second request changes nothing.
PUT
/
customer
/
v1
/
brands
/
{brand_id}
/
brand-groups
/
{group_id}
/
members
Set Brand Group Members
curl --request PUT \
--url https://app.backend.genezio.ai/customer/v1/brands/{brand_id}/brand-groups/{group_id}/members \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"members": [
{
"competitor_id": 123,
"rank": 1
}
]
}
'import requests
url = "https://app.backend.genezio.ai/customer/v1/brands/{brand_id}/brand-groups/{group_id}/members"
payload = { "members": [
{
"competitor_id": 123,
"rank": 1
}
] }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({members: [{competitor_id: 123, rank: 1}]})
};
fetch('https://app.backend.genezio.ai/customer/v1/brands/{brand_id}/brand-groups/{group_id}/members', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"brand_rank": 123,
"created_at": "2023-11-07T05:31:56Z",
"id": 123,
"include_brand": true,
"members": [
{
"competitor_id": 123,
"rank": 123,
"name": "<string>"
}
],
"name": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"description": "<string>"
}{
"error": {
"code": "brand_access_denied",
"message": "This API key has no access to this brand",
"details": [
{
"field": "page_size",
"message": "Input should be less than or equal to 100"
}
],
"request_id": "4f3c2e1a-9b7d-4c1e-8f2a-1d3e5b7c9a0f"
}
}{
"error": {
"code": "brand_access_denied",
"message": "This API key has no access to this brand",
"details": [
{
"field": "page_size",
"message": "Input should be less than or equal to 100"
}
],
"request_id": "4f3c2e1a-9b7d-4c1e-8f2a-1d3e5b7c9a0f"
}
}{
"error": {
"code": "brand_access_denied",
"message": "This API key has no access to this brand",
"details": [
{
"field": "page_size",
"message": "Input should be less than or equal to 100"
}
],
"request_id": "4f3c2e1a-9b7d-4c1e-8f2a-1d3e5b7c9a0f"
}
}{
"error": {
"code": "brand_access_denied",
"message": "This API key has no access to this brand",
"details": [
{
"field": "page_size",
"message": "Input should be less than or equal to 100"
}
],
"request_id": "4f3c2e1a-9b7d-4c1e-8f2a-1d3e5b7c9a0f"
}
}{
"error": {
"code": "brand_access_denied",
"message": "This API key has no access to this brand",
"details": [
{
"field": "page_size",
"message": "Input should be less than or equal to 100"
}
],
"request_id": "4f3c2e1a-9b7d-4c1e-8f2a-1d3e5b7c9a0f"
}
}{
"error": {
"code": "brand_access_denied",
"message": "This API key has no access to this brand",
"details": [
{
"field": "page_size",
"message": "Input should be less than or equal to 100"
}
],
"request_id": "4f3c2e1a-9b7d-4c1e-8f2a-1d3e5b7c9a0f"
}
}{
"error": {
"code": "brand_access_denied",
"message": "This API key has no access to this brand",
"details": [
{
"field": "page_size",
"message": "Input should be less than or equal to 100"
}
],
"request_id": "4f3c2e1a-9b7d-4c1e-8f2a-1d3e5b7c9a0f"
}
}Authorizations
An API key of your account, from Settings > API Keys. It starts with gnz-.
Body
application/json
The new list of the members. A competitor that is not in the list leaves the group.
Maximum array length:
100Show child attributes
Show child attributes
Response
Successful Response
The rank of the brand in the group.
The brand is a member of the group.
The competitors of the group, rank 1 first.
Show child attributes
Show child attributes