---
updatedAt: 2026-05-28T21:10:45.000Z
agentTools:
  projectIndex: https://docs.hivestack.com/llms.txt
---

# Insert or update hourly concentrations data for a unit/screen

Inserts or updates hourly concentrations for a screen. There is a lot happening behind the scenes here, but the general rule is that if you post hourly concentrations for a screen that already has concentrations data, the old data will be updated to have ended yesterday and the new data will be inserted with a start date of today.

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "Inventory",
    "version": "2",
    "description": "Inventory",
    "contact": {
      "email": "support@perion.com"
    }
  },
  "servers": [
    {
      "url": "https://apps.hivestack.com/api/v2"
    }
  ],
  "security": [
    {
      "APIKeyHeader": []
    },
    {
      "APIKeyQuery": []
    }
  ],
  "paths": {
    "/units/{unit_id}/concentrations": {
      "post": {
        "tags": [
          "Hourly Concentrations"
        ],
        "summary": "Insert or update hourly concentrations data for a unit/screen",
        "description": "Inserts or updates hourly concentrations for a screen. There is a lot happening behind the scenes here, but the general rule is that if you post hourly concentrations for a screen that already has concentrations data, the old data will be updated to have ended yesterday and the new data will be inserted with a start date of today.",
        "operationId": "postConcentrations",
        "parameters": [
          {
            "$ref": "#/components/parameters/unit_id"
          }
        ],
        "requestBody": {
          "description": "A payload containing required hourly concentrations and related fields",
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/concentrations"
                  },
                  {
                    "required": [
                      "hourly_concentrations"
                    ]
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/SuccessConcentrations"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "APIKeyHeader": {
        "type": "apiKey",
        "name": "hs-auth",
        "in": "header",
        "description": "The value should follow the following format: `apikey access_key:secret_key`"
      },
      "APIKeyQuery": {
        "type": "apiKey",
        "name": "apikey",
        "in": "query",
        "description": "The value should follow the following format: `access_key:secret_key`"
      }
    },
    "schemas": {
      "concentrations": {
        "type": "object",
        "properties": {
          "demographic_id": {
            "type": "integer",
            "example": 10
          },
          "demographic_id_2": {
            "type": "integer",
            "nullable": true,
            "example": null
          },
          "demographic_id_3": {
            "type": "integer",
            "nullable": true,
            "example": null
          },
          "from_date": {
            "type": "string",
            "format": "date",
            "description": "The date that the concentrations will begin to be used (YYYY-MM-DD)"
          },
          "hourly_concentrations": {
            "type": "string",
            "description": "168 comma separated float values representing all hours in a week (24 * 7), 00:00-23:00 Monday-Sunday. Valid values are between 0.0 and 1.0 inclusively.",
            "example": "0.64744,0.50855,0.67522,0.75855,0.45855,0.64744,0.54427,0.49385,0.50855,0.54802,0.54701,0.49293,0.52522,0.43855,0.47855,0.47284,0.503,0.57434,0.42071,0.53441,0.53633,0.52938,0.56411,0.59188,0.64744,0.50855,0.67522,0.75855,0.45855,0.64744,0.54427,0.49385,0.50855,0.54802,0.54701,0.49293,0.52522,0.43855,0.47855,0.47284,0.503,0.57434,0.42071,0.53441,0.53633,0.52938,0.56411,0.59188,0.64744,0.50855,0.67522,0.75855,0.45855,0.64744,0.54427,0.49385,0.50855,0.54802,0.54701,0.49293,0.52522,0.43855,0.47855,0.47284,0.503,0.57434,0.42071,0.53441,0.53633,0.52938,0.56411,0.59188,0.64744,0.50855,0.67522,0.75855,0.45855,0.64744,0.54427,0.49385,0.50855,0.54802,0.54701,0.49293,0.52522,0.43855,0.47855,0.47284,0.503,0.57434,0.42071,0.53441,0.53633,0.52938,0.56411,0.59188,0.64744,0.50855,0.67522,0.75855,0.45855,0.64744,0.54427,0.49385,0.50855,0.54802,0.54701,0.49293,0.52522,0.43855,0.47855,0.47284,0.503,0.57434,0.42071,0.53441,0.53633,0.52938,0.56411,0.59188,0.38577,0.32327,0.42743,0.26077,0.56077,0.63577,0.57327,0.47505,0.51077,0.66077,0.53854,0.56077,0.5941,0.53854,0.51077,0.53349,0.51077,0.54648,0.51077,0.53349,0.31632,0.53,0.61791,0.51077,0.38577,0.32327,0.42743,0.26077,0.56077,0.63577,0.57327,0.47505,0.51077,0.66077,0.53854,0.56077,0.5941,0.53854,0.51077,0.53349,0.51077,0.54648,0.51077,0.53349,0.31632,0.53,0.61791,0.51077"
          },
          "is_override": {
            "type": "integer",
            "description": "An override level where higher numbers represent higher priority. If two sets of concentrations exist for the same time period for a screen, the one with higher is_override is used. This can be useful for statutory holidays which may follow different hourly trends for a day.",
            "example": 0
          },
          "realtime_multiplier": {
            "type": "integer",
            "readOnly": true,
            "example": 1
          },
          "to_date": {
            "type": "string",
            "format": "date",
            "description": "The date that the concentrations will stop to be used (YYYY-MM-DD)"
          },
          "unit_id": {
            "type": "integer",
            "readOnly": true,
            "example": 12345
          }
        }
      }
    },
    "parameters": {
      "unit_id": {
        "name": "unit_id",
        "in": "path",
        "description": "Auto generated id associated to the unit.",
        "required": true,
        "schema": {
          "type": "integer"
        }
      }
    },
    "responses": {
      "SuccessConcentrations": {
        "description": "OK - an object representing a hourly concentrations",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/concentrations"
            }
          }
        }
      }
    }
  }
}
```