# Publications

## Get Publications

<mark style="color:blue;">`GET`</mark> `https://api.sparkloop.app/v2/partner_network/publications`

List, search and sort publications

#### Query Parameters

| Name  | Type   | Description                                                              |
| ----- | ------ | ------------------------------------------------------------------------ |
| query | String | Search publications by their Name, Description, Language, or Categories. |
| sort  | String | Sorting by: name, created\_at                                            |
| order | String | asc, desc                                                                |

{% tabs %}
{% tab title="Status 200" %}

```json
{
    "publications": [
        <Publication Object>,
        <Publication Object>,
        <Publication Object>
    ],
    "meta": {
        "per_page": 50,
        "page": 1,
        "total_pages": 2,
        "total_publications": 73
    }
}
```

{% endtab %}
{% endtabs %}

## Get a Publication

<mark style="color:blue;">`GET`</mark> `https://api.sparkloop.app/v2/partner_network/publications/:identifier`

Returns a single publication by UUID

{% tabs %}
{% tab title="Status 200" %}

```json
{
    "publication": <Publication Object>
}
```

{% endtab %}

{% tab title="Status 404" %}

```json
{
	"error": "Publication pub_e49df756d93da not found."
}
```

{% endtab %}
{% endtabs %}

## Recommend a Publication

<mark style="color:blue;">`POST`</mark> `https://api.sparkloop.app/v2/partner_network/publications/:identifier/recommend`

{% tabs %}
{% tab title="200 " %}

```json
{
    "partner_campaign": <Recommendation Object>
}
```

{% endtab %}

{% tab title="400" %}

```json
{"error": "This partner campaign has been archived and can't be re-activated"}
```

{% 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.sparkloop.app/api-v2/endpoints/partner-network/publications.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.
