لوكلاء AI: ملف markdown لهذه الصفحة — /docs-content-en/entities/warehouses.md فهرس التوثيق — /llms.txt

مقالات التوثيق متاحة حاليًا باللغة الإنجليزية فقط.

Warehouses

Bitrix24 account warehouses and product stock in them. A warehouse is a point where catalog products are stored or handed out: a physical warehouse, a store, or a pickup point. Warehouses can be created, updated, and deleted. Stock is read-only — for a single warehouse or aggregated across all warehouses.

Bitrix24 API: catalog.store.*, catalog.storeproduct.* Scope: catalog

Create a warehouse

POST /v1/warehouses

Creates a new warehouse. Fields are passed flat at the root of the JSON — without a fields wrapper.

Request fields (body)

Parameter Type Required Description
Parametertitle Typestring Requiredyes DescriptionWarehouse name
Parameteraddress Typestring Requiredyes DescriptionWarehouse address
Parameteractive Typestring Requiredno DescriptionActive flag: "Y" / "N". Defaults to "Y"
ParameterissuingCenter Typestring Requiredno DescriptionOrder pickup point: "Y" / "N". Defaults to "N"
Parameterdescription Typestring Requiredno DescriptionWarehouse description
Parameterphone Typestring Requiredno DescriptionContact phone
Parameteremail Typestring Requiredno DescriptionContact email
Parameterschedule Typestring Requiredno DescriptionWorking hours — free-form text
Parametersort Typenumber Requiredno DescriptionSort order. Defaults to 100
Parametercode Typestring Requiredno DescriptionSymbolic code
ParameterxmlId Typestring Requiredno DescriptionExternal identifier for syncing
ParametergpsN Typenumber Requiredno DescriptionGeographic latitude
ParametergpsS Typenumber Requiredno DescriptionGeographic longitude
ParameteruserId Typenumber Requiredno DescriptionResponsible employee — identifier from GET /v1/users

Examples

curl — personal key

Terminal
curl -X POST "https://vibecode.bitrix24.com/v1/warehouses" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Main warehouse",
    "address": "1 Harbour Street, Amsterdam",
    "active": "Y"
  }'

curl — OAuth application

Terminal
curl -X POST "https://vibecode.bitrix24.com/v1/warehouses" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Main warehouse",
    "address": "1 Harbour Street, Amsterdam",
    "active": "Y"
  }'

JavaScript — personal key

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/warehouses', {
  method: 'POST',
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    title: 'Main warehouse',
    address: '1 Harbour Street, Amsterdam',
    active: 'Y',
  }),
})

const { success, data } = await res.json()
console.log('Warehouse ID:', data.id)

JavaScript — OAuth application

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/warehouses', {
  method: 'POST',
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    title: 'Main warehouse',
    address: '1 Harbour Street, Amsterdam',
    active: 'Y',
  }),
})

const { success, data } = await res.json()

Response fields

The created warehouse object is returned in the data field.

Field Type Description
Fieldid Typenumber DescriptionWarehouse identifier
Fieldtitle Typestring DescriptionWarehouse name
Fieldaddress Typestring DescriptionWarehouse address
Fieldactive Typestring DescriptionActive flag: "Y" / "N"
FieldissuingCenter Typestring DescriptionOrder pickup point flag: "Y" / "N"
Fielddescription Typestring | null DescriptionWarehouse description. null if not set
Fieldphone Typestring | null DescriptionContact phone. null if not set
Fieldemail Typestring | null DescriptionContact email. null if not set
Fieldschedule Typestring | null DescriptionWorking hours. null if not set
Fieldsort Typenumber DescriptionSort order
Fieldcode Typestring | null DescriptionSymbolic code. null if not set
FieldxmlId Typestring | null DescriptionExternal identifier. null if not set
FieldgpsN Typenumber | null DescriptionGeographic latitude. null if not set
FieldgpsS Typenumber | null DescriptionGeographic longitude. null if not set
FieldimageId Typeobject | null DescriptionWarehouse image: { "id", "url" } or null
FielduserId Typenumber DescriptionResponsible employee
FieldmodifiedBy Typenumber DescriptionIdentifier of the user who last modified the warehouse
FielddateCreate Typedatetime DescriptionCreation date
FielddateModify Typedatetime DescriptionLast modification date

Response example

JSON
{
  "success": true,
  "data": {
    "id": 25,
    "title": "Main warehouse",
    "address": "1 Harbour Street, Amsterdam",
    "active": "Y",
    "issuingCenter": "N",
    "description": null,
    "phone": null,
    "email": null,
    "schedule": null,
    "sort": 100,
    "code": null,
    "xmlId": null,
    "gpsN": null,
    "gpsS": null,
    "imageId": null,
    "userId": 1,
    "modifiedBy": 1,
    "dateCreate": "2026-06-02T12:04:24+00:00",
    "dateModify": "2026-06-02T12:04:24+00:00"
  }
}

Error response example

400 — a required field was not provided:

JSON
{
  "success": false,
  "error": {
    "code": "MISSING_PARAMS",
    "message": "Required: title (string), address (string)"
  }
}

Errors

HTTP Code Description
HTTP400 CodeMISSING_PARAMS Descriptiontitle or address was not provided
HTTP400 CodeINVALID_PARAMS Descriptiontitle or address is not a string
HTTP401 CodeTOKEN_MISSING DescriptionThe API key has no configured tokens
HTTP403 CodeSCOPE_DENIED DescriptionThe API key does not have the catalog scope
HTTP422 CodeBITRIX_ERROR DescriptionBitrix24 rejected the creation (for example, an invalid field value)

The full list of common API errors — Errors.

Known specifics

Default values. If active, sort, and issuingCenter are not provided, the warehouse is created with the values active: "Y", sort: 100, issuingCenter: "N". The userId and modifiedBy fields in the response are set to the user the API key was issued for.

See also