Skip to main content

Cargo Company Condition Services

All services that give information about cargo company conditions are listed in this document.

GET Cargo Company Condition List

Returns all cargo company conditions.

Path: /api/v1/oms/cargo-company-conditions/

Query Parameters

The following query parameters can be used to get the information about cargo company conditions.

ParameterData TypeInDescription
tokenstringheaderThe API key of the customer account

Example Request

To get a list of all conditions, a GET request should be sent to the /api/v1/oms/cargo-company-conditions/ 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/cargo-company-conditions/"
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 all the cargo company conditions. The response body contains a JSON object with the cargo company conditions and their attributes such as ID, cargo_company and rules_configuration.

These attributes are described in the following table.

ParameterData TypeDescription
idintegerThe ID of the condition
cargo_companyintegerThe cargo company id of the condition
rules_configurationdictThe configuration settings of the condition

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

{
"count": 21,
"next": "https://{domain_url}/api/v1/oms/cargo-company-conditions/?page=2",
"previous": null,
"results": [
{
"id": 233,
"rules_configuration": {
"rules": []
},
"cargo_company": 695
},
{
"id": 232,
"rules_configuration": {
"rules": []
},
"cargo_company": 694
},
{
"id": 200,
"rules_configuration": {
"rules": [
{
"klass": "oms.shipments.shipment_conditions.ChannelBasedOrdersCondition",
"params": {
"conf": {
"klass": "oms.shipments.clients.demo_client.DemoShipmentClient",
"query_url": "https://www.aaa.com"
},
"channels": [
"1"
],
"condition_type": "trendyol"
}
},
{
"klass": "oms.shipments.shipment_conditions.ChannelBasedOrdersCondition",
"params": {
"conf": {
"klass": "oms.shipments.clients.demo_client.DemoShipmentClient",
"query_url": "https://www.aaa.com"
},
"channels": [
"34"
],
"condition_type": "trendyol"
}
}
]
},
"cargo_company": 661
},
{
"id": 199,
"rules_configuration": {
"rules": [
{
"klass": "oms.shipments.shipment_conditions.ChannelBasedOrdersCondition",
"params": {
"conf": {
"klass": "oms.shipments.clients.demo_client.DemoShipmentClient",
"query_url": "https://www.aaa.com"
},
"channels": [
"1"
],
"condition_type": "trendyol"
}
},
{
"klass": "oms.shipments.shipment_conditions.ChannelBasedOrdersCondition",
"params": {
"conf": {
"klass": "oms.shipments.clients.demo_client.DemoShipmentClientWithoutLabelFile",
"query_url": "https://www.bbb.com"
},
"channels": [
"34"
],
"condition_type": "trendyol"
}
}
]
},
"cargo_company": 628
},
{
"id": 166,
"rules_configuration": {
"rules": [
{
"klass": "oms.shipments.shipment_conditions.ChannelBasedOrdersCondition",
"params": {
"conf": {
"api_key": "asd",
"api_secret": "asdasd",
"supplier_id": "123123",
"package_number_format_length": 10,
"query_url": "https://deneme.com"
},
"channels": [
1
],
"condition_type": "trendyol"
}
}
]
},
"cargo_company": 463
},
{
"id": 133,
"rules_configuration": {
"rules": [
{
"klass": "oms.shipments.shipment_conditions.ChannelBasedOrdersCondition",
"params": {
"conf": {
"klass": "oms.shipments.clients.demo_client.DemoShipmentClientWithoutLabelFile",
"query_url": "https://denemet.cmm"
},
"channels": [
"1"
],
"condition_type": "trendyol"
}
}
]
},
"cargo_company": 595
},
{
"id": 100,
"rules_configuration": {
"rules": []
},
"cargo_company": 562
},
{
"id": 67,
"rules_configuration": {
"rules": []
},
"cargo_company": 496
},
{
"id": 34,
"rules_configuration": {
"rules": [
{
"klass": "oms.shipments.shipment_conditions.ChannelBasedOrdersCondition",
"params": {
"conf": {
"klass": "oms.shipments.clients.demo_client.DemoShipmentClient",
"query_url": "https://deneme.com"
},
"channels": [
"1"
],
"condition_type": "trendyol"
}
}
]
},
"cargo_company": 265
},
{
"id": 5,
"rules_configuration": {
"rules": []
},
"cargo_company": 235
}
]
}

GET Cargo Company Condition Retrieve

Returns the information of the given cargo company condition with id.

Path: /api/v1/oms/cargo-company-conditions/{id}/

Query Parameters

The following query parameters can be used to get the information about cargo company conditions.

ParameterData TypeInDescription
tokenstringheaderThe API key of the customer account
{id}integerurlThe ID of the cargo company condition

Example Request

To retrieve information of given cargo company condition, a GET request should be sent to the /api/v1/oms/cargo-company-conditions/{id}/ endpoint. Here's an example of how to make the request in python:

import requests

url = "https://{domain_url}/api/v1/oms/cargo-company-conditions/{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 information of given cargo company condition. The response body contains a JSON object with the cargo company conditions and their attributes such as ID, cargo_company and rules_configuration. These attributes are described in the following table.

ParameterData TypeDescription
idintegerThe ID of the condition
cargo_companyintegerThe cargo company id of the condition
rules_configurationdictThe configuration settings of the condition

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

{
"id": 859,
"rules_configuration": {
"rules": [
{
"klass": "oms.shipments.shipment_conditions.ClickAndCollectTransferCondition",
"params": {
"conf": {},
"channels": [],
"condition_type": "sales_channel"
}
}
]
},
"cargo_company": 1123
}

GET Available Cargo Company Conditions

Returns all cargo company condition types in the system.

Path: /api/v1/oms/cargo-company-conditions/available-cargo-company-conditions/

Query Parameters

The following query parameters can be used to get the information about condition types.

ParameterData TypeInDescription
tokenstringheaderThe API key of the customer account

Example Request

To get a list of condition types, a GET request should be sent to the /api/v1/oms/cargo-company-conditions/available-cargo-company-conditions/ 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/cargo-company-conditions/available-cargo-company-conditions/"
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 condition types in the system. The response body contains a JSON object of condition types and their attributes such as slug, label, klass and parameter_type.

These attributes are described in the following table.

ParameterData TypeDescription
slugstringThe unique value of the condition
labelstringThe name of the condition
klassstringThe configuration class of the condition
parameter_typestringAccording to what is the condition checked?

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

[
{
"slug": "ONLY_CLICK_AND_COLLECT_TRANSFERS",
"label": "Click And Collect Transfers",
"klass": "oms.shipments.shipment_conditions.ClickAndCollectTransferCondition",
"parameter_type": null
},
{
"slug": "CHANNEL_BASED_ORDERS",
"label": "Channel Based Orders",
"klass": "oms.shipments.shipment_conditions.ChannelBasedOrdersCondition",
"parameter_type": "channel"
}
]

GET Sales Channels

Returns all marketplace applications available for this usage.

Path: /api/v1/oms/cargo-company-conditions/cargo_companies/

Query Parameters

The following query parameters can be used to get the information about sales channels.

ParameterData TypeInDescription
tokenstringheaderThe API key of the customer account

Example Request

To get a list of marketplace applications, a GET request should be sent to the /api/v1/oms/cargo-company-conditions/cargo_companies/ 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/cargo-company-conditions/cargo_companies/"
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 marketplace applications available for this usage. The response body contains a Python dictionary of sales channels in key-value format.

This data is consistent for all users.

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

{
"sales_channel": "Sales Channel",
"turkcellds": "Turkcell Dropshipment",
"pazarama": "Pazarama",
"gordumaldim": "Gördüm Aldım",
"ciceksepeti": "Cicek Sepeti",
"emag": "eMAG",
"aliexpress": "AliExpress",
"distributed": "Distributed",
"allegro": "Allegro",
"amazon": "Amazon",
"lidyana": "Lidyana",
"morhipoV2": "Morhipo V2",
"morhipo": "Morhipo",
"trendyol": "Trendyol",
"feed": "Feed",
"n11": "n11",
"gittigidiyor": "GittiGidiyor",
"hepsiburada": "Hepsiburada",
"cargo_company": "Cargo Company"
}

GET Cargo Company Fields

Returns configuration fields of the given value.

Path: /api/v1/oms/cargo-company-conditions/cargo_company_fields/

Query Parameters

The following query parameters can be used to get the information about the configuration fields.

ParameterData TypeInDescription
tokenstringheaderThe API key of the customer account
condition_typestringquery parameterOne of the sales channel value given above (required)

Example Request

To get the configuration fields of the given value, a GET request should be sent to the /api/v1/oms/cargo-company-conditions/cargo_company_fields/?condition_type=<value> 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/cargo-company-conditions/cargo_company_fields/?condition_type=<value>"
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 configuration fields of the given value.The response body contains a JSON object, which varies from one value to another.

This is an example of the response for the trendyol:

Path: /api/v1/oms/cargo-company-conditions/cargo_company_fields/?condition_type=trendyol

{
"api_key": {
"type": "string",
"required": true,
"read_only": false,
"label": "Api key"
},
"api_secret": {
"type": "string",
"required": true,
"read_only": false,
"label": "Api secret"
},
"supplier_id": {
"type": "string",
"required": true,
"read_only": false,
"label": "Supplier id"
},
"query_url": {
"type": "url",
"required": true,
"read_only": false,
"label": "Query url"
},
"package_number_format_length": {
"type": "integer",
"required": false,
"read_only": false,
"label": "Package number format length",
"min_value": 1
}
}

This is an example of the response for the cargo_company :

Path: /api/v1/oms/cargo-company-conditions/cargo_company_fields/?condition_type=cargo_company

{
"cargo_company_id": {
"type": "integer",
"required": true,
"read_only": false,
"label": "Cargo company id"
}
}

This is an example of the response for the n11 :

Path: /api/v1/oms/cargo-company-conditions/cargo_company_fields/?condition_type=n11

{}

The API response indicates that there are no configurable settings associated with the n11 value.