Skip to main content

Stock Location Services

All services related to stock_locations are listed in this document.

GET StockLocation List - Simple

Returns all stock_location with detailed information. It is added for business intelligence purposes.

Path: /api/v1/oms/stocklocations/list-simple/

Query Parameters

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

ParameterData TypeInDescription
tokenstringheaderThe API key of the customer account

Example Request

To get a detailed list of all stock_locations, a GET request should be sent to the /api/v1/oms/stocklocations/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/stocklocations/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 stock_locations. The response body contains a JSON object with the stock_locations and their attributes such as ID, name etc.

These parameters are described in the following table.

ParameterData TypeDescription
idintegerThe primary key of the stock_location
created_datedateThe creation date of the stock_location
modified_datedateThe last modified date of the stock_location
omnitron_idintegerThe Omnitron ID of the stock_location
namestringThe name of the stock_location
stock_location_typestringThe stock_location_type of the stock_location
fax_numberstringThe fax number of the stock_location
erp_codestringThe partner stock_location code
addressintegerThe address id of the stock_location
is_fulfillment_centerbooleanThe is_fulfillment_center of the stock_location
is_pickup_locationbooleanThe is_pickup_location of the stock_location
is_delivery_locationbooleanThe is_delivery_location of the stock_location
is_fast_delivery_availablebooleanThe is_fast_delivery_available of the stock_location
is_return_availablebooleanThe is_return_available of the stock_location
is_activebooleanThe status of the stock_location
priorityintegerThe priority of the stock_location
confdictThe configuration info of the stock_location
daytime_phonestringThe daytime_phone of the stock_location
evening_phonestringThe evening_phone of the stock_location
emailstringThe email of the stock_location
target_packing_intervalstringThe packing interval of the stock_location
target_transfer_intervalstringThe transfer interval of the stock_location
use_as_shipper_locationbooleanThe shipper location info of the stock_location
quotaintegerThe quota amount of the stock_location
max_quotaintegerThe max_quota amount of the stock_location
engineintegerThe stock engine of the stock_location
tagslistThe tags of the stock_location

Max Quota & Quota Feature

Regardless of scenarios, the process of lowering and raising quotas continues, the quota amount continues to increase and decrease on a location basis. However, for these alterations to impact planning, the scenario rules must have the SELECT_BY_QUOTA value.

  • The maximum quota value specifies how many packages can be created from the respective location. The quota value is a user-unspecified parameter used for monitoring the maximum quota value and performing increase or decrease operations.

  • max_quota - quota = available_quota

  • If the available_quota value is 0, no packages can be created. (To encounter this scenario, the SELECT_BY_QUOTA value must be chosen in the scenario rules.)

  • For packages with a status below 400 and in the cancellation_waiting state, the quota value increases by 1. (During this stage, when the package is in the waiting state, the quota amount is considered to increase by 1.)

  • Upon packaging a package, the quota value decreases by 1. Consequently, the available_quota increases, enhancing the likelihood of packaging from the respective location.

  • In the event of a package cancellation, the quota amount decreases by 1 in a similar way.

How to Set Max_quota Condition

  • Navigate to Akinon OMS > Locations > x location: Enter the desired max_quota value in the max_quota field.

  • Navigate to Akinon OMS > Scenarios > Distribution Scenario > Rules > StockLocation Conditions: Ensure SELECT_BY_QUOTA is selected.

    • Once these steps are executed, the packaging process will factor in the max_quota amount.

    • After establishing this condition, it is crucial to note that the packaging process will occur based on the max_quota value.

    • In case of misuse, the packaging process may not occur. (For instance, if max_quota values are not entered for locations, and there is only one rule in the scenario with a quota condition, the packaging process will not occur.)

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

{
"count": 12,
"next": "https://{domain-url}/api/v1/oms/stocklocations/list-simple/?page=2",
"previous": null,
"results": [
{
"id": 199,
"stock_location_type": "warehouse",
"created_date": "2023-01-01T11:52:39.635358Z",
"modified_date": "2023-12-01T09:14:24.129494Z",
"omnitron_id": null,
"name": "Name",
"is_fulfillment_center": true,
"is_pickup_location": false,
"is_delivery_location": true,
"is_return_available": false,
"is_fast_delivery_available": false,
"is_active": false,
"priority": 1,
"conf": {},
"daytime_phone": null,
"evening_phone": null,
"fax_number": null,
"email": "email@akinon.com",
"target_packing_interval": "5 00:00:00",
"target_transfer_interval": "3 00:00:00",
"erp_code": "erp_code",
"use_as_shipper_location": false,
"quota": 0,
"max_quota": 100,
"engine": 100,
"address": 1,
"tags": []
}
]
}

OPTIONS StockLocation List - Simple

Returns API level details of StockLocation List Simple service.

Path: /api/v1/oms/stocklocations/list-simple/

Query Parameters

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

ParameterData TypeInDescription
tokenstringheaderThe API key of the customer account

Example Request

To get API level details of the service, a OPTIONS request should be sent to the /api/v1/oms/stocklocations/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/stocklocations/list-simple/"
token = "f532eXXXXXXXXXXXXXXXXX201XXXXX9332d"

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

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

print(response.json())

Example Response (200 OK)

In a successful response with a status code of 200 OK, it returns the API level details of the service. The response body contains a JSON object with the name, rendering types, filtering attributes etc.

These parameters are described in the following table.

ParameterData TypeDescription
namestringThe name of the service
renderslistThe rendering types of the service
parseslistThe parsing types of the service
actionsjsonThe defined actions of the service
filterslistThe filtering attributes of the service

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

{
"name": "list-simple",
"renders": [
"application/json",
"text/csv",
"application/xls"
],
"parses": [
"application/json",
"application/x-www-form-urlencoded",
"multipart/form-data"
],
"actions": {
"GET": {
"id": {
"type": "integer",
"required": false,
"read_only": true,
"label": "ID"
},
"stock_location_type": {
"type": "choice",
"required": true,
"read_only": false,
"label": "Stock location type",
"choices": [
{
"value": "store",
"display_name": "Store"
},
{
"value": "warehouse",
"display_name": "Warehouse"
}
]
},
"created_date": {
"type": "datetime",
"required": false,
"read_only": true,
"label": "Created date"
},
"modified_date": {
"type": "datetime",
"required": false,
"read_only": true,
"label": "Modified date"
},
"omnitron_id": {
"type": "integer",
"required": false,
"read_only": false,
"label": "Omnitron id",
"min_value": -2147483648,
"max_value": 2147483647
},
"name": {
"type": "string",
"required": true,
"read_only": false,
"label": "Stock Location Name",
"max_length": 128
},
"is_fulfillment_center": {
"type": "boolean",
"required": false,
"read_only": false,
"label": "Is fulfillment center"
},
"is_pickup_location": {
"type": "boolean",
"required": false,
"read_only": false,
"label": "Is pickup location"
},
"is_delivery_location": {
"type": "boolean",
"required": false,
"read_only": false,
"label": "Is delivery location"
},
"is_return_available": {
"type": "boolean",
"required": false,
"read_only": false,
"label": "Is return available"
},
"is_fast_delivery_available": {
"type": "boolean",
"required": false,
"read_only": false,
"label": "Is fast delivery available"
},
"is_active": {
"type": "boolean",
"required": false,
"read_only": false,
"label": "Is active"
},
"priority": {
"type": "integer",
"required": true,
"read_only": false,
"label": "Priority",
"min_value": 0,
"max_value": 32767
},
"conf": {
"type": "json",
"required": false,
"read_only": false,
"label": "Conf"
},
"daytime_phone": {
"type": "string",
"required": false,
"read_only": false,
"label": "Daytime Phone Number",
"max_length": 60
},
"evening_phone": {
"type": "string",
"required": false,
"read_only": false,
"label": "Evening Time Phone Number",
"max_length": 60
},
"fax_number": {
"type": "string",
"required": false,
"read_only": false,
"label": "Fax Number",
"max_length": 60
},
"email": {
"type": "email",
"required": false,
"read_only": false,
"label": "Email Address",
"max_length": 254
},
"target_packing_interval": {
"type": "field",
"required": false,
"read_only": false,
"label": "Target packing interval"
},
"target_transfer_interval": {
"type": "field",
"required": false,
"read_only": false,
"label": "Target transfer interval"
},
"erp_code": {
"type": "string",
"required": true,
"read_only": false,
"label": "ERP Code",
"max_length": 32
},
"use_as_shipper_location": {
"type": "boolean",
"required": false,
"read_only": false,
"label": "Use as shipper location"
},
"quota": {
"type": "integer",
"required": false,
"read_only": false,
"label": "Quota",
"min_value": -2147483648,
"max_value": 2147483647
},
"max_quota": {
"type": "integer",
"required": false,
"read_only": false,
"label": "Max quota",
"min_value": -2147483648,
"max_value": 2147483647
},
"engine": {
"type": "pk field",
"required": false,
"read_only": false,
"label": "Engine"
},
"address": {
"type": "pk field",
"required": true,
"read_only": false,
"label": "Address"
},
"tags": {
"type": "field",
"required": false,
"read_only": false,
"label": "Tags"
}
}
},
"filters": [
{
"label": "Name",
"field_name": "name",
"type": "string",
"lookup_expr": [
"icontains"
],
"extra": {
"required": false
}
},
{
"label": "Erp Code",
"field_name": "erp_code",
"type": "string",
"lookup_expr": [
"exact"
],
"extra": {
"required": false
}
},
{
"label": "City",
"field_name": "address__city",
"type": "integer",
"lookup_expr": [
"exact"
],
"extra": {
"required": false
}
},
{
"label": "Township",
"field_name": "address__township",
"type": "integer",
"lookup_expr": [
"exact"
],
"extra": {
"required": false
}
},
{
"label": "Tag",
"field_name": "tags__name",
"type": "string",
"lookup_expr": [
"exact"
],
"extra": {
"required": false
}
},
{
"label": "Stock Location Type",
"field_name": "stock_location_type",
"type": "dropdown",
"lookup_expr": [
"exact"
],
"extra": {
"choices": [
[
"store",
"Store"
],
[
"warehouse",
"Warehouse"
]
],
"required": false
}
},
{
"label": "Retail Store Erp Code",
"field_name": "erp_code",
"type": "string",
"lookup_expr": [
"exact"
],
"extra": {
"required": false
}
},
{
"label": "Id In",
"field_name": "id",
"type": "integer",
"lookup_expr": [
"in"
],
"extra": {
"help_text": "Multiple values may be separated by commas.",
"required": false
}
},
{
"label": "Id Gt",
"field_name": "id",
"type": "integer",
"lookup_expr": [
"gt"
],
"extra": {
"required": false
}
},
{
"label": "Id Gte",
"field_name": "id",
"type": "integer",
"lookup_expr": [
"gte"
],
"extra": {
"required": false
}
},
{
"label": "Id Lt",
"field_name": "id",
"type": "integer",
"lookup_expr": [
"lt"
],
"extra": {
"required": false
}
},
{
"label": "Id Lte",
"field_name": "id",
"type": "integer",
"lookup_expr": [
"lte"
],
"extra": {
"required": false
}
},
{
"label": "Sort",
"field_name": "sort",
"type": "dropdown",
"lookup_expr": [
"exact"
],
"extra": {
"choices": [
[
"id",
"ID"
],
[
"-id",
"ID (descending)"
],
[
"modified_date",
"Modified Date"
],
[
"-modified_date",
"Modified Date (descending)"
],
[
"name",
"Name"
],
[
"-name",
"Name (descending)"
]
],
"help_text": "",
"null_label": null,
"required": false
}
},
{
"label": "Is Active",
"field_name": "is_active",
"type": "string",
"lookup_expr": [
"exact"
],
"extra": {
"required": false
}
},
{
"label": "Is Fulfillment Center",
"field_name": "is_fulfillment_center",
"type": "string",
"lookup_expr": [
"exact"
],
"extra": {
"required": false
}
},
{
"label": "Is Pickup Location",
"field_name": "is_pickup_location",
"type": "string",
"lookup_expr": [
"exact"
],
"extra": {
"required": false
}
},
{
"label": "Is Delivery Location",
"field_name": "is_delivery_location",
"type": "string",
"lookup_expr": [
"exact"
],
"extra": {
"required": false
}
},
{
"label": "Is Return Available",
"field_name": "is_return_available",
"type": "string",
"lookup_expr": [
"exact"
],
"extra": {
"required": false
}
},
{
"label": "Is Fast Delivery Available",
"field_name": "is_fast_delivery_available",
"type": "string",
"lookup_expr": [
"exact"
],
"extra": {
"required": false
}
},
{
"label": "Created Date",
"field_name": "created_date",
"type": "string",
"lookup_expr": [
"gt",
"gte",
"lt",
"lte"
],
"extra": {
"required": false
}
},
{
"label": "Modified Date",
"field_name": "modified_date",
"type": "string",
"lookup_expr": [
"gt",
"gte",
"lt",
"lte"
],
"extra": {
"required": false
}
},
{
"label": "Engine Id",
"field_name": "engine__id",
"type": "string",
"lookup_expr": [
"exact"
],
"extra": {
"required": false
}
}
]
}

GET StockLocation List

Returns API level details of StockLocation List service.

Path: /api/v1/oms/stocklocations/

Query Parameters

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

ParameterData TypeInDescription
tokenstringheaderThe API key of the customer account

Example Request

To get API level details of the service, a GET request should be sent to the /api/v1/oms/stocklocations/ 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/stocklocations/"
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)

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

{
"count": 12,
"next": "https://{domain_url}/api/v1/oms/stocklocations/?page=2",
"previous": null,
"results": [
{
"id": 199,
"stock_location_type": "warehouse",
"address": {
"id": 199,
"mapping": null,
"country": {
"omnitron_id": 1,
"pk": 1,
"name": "Country Name",
"code": "Country Code",
"is_active": true,
"longitude": "35.30207500",
"latitude": "39.05625600"
},
"city": {
"omnitron_id": 7,
"pk": 7,
"name": "city name",
"country": 1,
"is_active": true,
"longitude": "32.85404900",
"latitude": "39.92076300"
},
"township": {
"omnitron_id": 88,
"pk": 68,
"name": "township name",
"city": 7,
"is_active": true,
"longitude": "32.58453600",
"latitude": "39.95817300"
},
"district": {
"omnitron_id": 6426,
"pk": 5305,
"name": "district name",
"city": 7,
"township": 68,
"is_active": true,
"longitude": null,
"latitude": null
},
"title": "Address Title",
"is_active": true,
"line": "address line",
"postcode": null,
"notes": null,
"longitude": "0.20000000",
"latitude": "0.10000000"
},
"engine": 100,
"tags": [],
"created_date": "2023-01-06T11:52:39.635358Z",
"modified_date": "2023-12-11T09:14:24.129494Z",
"omnitron_id": null,
"name": "name",
"is_fulfillment_center": false,
"is_pickup_location": false,
"is_delivery_location": true,
"is_return_available": false,
"is_fast_delivery_available": false,
"is_active": false,
"priority": 1,
"conf": {},
"daytime_phone": null,
"evening_phone": null,
"fax_number": null,
"email": "email@akinon.com",
"target_packing_interval": "5 00:00:00",
"target_transfer_interval": "3 00:00:00",
"erp_code": "erp_code",
"use_as_shipper_location": false,
"quota": 0,
"max_quota": 5
}
]
}

GET StockLocation Detail

Returns API level details of StockLocation Detail service.

Path: /api/v1/oms/stocklocations/<id>

Query Parameters

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

ParameterData TypeInDescription
tokenstringheaderThe API key of the customer account

Example Request

To get API level details of the service, a GET request should be sent to the /api/v1/oms/stocklocations/<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/stocklocations/<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)

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

{
"id": 199,
"stock_location_type": "warehouse",
"address": {
"id": 199,
"mapping": null,
"country": {
"omnitron_id": 1,
"pk": 1,
"name": "Country Name",
"code": "Country Code",
"is_active": true,
"longitude": "35.30207500",
"latitude": "39.05625600"
},
"city": {
"omnitron_id": 7,
"pk": 7,
"name": "city name",
"country": 1,
"is_active": true,
"longitude": "32.85404900",
"latitude": "39.92076300"
},
"township": {
"omnitron_id": 88,
"pk": 68,
"name": "township name",
"city": 7,
"is_active": true,
"longitude": "32.58453600",
"latitude": "39.95817300"
},
"district": {
"omnitron_id": 6426,
"pk": 5305,
"name": "district name",
"city": 7,
"township": 68,
"is_active": true,
"longitude": null,
"latitude": null
},
"title": "Address Title",
"is_active": true,
"line": "address line",
"postcode": null,
"notes": null,
"longitude": "0.20000000",
"latitude": "0.10000000"
},
"engine": 100,
"tags": [],
"created_date": "2023-01-06T11:52:39.635358Z",
"modified_date": "2023-12-11T09:14:24.129494Z",
"omnitron_id": null,
"name": "name",
"is_fulfillment_center": false,
"is_pickup_location": false,
"is_delivery_location": true,
"is_return_available": false,
"is_fast_delivery_available": false,
"is_active": false,
"priority": 1,
"conf": {},
"daytime_phone": null,
"evening_phone": null,
"fax_number": null,
"email": "email@akinon.com",
"target_packing_interval": "5 00:00:00",
"target_transfer_interval": "3 00:00:00",
"erp_code": "erp_code",
"use_as_shipper_location": false,
"quota": 0,
"max_quota": 5
}

POST StockLocation Create

Returns API level details of StockLocation Create service.

Path: /api/v1/oms/stocklocations/

Query Parameters

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

ParameterData TypeInDescription
tokenstringheaderThe API key of the customer account

Example Request

To get API level details of the service, a POST request should be sent to the /api/v1/oms/stocklocations/<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/stocklocations/"
token = "f532eXXXXXXXXXXXXXXXXX201XXXXX9332d"

payload = {
"stock_location_type": "Warehouse",
"address": {
"mapping": {},
"title": "Warehouse Address",
"is_active": True,
"line": "test line.",
"postcode": "",
"notes": "",
"longitude": "11.0000000",
"latitude": "11.0000000",
"country": 1,
"city": 1,
"township": 1,
"district": 1
},
"created_date": "2024-03-20T07:01:19.108556Z",
"modified_date": "2024-03-20T07:01:19.108556Z",
"name": "Inventory Name",
"is_fulfillment_center": True,
"is_pickup_location": True,
"is_delivery_location": True,
"is_return_available": False,
"is_fast_delivery_available": False,
"mapping": {},
"priority": 1,
"conf": {
"foo": "bar"
},
"daytime_phone": "123456",
"evening_phone": "987654",
"fax_number": "",
"email": "foo@bar.com",
"target_packing_interval": "5 00:00:00",
"target_transfer_interval": "3 00:00:00",
"erp_code": "erp_code",
"tags": [],
"max_quota": 100
}
headers = {
'Content-Type': 'application/json',
'Authorization': f'Token {token}'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.json())

Example Response (201 Created)

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

{
"id": 1,
"stock_location_type": "Warehouse",
"address": {
"id": 1,
"township": 1,
"mapping": {},
"title": "Warehouse Address",
"is_active": true,
"line": "test line.",
"postcode": "",
"notes": "",
"longitude": "11.00000000",
"latitude": "11.00000000",
"country": 1,
"city": 1,
"district": 1
},
"engine": null,
"tags": [],
"created_date": "2023-12-26T07:50:05.055342Z",
"modified_date": "2023-12-26T07:50:05.055359Z",
"omnitron_id": null,
"name": "Inventory Name",
"is_fulfillment_center": false,
"is_pickup_location": true,
"is_delivery_location": true,
"is_return_available": false,
"is_fast_delivery_available": false,
"is_active": false,
"priority": 1,
"daytime_phone": "123456",
"evening_phone": "987654",
"fax_number": "",
"email": "foo@bar.com",
"target_packing_interval": "5 00:00:00",
"target_transfer_interval": "3 00:00:00",
"erp_code": "erp_code",
"use_as_shipper_location": false,
"quota": 0,
"max_quota": 100
}

PUT StockLocation Update

Returns API level details of StockLocation Update service.

Path: /api/v1/oms/stocklocations/<id>

Query Parameters

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

ParameterData TypeInDescription
tokenstringheaderThe API key of the customer account

Example Request

To get API level details of the service, a PUT request should be sent to the /api/v1/oms/stocklocations/<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/stocklocations/<id>"
token = "f532eXXXXXXXXXXXXXXXXX201XXXXX9332d"

payload = {
"stock_location_type": "Warehouse",
"address": {
"mapping": {},
"title": "Warehouse Address",
"is_active": True,
"line": "test line.",
"postcode": "",
"notes": "",
"longitude": "11.0000000",
"latitude": "11.0000000",
"country": 1,
"city": 1,
"township": 1,
"district": 1
},
"created_date": "2024-03-20T07:01:19.108556Z",
"modified_date": "2024-03-20T07:01:19.108556Z",
"name": "Inventory Name",
"is_fulfillment_center": True,
"is_pickup_location": True,
"is_delivery_location": True,
"is_return_available": False,
"is_fast_delivery_available": False,
"mapping": {},
"priority": 1,
"conf": {
"foo": "bar"
},
"daytime_phone": "123456",
"evening_phone": "987654",
"fax_number": "",
"email": "foo@bar.com",
"target_packing_interval": "5 00:00:00",
"target_transfer_interval": "3 00:00:00",
"erp_code": "erp_code",
"tags": [],
"max_quota": 100
}
headers = {
'Content-Type': 'application/json',
'Authorization': f'Token {token}'
}

response = requests.request("PUT", url, headers=headers, data=payload)

print(response.json())

Example Response (200 OK)

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

{
"id": 298,
"stock_location_type": "store",
"address": {
"id": 364,
"city": {
"omnitron_id": 1,
"pk": 1,
"name": "name",
"country": 1,
"is_active": true,
"longitude": "35.31945700",
"latitude": "37.00294000"
},
"country": {
"omnitron_id": 1,
"pk": 1,
"name": "Country Name",
"code": "Country Code",
"is_active": true,
"longitude": "35.30207500",
"latitude": "39.05625600"
},
"township": {
"omnitron_id": 15,
"pk": 1,
"name": "name",
"city": 1,
"is_active": true,
"longitude": null,
"latitude": null
},
"district": {
"omnitron_id": 832,
"pk": 1,
"name": "name",
"city": 1,
"township": 1,
"is_active": true,
"longitude": null,
"latitude": null
},
"mapping": {},
"title": "Warehouse Address",
"is_active": true,
"line": "test line.",
"postcode": "",
"notes": "",
"longitude": "11.00000000",
"latitude": "11.00000000"
},
"engine": null,
"tags": [],
"created_date": "2023-12-26T07:50:05.055342Z",
"modified_date": "2023-12-26T07:50:05.055359Z",
"omnitron_id": null,
"name": "Name",
"is_fulfillment_center": false,
"is_pickup_location": true,
"is_delivery_location": true,
"is_return_available": false,
"is_fast_delivery_available": false,
"is_active": false,
"priority": 1,
"conf": {
"foo": "bar"
},
"daytime_phone": "123456",
"evening_phone": "987654",
"fax_number": "",
"email": "foo@bar.com",
"target_packing_interval": "5 00:00:00",
"target_transfer_interval": "3 00:00:00",
"erp_code": "erp_code",
"use_as_shipper_location": false,
"quota": 0,
"max_quota": 0
}

PATCH StockLocation Patch

Returns API level details of StockLocation Patch service.

Path: /api/v1/oms/stocklocations/<id>

Query Parameters

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

ParameterData TypeInDescription
tokenstringheaderThe API key of the customer account

Example Request

To get API level details of the service, a PATCH request should be sent to the /api/v1/oms/stocklocations/<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/stocklocations/<id>"
token = "f532eXXXXXXXXXXXXXXXXX201XXXXX9332d"

payload = {
"stock_location_type": "Warehouse",
"max_quota": 1000,
...
}
headers = {
'Content-Type': 'application/json',
'Authorization': f'Token {token}'
}

response = requests.request("PATCH", url, headers=headers, data=payload)

print(response.json())

Example Response (200 OK)

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

{
"id": 298,
"stock_location_type": "Warehouse",
"address": {
"id": 364,
"township": 1,
"mapping": {},
"title": "Warehouse Address",
"is_active": true,
"line": "test line.",
"postcode": "",
"notes": "",
"longitude": "11.00000000",
"latitude": "11.00000000",
"country": 1,
"city": 1,
"district": 1
},
"engine": null,
"tags": [],
"created_date": "2023-12-26T07:50:05.055342Z",
"modified_date": "2023-12-26T09:45:45.156862Z",
"omnitron_id": null,
"name": "Name",
"is_fulfillment_center": false,
"is_pickup_location": true,
"is_delivery_location": true,
"is_return_available": false,
"is_fast_delivery_available": false,
"is_active": false,
"priority": 1,
"daytime_phone": "123456",
"evening_phone": "987654",
"fax_number": "",
"email": "foo@bar.com",
"target_packing_interval": "5 00:00:00",
"target_transfer_interval": "3 00:00:00",
"erp_code": "erp_code",
"use_as_shipper_location": false,
"quota": 0,
"max_quota": 1000
}