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

# Returns a list of the unit ids targeted by the line item.

For a given line item, this endpoint returns a list of the Perion DOOH unique identifiers of the units that the line item targets implicitly. Therefore, it will also include units from targeting criteria that are only available through the graphical user interface, such as media type and geofences. Note that for line items created and edited through the public API, the list of implicitly targeted units should be the same as the list of explicitly targeted ones (i.e. the unit_ids field of line item model). If the line item doesn't specify any targeting criteria, the endpoint will return a list of all the units available to the line item.

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "Campaigns",
    "description": "Campaigns management and data pushes",
    "version": "2",
    "contact": {
      "email": "support@perion.com"
    }
  },
  "servers": [
    {
      "url": "https://apps.hivestack.com/api/v2"
    }
  ],
  "security": [
    {
      "hs-auth": []
    }
  ],
  "tags": [
    {
      "name": "Line Items"
    }
  ],
  "paths": {
    "/lineitems/{lineitem_id}/targetedunits": {
      "parameters": [
        {
          "$ref": "#/components/parameters/lineitem_id"
        }
      ],
      "get": {
        "tags": [
          "Line Items"
        ],
        "summary": "Returns a list of the unit ids targeted by the line item.",
        "description": "For a given line item, this endpoint returns a list of the Perion DOOH unique identifiers of the units that the line item targets implicitly. Therefore, it will also include units from targeting criteria that are only available through the graphical user interface, such as media type and geofences. Note that for line items created and edited through the public API, the list of implicitly targeted units should be the same as the list of explicitly targeted ones (i.e. the unit_ids field of line item model). If the line item doesn't specify any targeting criteria, the endpoint will return a list of all the units available to the line item.",
        "operationId": "getLineitemTargetedUnits",
        "responses": {
          "200": {
            "description": "OK - The list of targeted unit ids was retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "integer"
                  },
                  "description": "List of unit ids that are implicitely targeted by the line item.",
                  "example": [
                    1,
                    2
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedError"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "hs-auth": {
        "type": "apiKey",
        "name": "hs-auth",
        "in": "header",
        "description": "The value should follow the following format: `apikey access_key:secret_key`"
      }
    },
    "responses": {
      "UnauthorizedError": {
        "description": "API key is missing or invalid. Please contact support@perion.com.",
        "headers": {
          "hs-auth": {
            "description": "Set the hs-auth header following this pattern `apikey your_access_key:your_secret_key`",
            "schema": {
              "type": "string"
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "error": {
                  "type": "string",
                  "example": "Missing authorization info"
                }
              }
            }
          }
        }
      }
    },
    "parameters": {
      "lineitem_id": {
        "name": "lineitem_id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "integer"
        }
      }
    }
  }
}
```