# Campaigns

## Get Campaigns

<mark style="color:blue;">`GET`</mark> `https://api.podkrepi.bg/v1/campaigns`

This endpoint allows you to get campaigns.

#### Headers

| Name           | Type   | Description                                                    |
| -------------- | ------ | -------------------------------------------------------------- |
| Authentication | string | Authentication token to track down who is emptying our stocks. |

{% tabs %}
{% tab title="200 Campaign successfully retrieved." %}

```javascript
[
    {
        "id": "5572f770-a434-4ed8-9a91-d94474d26c8e"
        "name": "Campaign name"
    },
    {
        "id": "97692474-2482-460f-86ec-2b84954f989b"
        "name": "Campaign name"
    }
]
```

{% endtab %}

{% tab title="404 Could not find a campaign matching this query." %}

```javascript
{
    "error": "Not Found"
}
```

{% endtab %}
{% endtabs %}

## Get Campaign by ID

<mark style="color:blue;">`GET`</mark> `https://api.podkrepi.bg/v1/campaigns/:id`

This endpoint allows you to get campaigns.

#### Path Parameters

| Name | Type   | Description                                |
| ---- | ------ | ------------------------------------------ |
| id   | string | ID of the cake to get, for free of course. |

#### Headers

| Name           | Type   | Description                                                    |
| -------------- | ------ | -------------------------------------------------------------- |
| Authentication | string | Authentication token to track down who is emptying our stocks. |

{% tabs %}
{% tab title="200 Campaign successfully retrieved." %}

```javascript
{
    "id": "5572f770-a434-4ed8-9a91-d94474d26c8e"
    "name": "Campaign name"
}
```

{% endtab %}

{% tab title="404 Could not find a campaign matching this query." %}

```javascript
{
    "error": "Not Found"
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.podkrepi.bg/development/rest-api/endpoints/campaigns.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
