# Stock Location Address Services

All services related to StockLocationAddress are listed in this page.

### `OPTIONS` List StockLocationAddress - Simple

This service is used to retrieve a simple list of data types for Stock Location Address.

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

**Query Parameters**

The following query parameters can be used to get simple information about StockLocationAddress.

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

**Example Request**

To get a simple list of StockLocationAddress, a `OPTIONS` request should be sent to `/api/v1/oms/stock_location_addresses/list-simple/` endpoint. No query parameters or request body are required.

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

```python

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 OK)**

In a successful response with a status code of 200 OK, the API returns a simple list of StockLocationAddress information.

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

```json
{
    "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` List StockLocationAddress

This service used to get a list of the StockLocationAddress.

**Path:** `/api/v1/oms/stock_location_addresses/`

**Query Parameters**

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

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

**Example Request**

To get a list of StockLocationAddress, a `GET` request should be sent to `/api/v1/oms/stock_location_addresses/` endpoint. No query parameter or request body are required.

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

```python
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 OK)**

In a successful response with a status code of 200 OK, the API returns stock\_location\_addresses information.

| Parameter  | Data Type | Description                                    |
| ---------- | --------- | ---------------------------------------------- |
| pk         | integer   | The ID of the s\_location address              |
| name       | string    | The name of the s\_location address            |
| country    | integer   | The country ID of the s\_location address      |
| township   | integer   | The status of the s\_location address          |
| district   | integer   | The district value of the s\_location address  |
| mapping    | json      | The mapping value of the s\_location address   |
| title      | string    | The title value of the s\_location address     |
| is\_active | boolean   | The status of the s\_location address          |
| line       | string    | The line value of the s\_location address      |
| postcode   | string    | The postcode value of the s\_location address  |
| notes      | string    | The notes value of the s\_location address     |
| longitude  | decimal   | The longitude value of the s\_location address |
| latitude   | decimal   | The 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.

```json
{
    "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"
        }
    ]
}
```


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://apidocs.akinon.com/oms/stock-location-address-services-1.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
