Skip to main content

Stock Location Address Services

All services related to stock location address are listed in this page.

OPTIONS Stock Location Address List - Simple

This method is used to get the simple list of stock location addresses.

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

Query Parameters

The following query parameters can be used to get the simple list stock location addresses.

ParameterData TypeInDescription
tokenstringheaderThe API key of the customer account

Example Request

To get list of StockLocationAddress list-simple, a OPTIONS request should be sent to /api/v1/oms/stock_location_addresses/list-simple/ endpoint.

This request does not require any query parameters or a request body.

import requests

url = "https://{oms_base_url}/api/v1/oms/stock_location_addresses/list-simple/"
api_token = "f532eXXXXXXXXXXXXXXXXX201XXXXX9332d"

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

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

print(response.json())

Example Response (200)

In a successful response with a status code of `200 OKv, the API will provide a list of stock location address information.

Query Parameters

The following query parameters can be used to get the simple list of stock location addresses.

This example response serves as a reference to understand the structure and data format of stock location address.

{
"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"
},
"mapping": {
"type": "json",
"required": false,
"read_only": false,
"label": "Mapping"
},
"title": {
"type": "string",
"required": false,
"read_only": false,
"label": "Title",
"max_length": 128
},
"is_active": {
"type": "boolean",
"required": false,
"read_only": false,
"label": "Is active"
},
"line": {
"type": "string",
"required": true,
"read_only": false,
"label": "Line of address",
"max_length": 255
},
"postcode": {
"type": "string",
"required": false,
"read_only": false,
"label": "Post/Zip-code",
"max_length": 64
},
"notes": {
"type": "string",
"required": false,
"read_only": false,
"label": "Instructions"
},
"longitude": {
"type": "decimal",
"required": false,
"read_only": false,
"label": "Longitude"
},
"latitude": {
"type": "decimal",
"required": false,
"read_only": false,
"label": "Latitude"
},
"country": {
"type": "pk field",
"required": true,
"read_only": false,
"label": "Country"
},
"city": {
"type": "pk field",
"required": true,
"read_only": false,
"label": "City"
},
"township": {
"type": "pk field",
"required": false,
"read_only": false,
"label": "Township"
},
"district": {
"type": "pk field",
"required": false,
"read_only": false,
"label": "District"
}
}
},
"filters": [
{
"label": "Sort",
"field_name": "sort",
"type": "dropdown",
"lookup_expr": [
"exact"
],
"extra": {
"choices": [
[
"id",
"ID"
],
[
"-id",
"ID (descending)"
]
],
"help_text": "",
"null_label": null,
"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
}
}
]
}

GET Stock Location Address List

This method is used to get a list of the stock location addresses.

Path: /api/v1/oms/stock_location_addresses/

Query Parameters

The following query parameters can be used to get the list of the stock location addresses.

ParameterData TypeInDescription
tokenstringheaderThe API key of the customer account

Example Request

To get the list of the stock location addresses, a GET request should be sent to /api/v1/oms/stock_location_addresses/ endpoint.

This request does not require any query parameters or a request body.


import requests

url = "https://{oms_base_url}/api/v1/oms/stock_location_addresses/"
api_token = "f532eXXXXXXXXXXXXXXXXX201XXXXX9332d"

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

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

print(response.json())

Example Response (200)

In a successful response with a status code of 200 OK, the API will provide a list of stock location addresses information.

ParameterData TypeDescription
pkintegerThe ID of the s_location address
namestringThe name of the s_location address
countryintegerThe country ID of the s_location address
townshipintegerThe status of the s_location address
districtintegerThe district value of the s_location address
mappingjsonThe mapping value of the s_location address
titlestringThe title value of the s_location address
is_activebooleanThe status of the s_location address
linestringThe line value of the s_location address
postcodestringThe postcode value of the s_location address
notesstringThe notes value of the s_location address
longitudedecimalThe longitude value of the s_location address
latitudedecimalThe latitude value of the s_location address

This example response serves as a reference to understand the structure and data format of stock location addresses.

{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"id": 1,
"city": {
"pk": 1,
"name": "Test City 1",
"country": 1,
"is_active": true,
"longitude": null,
"latitude": null
},
"country": {
"pk": 1,
"name": "Test Country",
"code": "tr",
"is_active": true,
"longitude": null,
"latitude": null
},
"township": {
"pk": 1,
"name": "Test Township 1",
"city": 1,
"is_active": true,
"longitude": null,
"latitude": null
},
"district": {
"pk": 1,
"name": "Test District 1",
"city": 1,
"township": 1,
"is_active": true,
"longitude": null,
"latitude": null
},
"mapping": null,
"title": "Shop 1",
"is_active": true,
"line": "Test Address",
"postcode": null,
"notes": null,
"longitude": "00.00000000",
"latitude": "00.00000000"
}
]
}