curl --request PATCH \
--url https://app.backend.genezio.ai/customer/v1/brands/{brand_id}/scorecard/goals/{goal_id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"dimensions": [
{
"label": "<string>"
}
],
"title": "<string>"
}
'import requests
url = "https://app.backend.genezio.ai/customer/v1/brands/{brand_id}/scorecard/goals/{goal_id}"
payload = {
"dimensions": [{ "label": "<string>" }],
"title": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({dimensions: [{label: '<string>'}], title: '<string>'})
};
fetch('https://app.backend.genezio.ai/customer/v1/brands/{brand_id}/scorecard/goals/{goal_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"created_at": "2023-11-07T05:31:56Z",
"id": 123,
"runs": [
{
"date": "2023-12-25",
"executed_at": "2023-11-07T05:31:56Z",
"status": "success",
"duration_ms": 123,
"error": "<string>"
}
],
"state": "<string>",
"title": "<string>",
"view_type": "<string>",
"archived_at": "2023-11-07T05:31:56Z",
"category": "<string>",
"datapoints": [
{
"date": "2023-12-25",
"payload": {},
"status": "<string>"
}
],
"dimensions": [
{
"kind": "engine",
"label": "<string>"
}
],
"explanation": [
"<string>"
],
"intent": "<string>",
"metric": "<string>",
"status": "<string>",
"target": "<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"
}
}Update a goal
Change the title, the category or the dimensions of a goal. It does not change what the goal computes, thus it runs nothing.
curl --request PATCH \
--url https://app.backend.genezio.ai/customer/v1/brands/{brand_id}/scorecard/goals/{goal_id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"dimensions": [
{
"label": "<string>"
}
],
"title": "<string>"
}
'import requests
url = "https://app.backend.genezio.ai/customer/v1/brands/{brand_id}/scorecard/goals/{goal_id}"
payload = {
"dimensions": [{ "label": "<string>" }],
"title": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({dimensions: [{label: '<string>'}], title: '<string>'})
};
fetch('https://app.backend.genezio.ai/customer/v1/brands/{brand_id}/scorecard/goals/{goal_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"created_at": "2023-11-07T05:31:56Z",
"id": 123,
"runs": [
{
"date": "2023-12-25",
"executed_at": "2023-11-07T05:31:56Z",
"status": "success",
"duration_ms": 123,
"error": "<string>"
}
],
"state": "<string>",
"title": "<string>",
"view_type": "<string>",
"archived_at": "2023-11-07T05:31:56Z",
"category": "<string>",
"datapoints": [
{
"date": "2023-12-25",
"payload": {},
"status": "<string>"
}
],
"dimensions": [
{
"kind": "engine",
"label": "<string>"
}
],
"explanation": [
"<string>"
],
"intent": "<string>",
"metric": "<string>",
"status": "<string>",
"target": "<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-.
Headers
Any unique string, such as a UUID. Send the same key again to get the first answer and not a second write. The API keeps an answer for 24 hours.
Path Parameters
A goal of the Business Scorecard of the brand.
Body
Only the fields that the request sends change. dimensions: [] removes
each dimension.
Response
Successful Response
The ten newest runs, the newest first.
Show child attributes
Show child attributes
healthy, partial or needs_attention: if the nightly runs work.
The card that draws the goal, such as multi_line.
The last 90 days, the oldest first.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
How the goal is computed.
The sentence that the person wrote.
What the goal measures.
The status of the newest datapoint.
The value that reaches the goal.