# UI Settings Services

All services related to UI settings are listed in this page.

### `GET` List UI Settings

This service is used to list all UI settings with detailed information.

**Path:** `/api/v1/ui_settings/`

**Query Parameters**

This is a read-only service, and no query parameters are required.

**Example Request**

To get a list of all UI settings, a `GET` request should be sent to the `/api/v1/ui_settings/` endpoint.

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

```python
import requests

url = "https://{instore_url}/api/v1/ui_settings/"

response = requests.request('GET', url)
print(response.json())
```

**Example Response (200 OK)**

In a successful response with a status code of 200 OK, the API returns all the UI settings. The response body contains a `JSON` object with the attributes such as ID, key, value, label, data type etc.

These attributes are described in the following table.

| Parameter        | Data Type | Description                          |
| ---------------- | --------- | ------------------------------------ |
| id               | integer   | The ID of the UI setting             |
| key              | string    | The key info of the UI setting       |
| value            | string    | The value info of the UI setting     |
| label            | string    | The label info of the UI setting     |
| tag              | string    | The tag info of the UI setting       |
| data\_type       | string    | The data type info of the UI setting |
| is\_active       | boolean   | The status info of the UI settings   |
| created\_date    | date      | The creation date                    |
| modified\_date   | date      | The last modified date               |
| translations     | dict      | The translations of UI setting       |
| additional\_info | dict      | The extra information for UI setting |

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

```json
{
  "count": 29,
  "next": "https://{instore_url}/api/v1/ui_settings/?page=2",
  "previous": null,
  "results": [
    {
      "id": 30,
      "data_type": "Color",
      "created_date": "2022-06-23T18:29:15.760382Z",
      "modified_date": "2023-03-03T13:50:19.101578Z",
      "translations": {
        "tr-tr": {
          "label": "Secondary Color"
        }
      },
      "key": "acc_secondary_color_key",
      "value": "#000",
      "label": "Secondary Color",
      "tag": "acc_app_settings",
      "is_active": true,
      "additional_info": {}
    },
    {
      "id": 29,
      "data_type": "Boolean",
      "created_date": "2022-06-23T18:29:15.726566Z",
      "modified_date": "2022-06-23T18:29:15.726595Z",
      "translations": null,
      "key": "config_has_coupon",
      "value": true,
      "label": "Show Discount Code Field in Basket",
      "tag": "acc_config_setting",
      "is_active": true,
      "additional_info": {}
    },
    {
      "id": 28,
      "data_type": "Boolean",
      "created_date": "2022-06-23T18:29:15.716923Z",
      "modified_date": "2022-06-23T18:29:15.716953Z",
      "translations": null,
      "key": "config_has_delivery_from_store",
      "value": false,
      "label": "Show Delivery From Store Field in Adress Section",
      "tag": "acc_config_setting",
      "is_active": true,
      "additional_info": {}
    },
    {
      "id": 27,
      "data_type": "Boolean",
      "created_date": "2022-06-23T18:29:15.687617Z",
      "modified_date": "2022-06-23T18:29:15.687648Z",
      "translations": null,
      "key": "config_has_installment_option",
      "value": false,
      "label": "Show Installment Option in Payment Section",
      "tag": "acc_config_setting",
      "is_active": true,
      "additional_info": {}
    },
    {
      "id": 26,
      "data_type": "Json",
      "created_date": "2022-06-23T18:29:15.632910Z",
      "modified_date": "2022-06-23T18:29:15.632940Z",
      "translations": null,
      "key": "config_gift_box",
      "value": {
        "title": "",
        "description": ""
      },
      "label": "Show Gift Box Selection Field in Adress Section",
      "tag": "acc_config_setting",
      "is_active": true,
      "additional_info": {}
    },
    {
      "id": 25,
      "data_type": "Boolean",
      "created_date": "2022-06-23T18:29:15.624261Z",
      "modified_date": "2022-06-23T18:29:15.624293Z",
      "translations": null,
      "key": "config_has_order_filter",
      "value": false,
      "label": "Customer Search with Order Number",
      "tag": "acc_config_setting",
      "is_active": true,
      "additional_info": {}
    },
    {
      "id": 24,
      "data_type": "Boolean",
      "created_date": "2022-06-23T18:29:15.586179Z",
      "modified_date": "2022-06-23T18:29:15.586208Z",
      "translations": null,
      "key": "config_has_last_name_filter",
      "value": true,
      "label": "Customer Search with Last Name",
      "tag": "acc_config_setting",
      "is_active": true,
      "additional_info": {}
    },
    {
      "id": 23,
      "data_type": "Boolean",
      "created_date": "2022-06-23T18:29:15.568391Z",
      "modified_date": "2022-06-23T18:29:15.568424Z",
      "translations": null,
      "key": "config_has_first_name_filter",
      "value": true,
      "label": "Customer Seacth with Name",
      "tag": "acc_config_setting",
      "is_active": true,
      "additional_info": {}
    },
    {
      "id": 22,
      "data_type": "Boolean",
      "created_date": "2022-06-23T18:29:15.474995Z",
      "modified_date": "2022-06-23T18:29:15.475026Z",
      "translations": null,
      "key": "config_has_phone_filter",
      "value": true,
      "label": "Customer Search with Phone Number",
      "tag": "acc_config_setting",
      "is_active": true,
      "additional_info": {}
    },
    {
      "id": 21,
      "data_type": "Boolean",
      "created_date": "2022-06-23T18:29:15.441889Z",
      "modified_date": "2022-06-23T18:29:15.441918Z",
      "translations": null,
      "key": "config_has_email_filter",
      "value": true,
      "label": "Customer Search with Email",
      "tag": "acc_config_setting",
      "is_active": true,
      "additional_info": {}
    },
    {
      "id": 20,
      "data_type": "Boolean",
      "created_date": "2022-06-23T18:29:15.433407Z",
      "modified_date": "2022-06-23T18:29:15.433437Z",
      "translations": null,
      "key": "config_print_order_detail",
      "value": true,
      "label": "Show Print Action in Packaging Orders",
      "tag": "acc_config_setting",
      "is_active": true,
      "additional_info": {}
    },
    {
      "id": 19,
      "data_type": "Boolean",
      "created_date": "2022-06-23T18:29:15.383502Z",
      "modified_date": "2022-06-23T18:29:15.383535Z",
      "translations": null,
      "key": "config_has_remote_id",
      "value": false,
      "label": "Show Remote Id on Retail Store Screen",
      "tag": "acc_config_setting",
      "is_active": true,
      "additional_info": {}
    },
    {
      "id": 18,
      "data_type": "Boolean",
      "created_date": "2022-06-23T18:29:15.327133Z",
      "modified_date": "2022-06-23T18:29:15.327168Z",
      "translations": null,
      "key": "config_barcode_send_sms",
      "value": false,
      "label": "Show \"Send SMS\" area on Pay with Barcode option",
      "tag": "acc_config_setting",
      "is_active": true,
      "additional_info": {}
    },
    {
      "id": 17,
      "data_type": "Boolean",
      "created_date": "2022-06-23T18:29:15.286526Z",
      "modified_date": "2022-06-23T18:29:15.286557Z",
      "translations": null,
      "key": "acc_pay_with_qr",
      "value": true,
      "label": "Pay with QR",
      "tag": "acc_payment",
      "is_active": true,
      "additional_info": {}
    },
    {
      "id": 16,
      "data_type": "Boolean",
      "created_date": "2022-06-23T18:29:15.147249Z",
      "modified_date": "2022-06-23T18:29:15.147289Z",
      "translations": null,
      "key": "acc_pay_with_barcode",
      "value": false,
      "label": "Pay with barcode",
      "tag": "acc_payment",
      "is_active": true,
      "additional_info": {}
    },
    {
      "id": 15,
      "data_type": "Boolean",
      "created_date": "2022-06-23T18:29:15.136875Z",
      "modified_date": "2022-06-23T18:29:15.136905Z",
      "translations": null,
      "key": "config_sms_active",
      "value": false,
      "label": "Send SMS when signing up",
      "tag": "acc_config_setting",
      "is_active": true,
      "additional_info": {}
    },
    {
      "id": 14,
      "data_type": "Boolean",
      "created_date": "2022-06-23T18:29:15.106177Z",
      "modified_date": "2022-06-23T18:29:15.106206Z",
      "translations": null,
      "key": "menu_change_sales_advisor",
      "value": false,
      "label": "CHANGE SALES ADVISOR",
      "tag": "acc_menu",
      "is_active": true,
      "additional_info": {}
    },
    {
      "id": 13,
      "data_type": "Boolean",
      "created_date": "2022-06-23T18:29:15.015323Z",
      "modified_date": "2022-06-23T18:29:15.015353Z",
      "translations": null,
      "key": "menu_new_customer",
      "value": false,
      "label": "NEW CUSTOMER",
      "tag": "acc_menu",
      "is_active": true,
      "additional_info": {}
    },
    {
      "id": 12,
      "data_type": "Boolean",
      "created_date": "2022-06-23T18:29:15.000207Z",
      "modified_date": "2022-06-23T18:29:15.000237Z",
      "translations": null,
      "key": "menu_live_commerce",
      "value": false,
      "label": "LIVE COMMERCE",
      "tag": "acc_menu",
      "is_active": false,
      "additional_info": {}
    },
    {
      "id": 11,
      "data_type": "Boolean",
      "created_date": "2022-06-23T18:29:14.956289Z",
      "modified_date": "2022-06-23T18:29:14.956321Z",
      "translations": null,
      "key": "menu_package_order_list_distribution",
      "value": false,
      "label": "DISTRIBUTION ORDERS",
      "tag": "acc_menu",
      "is_active": false,
      "additional_info": {}
    }
  ]
}
```

### `GET` Retrieve Single UI Setting Detail

This service is used to retrieve information about a single UI setting with a specific ID.

**Path:** `/api/v1/ui_settings/{id}/`

**Query Parameters**

This is a read-only service, and no query parameters are required.

**Example Request**

To retrieve detailed information about specific UI setting, a `GET` request should be sent to the `/api/v1/ui_settings/{id}/` endpoint.

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

```python
import requests

url = "https://{instore_url}/api/v1/ui_settings/{id}/"

response = requests.request('GET', url)
print(response.json())
```

**Example Response (200 OK)**

In a successful response with a status code of 200 OK, the API returns the detailed information about specific UI setting. The response body contains a `JSON` object with the attributes such as ID, key, value, label, data type etc.

These attributes are described in the following table.

| Parameter        | Data Type | Description                          |
| ---------------- | --------- | ------------------------------------ |
| id               | integer   | The ID of the UI setting             |
| key              | string    | The key info of the UI setting       |
| value            | string    | The value info of the UI setting     |
| label            | string    | The label info of the UI setting     |
| tag              | string    | The tag info of the UI setting       |
| data\_type       | string    | The data type info of the UI setting |
| is\_active       | boolean   | The status info of the UI settings   |
| created\_date    | date      | The creation date                    |
| modified\_date   | date      | The last modified date               |
| translations     | dict      | The translations of UI setting       |
| additional\_info | dict      | The extra information for UI setting |

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

```json
{
  "id": 30,
  "data_type": "Color",
  "created_date": "2022-06-23T18:29:15.760382Z",
  "modified_date": "2023-03-03T13:50:19.101578Z",
  "translations": {
    "tr-tr": {
      "label": "Secondary Color"
    }
  },
  "key": "acc_secondary_color_key",
  "value": "#000",
  "label": "Secondary Color",
  "tag": "acc_app_settings",
  "is_active": true,
  "additional_info": {}
}
```

### `POST` Create UI Setting

This service is used to create a new UI setting with the request body.

**Path:** `/api/v1/ui_settings/`

**Request Body**

The following request body parameters can be used to create an UI setting object.

| Parameter  | Data Type | In     | Description                          |
| ---------- | --------- | ------ | ------------------------------------ |
| token      | string    | header | The API key of the customer account  |
| data\_type | string    | body   | The data type info of the UI setting |
| key        | string    | body   | The key info of the UI setting       |
| label      | string    | body   | The label info of the UI setting     |
| tag        | string    | body   | The tag info of the UI setting       |
| is\_active | boolean   | body   | The status info of the UI settings   |
| value      | string    | body   | The value info of the UI setting     |

**Example Request**

To create a new UI setting, a `POST` request should be sent to the `/api/v1/ui_settings/` endpoint.

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

```python
import requests
import json

url = "https://{instore_url}/api/v1/ui_settings/"
token = "f532eXXXXXXXXXXXXXXXXX201XXXXX9332d"

payload = json.dumps({
    "data_type": "Color",
    "key": "test_color_key",
    "label": "Test Color",
    "tag": "test_app_settings",
    "is_active": true,
    "value": "#000"
})

headers = {
    'Content-Type': 'application/json',
    'Authorization': 'Token {}'.format(token)
}

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

print(response.text)
```

**Example Response (201 Created)**

In a successful response with a status code of 201 Created, the API indicates that a new UI setting has been successfully created. The response includes the appropriate content-type specified in the response headers, typically application/json. The response body contains a JSON object representing the newly created UI setting, including its unique ID and any additional information provided during the creation process.

| Parameter        | Data Type | Description                          |
| ---------------- | --------- | ------------------------------------ |
| id               | integer   | The ID of the UI setting             |
| key              | string    | The key info of the UI setting       |
| value            | string    | The value info of the UI setting     |
| label            | string    | The label info of the UI setting     |
| tag              | string    | The tag info of the UI setting       |
| data\_type       | string    | The data type info of the UI setting |
| is\_active       | boolean   | The status info of the UI settings   |
| created\_date    | date      | The creation date                    |
| modified\_date   | date      | The last modified date               |
| translations     | dict      | The translations of UI setting       |
| additional\_info | dict      | The extra information for UI setting |

This example response serves as a reference to understand the structure and data format returned when a new UI setting is created successfully.

```json
{
  "id": 30,
  "data_type": "Color",
  "created_date": "2022-06-23T18:29:15.760382Z",
  "modified_date": "2023-03-03T13:50:19.101578Z",
  "translations": {
    "tr-tr": {
      "label": "Secondary Color"
    }
  },
  "key": "acc_secondary_color_key",
  "value": "#000",
  "label": "Secondary Color",
  "tag": "acc_app_settings",
  "is_active": true,
  "additional_info": {}
}
```

**Example Response (400 Bad Request)**

In an unsuccessful response with a status code of 400 Bad Request, the API indicates that the request could not be processed due to client error. The response body contains a JSON object that provides additional information about the error, including an error message or validation errors.

This example response serves as a reference to understand the structure and data format returned when a request fails due to client error.

```json
{
  "error": {
    "key": [
      "This field is required."
    ],
    "label": [
      "This field is required."
    ]
  },
  "status_code": 400
}
```

### `PUT` Update UI Setting

This service is used to update an UI setting with the request body.

**Path:** `/api/v1/ui_settings/{id}/`

**Request Body**

The following request body parameters can be used to update an UI setting object. It is necessary to include all the fields, even if some of them will not be updated, in the request body.

| Parameter  | Data Type | In     | Description                          |
| ---------- | --------- | ------ | ------------------------------------ |
| token      | string    | header | The API key of the customer account  |
| data\_type | string    | body   | new data type info of the UI setting |
| key        | string    | body   | new key info of the UI setting       |
| label      | string    | body   | new label info of the UI setting     |
| tag        | string    | body   | new tag info of the UI setting       |
| is\_active | boolean   | body   | new status info of the UI settings   |
| value      | string    | body   | new value info of the UI setting     |

**Example Request**

To update an UI settings, a `PUT` request should be sent to the `/api/v1/ui_settings/{id}/` endpoint.

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

```python
import requests
import json

url = "https://{instore_url}/api/v1/ui_settings/{id}/"
token = "f532eXXXXXXXXXXXXXXXXX201XXXXX9332d"

payload = json.dumps({
    "data_type": "Color",
    "key": "test_color_key",
    "label": "Test Color",
    "tag": "test_app_settings",
    "is_active": true,
    "value": "#000"
})

headers = {
    'Content-Type': 'application/json',
    'Authorization': 'Token {}'.format(token)
}

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

print(response.text)
```

**Example Response (200 OK)**

In a successful response with a status code of 200 OK, the API indicates that an UI setting has been successfully updated. The response body contains a JSON object representing the updated UI setting, including its unique ID and any additional information provided during the update process.

| Parameter        | Data Type | Description                              |
| ---------------- | --------- | ---------------------------------------- |
| id               | integer   | The ID of the UI setting                 |
| key              | string    | updated key info of the UI setting       |
| value            | string    | updated value info of the UI setting     |
| label            | string    | updated label info of the UI setting     |
| tag              | string    | updated tag info of the UI setting       |
| data\_type       | string    | updated data type info of the UI setting |
| is\_active       | boolean   | updated status info of the UI settings   |
| created\_date    | date      | updated creation date                    |
| modified\_date   | date      | updated last modified date               |
| translations     | dict      | updated translations of UI setting       |
| additional\_info | dict      | updated extra information for UI setting |

This example response serves as a reference to understand the structure and data format returned when an UI setting is updated successfully.

```json
{
  "id": 30,
  "data_type": "Color",
  "created_date": "2022-06-23T18:29:15.760382Z",
  "modified_date": "2023-03-03T13:50:19.101578Z",
  "translations": {
    "tr-tr": {
      "label": "Secondary Color"
    }
  },
  "key": "acc_secondary_color_key",
  "value": "#000",
  "label": "Secondary Color",
  "tag": "acc_app_settings",
  "is_active": true,
  "additional_info": {}
}
```

### `PATCH` Partial Update UI Setting

This service is used to update an UI setting partially with the request body.

**Path:** `/api/v1/ui_settings/{id}/`

**Request Body**

The following request body parameters can be used to update an UI setting object. Only the field will be updated should be sent in the request body.

As an example, the `key` field has been updated in the rest of the document.

| Parameter | Data Type | In     | Description                         |
| --------- | --------- | ------ | ----------------------------------- |
| token     | string    | header | The API key of the customer account |
| key       | string    | body   | new key info of the UI setting      |

**Example Request**

To update the `key` field of UI setting, a `PATCH` request should be sent to the `/api/v1/ui_settings/{id}/` endpoint.

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

```python
import requests
import json

url = "https://{instore_url}/api/v1/ui_settings/{id}/"
token = "f532eXXXXXXXXXXXXXXXXX201XXXXX9332d"

payload = json.dumps({
    "key": "test_color_key"
})

headers = {
    'Content-Type': 'application/json',
    'Authorization': 'Token {}'.format(token)
}

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

print(response.text)
```

**Example Response (200 OK)**

In a successful response with a status code of 200 OK, the API indicates that an the `key` field has been successfully updated. The response body contains a JSON object representing the updated UI setting, including its unique ID and any additional information provided during the update process.

| Parameter        | Data Type | Description                              |
| ---------------- | --------- | ---------------------------------------- |
| id               | integer   | The ID of the UI setting                 |
| key              | string    | updated key info of the UI setting       |
| value            | string    | updated value info of the UI setting     |
| label            | string    | updated label info of the UI setting     |
| tag              | string    | updated tag info of the UI setting       |
| data\_type       | string    | updated data type info of the UI setting |
| is\_active       | boolean   | updated status info of the UI settings   |
| created\_date    | date      | updated creation date                    |
| modified\_date   | date      | updated last modified date               |
| translations     | dict      | updated translations of UI setting       |
| additional\_info | dict      | updated extra information for UI setting |

This example response serves as a reference to understand the structure and data format returned when the UI setting is updated successfully.

```json
{
  "id": 30,
  "data_type": "Color",
  "created_date": "2022-06-23T18:29:15.760382Z",
  "modified_date": "2023-03-03T13:50:19.101578Z",
  "translations": {
    "tr-tr": {
      "label": "Secondary Color"
    }
  },
  "key": "acc_secondary_color_key",
  "value": "#000",
  "label": "Secondary Color",
  "tag": "acc_app_settings",
  "is_active": true,
  "additional_info": {}
}
```

### `DELETE` Delete UI Setting

This service is used to delete an UI setting with a specific ID.

**Path:** `/api/v1/ui_settings/{id}/`

**Request Body**

The following request body parameters can be used to delete an UI setting object.

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

**Example Request**

To delete an UI settings, a `DELETE` request should be sent to the `/api/v1/ui_settings/{id}/` endpoint.

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

```python
import requests
import json

url = "https://{instore_url}/api/v1/ui_settings/{id}/"
token = "f532eXXXXXXXXXXXXXXXXX201XXXXX9332d"

headers = {
    'Content-Type': 'application/json',
    'Authorization': 'Token {}'.format(token)
}

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

print(response.text)
```

**Example Response (204 No Content)**

In a successful response with a status code of 204 No Content, the API returns no content. Response body does not contain any text or object.


---

# 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/ui-settings-services.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.
