Skip to main content

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.

ParameterData TypeInDescription
tokenstringheaderThe 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:

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.

ParameterData TypeDescription
idintegerThe primary key of the content type
app_labelstringThe name of the application the model is part of
modelstringThe name of the model class

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

{
"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.

ParameterData TypeInDescription
tokenstringheaderThe 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:

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.

ParameterData TypeDescription
idintegerThe primary key of the content type
app_labelstringThe name of the application the model is part of
modelstringThe name of the model class

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

{
"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.

ParameterData TypeInDescription
tokenstringheaderThe API key of the customer account
{id}integerurlThe 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:

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 JSONobject with the given content types' attributes such as ID, app_label and model.

These parameters are described in the following table.

ParameterData TypeDescription
idintegerThe primary key of the content type
app_labelstringThe name of the application the model is part of
modelstringThe name of the model class

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

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