> For the complete documentation index, see [llms.txt](https://apidocs.akinon.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://apidocs.akinon.com/oms/content-type-services.md).

# Content Type Services

All services related to content types are listed in this page.

### `GET` List Content Types

This service is used to retrieve all content types with detailed information.

**Path:** `/api/v1/oms/settings/content_types/`

**Query Parameters**

The following query parameters can be used to get the details of content types.

| Parameter | Data Type | In     | Description                         |
| --------- | --------- | ------ | ----------------------------------- |
| token     | string    | header | The API key of the customer account |

**Example Request**

To get a detailed list of all content types, a `GET` request should be sent to the `/api/v1/oms/settings/content_types/` endpoint. In the headers, set the `Authorization` header to include the token for authentication.

Here's an example of how to make the request in python:

```python
import requests

url = "https://{domain_url}/api/v1/oms/settings/content_types/"
token = "f532eXXXXXXXXXXXXXXXXX201XXXXX9332d"

headers = {
    'Content-Type': 'application/json',
    'Authorization': f'Token {token}'
}

response = requests.request('GET', url, headers=headers)

print(response.json())

```

**Example Response (200 OK)**

In a successful response with a status code of 200 OK, the API returns the details of the content types. The response body contains a `JSON` object with the content types and their attributes such as ID, app label and model.

These parameters are described in the following table.

| Parameter  | Data Type | Description                                      |
| ---------- | --------- | ------------------------------------------------ |
| id         | integer   | The primary key of the content type              |
| app\_label | string    | The name of the application the model is part of |
| model      | string    | The name of the model class                      |

This example response serves as a reference to understand the structure and data format returned from this API service.

```json
{
  "count": 63,
  "next": "https://{domain_url}/api/v1/oms/settings/content_types/?page=2",
  "previous": null,
  "results": [
    {
      "id": 1,
      "app_label": "products",
      "model": "product"
    },
    {
      "id": 2,
      "app_label": "orders",
      "model": "order"
    },
    {
      "id": 3,
      "app_label": "orders",
      "model": "orderitem"
    },
    {
      "id": 4,
      "app_label": "packages",
      "model": "package"
    },
    {
      "id": 5,
      "app_label": "packages",
      "model": "packageitem"
    },
    {
      "id": 6,
      "app_label": "transfers",
      "model": "transferorder"
    },
    {
      "id": 7,
      "app_label": "transfers",
      "model": "transferitem"
    },
    {
      "id": 8,
      "app_label": "fulfilment",
      "model": "orderexecutionplan"
    },
    {
      "id": 9,
      "app_label": "fulfilment",
      "model": "orderexecutionplanitem"
    },
    {
      "id": 10,
      "app_label": "shipments",
      "model": "shipment"
    }
  ]
}
```

### `GET` List Content Types - Simple

This service is used to retrieve a simple list of content types.

It has been added for the purpose of supporting business intelligence.

**Path:** `/api/v1/oms/settings/content_types/list-simple/`

**Query Parameters**

The following query parameters can be used to get a simple list of content types.

| Parameter | Data Type | In     | Description                         |
| --------- | --------- | ------ | ----------------------------------- |
| token     | string    | header | The API key of the customer account |

**Example Request**

To get a simple list of all content types, a `GET` request should be sent to the `/api/v1/oms/settings/content_types/list-simple/` endpoint. In the headers, set the `Authorization` header to include the token for authentication.

Here's an example of how to make the request in python:

```python
import requests

url = "https://{domain_url}/api/v1/oms/settings/content_types/list-simple/"
token = "f532eXXXXXXXXXXXXXXXXX201XXXXX9332d"

headers = {
    'Content-Type': 'application/json',
    'Authorization': f'Token {token}'
}

response = requests.request('GET', url, headers=headers)

print(response.json())
```

**Example Response (200 OK)**

In a successful response with a status code of 200 OK, the API returns the details of the content types. The response body contains a `JSON` object with the content types and their attributes such as ID, app label and model.

These parameters are described in the following table.

| Parameter  | Data Type | Description                                      |
| ---------- | --------- | ------------------------------------------------ |
| id         | integer   | The primary key of the content type              |
| app\_label | string    | The name of the application the model is part of |
| model      | string    | The name of the model class                      |

This example response serves as a reference to understand the structure and data format returned from this API service.

```json
{
  "count": 63,
  "next": "https://{domain_url}/api/v1/oms/settings/content_types/list-simple/?page=2",
  "previous": null,
  "results": [
    {
      "id": 1,
      "app_label": "products",
      "model": "product"
    },
    {
      "id": 2,
      "app_label": "orders",
      "model": "order"
    },
    {
      "id": 3,
      "app_label": "orders",
      "model": "orderitem"
    },
    {
      "id": 4,
      "app_label": "packages",
      "model": "package"
    },
    {
      "id": 5,
      "app_label": "packages",
      "model": "packageitem"
    },
    {
      "id": 6,
      "app_label": "transfers",
      "model": "transferorder"
    },
    {
      "id": 7,
      "app_label": "transfers",
      "model": "transferitem"
    },
    {
      "id": 8,
      "app_label": "fulfilment",
      "model": "orderexecutionplan"
    },
    {
      "id": 9,
      "app_label": "fulfilment",
      "model": "orderexecutionplanitem"
    },
    {
      "id": 10,
      "app_label": "shipments",
      "model": "shipment"
    }
  ]
}
```

### `GET` Retrieve Single Content Type Detail

This service is used to retrieve detailed information about a single content type with a specific ID.

**Path:** `/api/v1/oms/settings/content_types/{id}/`

**Query Parameters**

The following query parameters can be used to get the details of content type.

| Parameter | Data Type | In     | Description                         |
| --------- | --------- | ------ | ----------------------------------- |
| token     | string    | header | The API key of the customer account |
| {id}      | integer   | url    | The ID of the content type          |

**Example Request**

To retrieve detailed information of a specific content type, a `GET` request should be sent to the `/api/v1/oms/settings/content_types/{id}/` endpoint. In the headers, set the `Authorization` header to include the token for authentication.

Here's an example of how to make the request in python:

```python
import requests

url = "https://{domain_url}/api/v1/oms/settings/content_types/{id}/"
token = "f532eXXXXXXXXXXXXXXXXX201XXXXX9332d"

headers = {
    'Content-Type': 'application/json',
    'Authorization': f'Token {token}'
}

response = requests.request('GET', url, headers=headers)

print(response.json())

```

**Example Response (200 OK)**

In a successful response with a status code of 200 OK, the API returns the detailed information of a specific content type. The response body contains a `JSON`object with the given content types' attributes such as ID, app\_label and model.

These parameters are described in the following table.

| Parameter  | Data Type | Description                                      |
| ---------- | --------- | ------------------------------------------------ |
| id         | integer   | The primary key of the content type              |
| app\_label | string    | The name of the application the model is part of |
| model      | string    | The name of the model class                      |

This example response serves as a reference to understand the structure and data format returned from this API service.

```json
{
  "id": 4,
  "app_label": "packages",
  "model": "package"
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://apidocs.akinon.com/oms/content-type-services.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
