# Catalogue Item

Allows for linking between the product and the catalog. While the product is moved to the previously created catalog, an instance is created from the `CatalogItem` model that is associated with the product and the catalog. A product can be added to multiple catalogs.

## `GET` Catalog Item

Sample HTTP request to get all catalog item lists from the system.

‘content\_type’ header represents the response type.

The ‘Authorization’ header is required for authentication. You can retrieve `api_token` by logging in.

**Request**

Path: `/api/v1/catalog_items/`

```python
import requests

url = "https://{customer_api_url}/api/v1/catalog_items/"
api_token = "API TOKEN"

headers = {
    'content-type': 'application/json',
    'Authorization': 'Token {}'.format(api_token)
}

response = requests.get(url, headers=headers)
print(response.text)

```

**Response**

Returns the catalog ID and the product ID of the corresponding catalog item.

```json
{
    "count": n,
    "next": "/api/v1/catalog_items/?page=2",
    "previous": null,
    "results": [
        {
            "pk": 1,
            "product": 1,
            "catalog": 1,
            "created_date": "2020-05-07T11:25:03.745360Z",
            "modified_date": "2020-05-07T11:25:03.745387Z"
        },
        {
        "..."
        }
    ]
}
```

## `POST` Create Catalog Item

After the product and catalog models are created, the post request is sent using the pk information of the relevant models. The product and catalog ID must be unique, otherwise it will throw an error. (“product”, “catalog” fields should form a unique set.)

Path: `/api/v1/catalog_items/`

```json
{
    "product": {product-pk},
    "catalog": {catalog-pk}
}

```

**Response**

Returns the properties of the created catalog items.

Response Status Code: 201 and parameter detail.

```json
{
    "pk":{catalogitem-pk},
    "product":{product-pk},
    "catalog":{catalog-pk},
    "created_date":"2021-05-11T10:46:47.996741Z",
    "modified_date":"2021-05-11T10:46:47.996769Z"
}

```

## `DELETE` Catalog Item

Path: `/api/v1/catalog_items/{catalog-item-pk}/`

**Response**

Response Status Code: `204`


---

# 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://apidocs.akinon.com/omnitron/catalogue/catalogue-item.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.
