#Sites
Entity: site | Scope: landing | Base path: /v1/sites
Legacy entity (UPPER_CASE field names) — field names are automatically converted to camelCase.
#Operations
| Method | Path | Description | Bitrix24 Method |
|---|---|---|---|
GET |
/v1/sites |
List all (with filter, sort, pagination) | landing.site.getList |
GET |
/v1/sites/:id |
Get by ID | landing.site.getList |
POST |
/v1/sites |
Create new | landing.site.add |
PATCH |
/v1/sites/:id |
Update by ID | landing.site.update |
DELETE |
/v1/sites/:id |
Delete by ID | landing.site.delete |
#Fields
| API Name | Bitrix24 Name | Type | Readonly | Description |
|---|---|---|---|---|
id |
ID |
number | yes | Идентификатор записи |
title |
TITLE |
string | ||
code |
CODE |
string | ||
type |
TYPE |
string | ||
active |
ACTIVE |
boolean | ||
domainId |
DOMAIN_ID |
number | ||
createdById |
CREATED_BY_ID |
number | yes | |
dateCreate |
DATE_CREATE |
datetime | yes | |
dateModify |
DATE_MODIFY |
datetime | yes |
#Examples
#List
curl -X GET '/v1/sites?limit=10' \
-H 'X-Api-Key: YOUR_KEY'
#Get by ID
curl -X GET '/v1/sites/123' \
-H 'X-Api-Key: YOUR_KEY'
#Create
curl -X POST '/v1/sites' \
-H 'X-Api-Key: YOUR_KEY' \
-H 'Content-Type: application/json' \
-d '{"title":"value","code":"value","type":"value"}'
#Update
curl -X PATCH '/v1/sites/123' \
-H 'X-Api-Key: YOUR_KEY' \
-H 'Content-Type: application/json' \
-d '{"title":"updated"}'
#Delete
curl -X DELETE '/v1/sites/123' \
-H 'X-Api-Key: YOUR_KEY'
#Batch
curl -X POST '/v1/batch' \
-H 'X-Api-Key: YOUR_KEY' \
-H 'Content-Type: application/json' \
-d '{"calls":[{"entity":"sites","action":"list","params":{"limit":5}}]}'