---
updatedAt: 2025-05-13T15:26:05.000Z
agentTools:
  projectIndex: https://docs.affluent.io/llms.txt
---

# Brands statistics Endpoint

note: The {yourAgencyName} placeholder should be substituted with the subdomain of the URL you use to access the Affluent dashboard. For instance, if you log in at “dundermifflin.affluent.io” then you should replace {yourAgencyName} with “dundermifflin”

This endpoint allows clients to query the **most recent refresh times** for key datasets (e.g. actions, traffic, skus) associated with each **brand**. It enables clients to intelligently trigger data pulls based on when data was actually refreshed, instead of relying on fixed schedules. Refer to the supported metrics and categories pages to know which metrics and categories belong to “actions”, “traffic” or “skus”.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Endpoint Reference",
    "description": "Agency API documentation",
    "version": "1.10.95"
  },
  "components": {
    "securitySchemes": {
      "apiKey": {
        "type": "apiKey",
        "name": "apiKey",
        "in": "query"
      }
    }
  },
  "paths": {
    "/v1/brands/": {
      "get": {
        "summary": "Brands statistics Endpoint",
        "tags": [
          "brands"
        ],
        "description": "note: The {yourAgencyName} placeholder should be substituted with the subdomain of the URL you use to access the Affluent dashboard. For instance, if you log in at “dundermifflin.affluent.io” then you should replace {yourAgencyName} with “dundermifflin”\n\nThis endpoint allows clients to query the **most recent refresh times** for key datasets (e.g. actions, traffic, skus) associated with each **brand**. It enables clients to intelligently trigger data pulls based on when data was actually refreshed, instead of relying on fixed schedules. Refer to the supported metrics and categories pages to know which metrics and categories belong to “actions”, “traffic” or “skus”.",
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "title": "Brand Id",
              "minimum": 1
            },
            "in": "query",
            "name": "id",
            "required": false
          }
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": false,
                    "required": [
                      "brandId",
                      "jobStatus",
                      "warehouseLastUpdate"
                    ],
                    "properties": {
                      "brandId": {
                        "type": "number"
                      },
                      "jobStatus": {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                          "jobsCompleted",
                          "jobsPending",
                          "jobsInProgress",
                          "lastJobFinished",
                          "nextJobEstimatedRunTime"
                        ],
                        "properties": {
                          "jobsCompleted": {
                            "description": "Amount of data fetching jobs were completed last few hours.",
                            "type": "number"
                          },
                          "jobsPending": {
                            "description": "Amount of data fetching jobs which will be run during next few hours.",
                            "type": "number"
                          },
                          "jobsInProgress": {
                            "description": "Amount of data fetching jobs in progress.",
                            "type": "number"
                          },
                          "lastJobFinished": {
                            "description": "Date and time when last data fetching job was finished. The value is null if there are no etls run for last few hours.",
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "datetime"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "nextJobEstimatedRunTime": {
                            "description": "Date and time when next data fetching job will start.",
                            "type": "string",
                            "format": "datetime"
                          }
                        }
                      },
                      "warehouseLastUpdate": {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                          "actions",
                          "skus",
                          "traffic"
                        ],
                        "properties": {
                          "actions": {
                            "description": "Date and time when Actions data was modified last time. The value is null if there are no changes in the past month.",
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "datetime"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "skus": {
                            "description": "Date and time when Skus data was modified last time. The value is null if there are no changes in the past month.",
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "datetime"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "traffic": {
                            "description": "Date and time when Traffic data was modified last time. The value is null if there are no changes in the past month.",
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "datetime"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "default": "Bad Request",
                      "type": "string"
                    },
                    "message": {
                      "default": "Any 'sort' field must be included as one of the categories or metrics. The following 'sort' fields were not included in either: mistake.",
                      "type": "string"
                    },
                    "statusCode": {
                      "default": 400,
                      "type": "integer"
                    }
                  },
                  "required": [
                    "statusCode",
                    "error",
                    "message"
                  ],
                  "title": "Bad Request Error",
                  "type": "object"
                }
              }
            }
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://yourAgencyName-api.affluent.io",
      "description": "agency server"
    }
  ]
}
```