Variables

Variable list

GET https://app.hightouch.ai/api/store/custom_fields/

Query Parameters

NameTypeDescription

shop_id

integer

ID магазина

limit

integer

Кол-во записей (макс. 100)

offset

integer

Сдвиг по записям

search

string

Строка поиска по названию или ID переменной

{
  "status": "ok",
  "result": {
    "count": 42,
    "next": null,
    "previous": null,
    "results": [
      {
        "id": 577,
        "shop_id": 2,
        "name": "about",
        "dtype": {
          "id": "text",
          "name": "Текст"
        },
        "description": null
      },
      ...
    ]
  }
}

Add new variable

POST https://app.hightouch.ai/api/store/custom_fields/

Variables include the following types: text - the line; number - integer or fractional number; bool - Boolean type ("Yes/No"); image - saves the URL of the picture; json - saves a JSON object of any structure;

Request Body

NameTypeDescription

shop_id

integer

ID магазина

name

string

Название переменной (латиницей)

dtype

object

Тип данных. Например, {"id": "number"}

description

string

Описание переменной

{
  "status": "ok",
  "result": {
    "id": 758,
    "shop_id": 2,
    "name": "my_new_var",
    "dtype": {
      "id": "number",
      "name": "Число"
    },
    "description": "Новая переменная"
  }
}

Change a variable

PATCH https://app.hightouch.ai/api/store/custom_fields/:id/

Path Parameters

NameTypeDescription

id

integer

Variable ID

Request Body

NameTypeDescription

shop_id

integer

Store ID

name

string

New name of the variable

description

string

New description of the variable

 {
  "status": "ok",
  "result": {
    "id": 758,
    "shop_id": 2,
    "name": "my_new_var",
    "dtype": {
      "id": "number",
      "name": "Число"
    },
    "description": "Новая переменная"
  }
}

Delete a variable

DELETE https://app.hightouch.ai/api/store/custom_fields/:id/

Path Parameters

NameTypeDescription

id

integer

Variable ID

Last updated