For AI agents: markdown of this page — /docs-content-en/entities/warehouses/update.md documentation index — /llms.txt

Update a warehouse

PATCH /v1/warehouses/:id

Updates a warehouse. Pass only the fields you are changing, flat at the root of the JSON. The fields you pass replace the current values; the rest remain unchanged.

Path parameters

Parameter Type Description
Parameterid Typenumber DescriptionWarehouse identifier. List: GET /v1/warehouses

Request fields (body)

Any subset of the warehouse's editable fields — all optional.

Parameter Type Description
Parametertitle Typestring DescriptionWarehouse name
Parameteraddress Typestring DescriptionWarehouse address
Parameteractive Typestring DescriptionActive flag: "Y" / "N"
ParameterissuingCenter Typestring DescriptionOrder pickup point: "Y" / "N"
Parameterdescription Typestring DescriptionWarehouse description
Parameterphone Typestring DescriptionContact phone
Parameteremail Typestring DescriptionContact email
Parameterschedule Typestring DescriptionWorking hours
Parametersort Typenumber DescriptionSort order
Parametercode Typestring DescriptionSymbolic code
ParameterxmlId Typestring DescriptionExternal identifier
ParametergpsN Typenumber DescriptionGeographic latitude
ParametergpsS Typenumber DescriptionGeographic longitude
ParameteruserId Typenumber DescriptionResponsible employee. List: GET /v1/users

Examples

curl — personal key

Terminal
curl -X PATCH "https://vibecode.bitrix24.com/v1/warehouses/1" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Central warehouse",
    "sort": 50
  }'

curl — OAuth application

Terminal
curl -X PATCH "https://vibecode.bitrix24.com/v1/warehouses/1" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Central warehouse",
    "sort": 50
  }'

JavaScript — personal key

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/warehouses/1', {
  method: 'PATCH',
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    title: 'Central warehouse',
    sort: 50,
  }),
})

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

JavaScript — OAuth application

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/warehouses/1', {
  method: 'PATCH',
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    title: 'Central warehouse',
    sort: 50,
  }),
})

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

Response fields

The updated warehouse object is returned in the data field.

Field Type Description
Fielddata.id Typenumber DescriptionWarehouse identifier
Fielddata.title Typestring DescriptionWarehouse name
Fielddata.address Typestring DescriptionWarehouse address
Fielddata.active Typestring DescriptionActive flag: "Y" / "N"
Fielddata.issuingCenter Typestring DescriptionOrder pickup point flag: "Y" / "N"
Fielddata.description Typestring | null DescriptionWarehouse description. null if not set
Fielddata.phone Typestring | null DescriptionContact phone. null if not set
Fielddata.email Typestring | null DescriptionContact email. null if not set
Fielddata.schedule Typestring | null DescriptionWorking hours. null if not set
Fielddata.sort Typenumber DescriptionSort order
Fielddata.code Typestring | null DescriptionSymbolic code. null if not set
Fielddata.xmlId Typestring | null DescriptionExternal identifier. null if not set
Fielddata.gpsN Typenumber | null DescriptionGeographic latitude. null if not set
Fielddata.gpsS Typenumber | null DescriptionGeographic longitude. null if not set
Fielddata.imageId Typeobject | null DescriptionWarehouse image: { "id", "url" } or null
Fielddata.userId Typenumber | null DescriptionResponsible employee — identifier from GET /v1/users. null for system warehouses
Fielddata.modifiedBy Typenumber DescriptionIdentifier of the user from GET /v1/users who last modified the warehouse. After an update, this is the user the API key was issued for
Fielddata.dateCreate Typedatetime | null DescriptionCreation date. null for some system warehouses, for example marketplaces
Fielddata.dateModify Typedatetime DescriptionLast modification date

Response example

JSON
{
  "success": true,
  "data": {
    "id": 1,
    "title": "Central warehouse",
    "address": "1 Harbour Street, Amsterdam",
    "active": "Y",
    "issuingCenter": "N",
    "description": "Central warehouse",
    "phone": "+12025550123",
    "email": "warehouse@example.com",
    "schedule": "Mon–Fri 9:00–20:00",
    "sort": 50,
    "code": "main",
    "xmlId": null,
    "gpsN": 52.377956,
    "gpsS": 4.897070,
    "imageId": null,
    "userId": 1,
    "modifiedBy": 1,
    "dateCreate": "2024-01-15T09:00:00+00:00",
    "dateModify": "2026-06-02T12:04:25+00:00"
  }
}

Error response example

404 — a warehouse with this id does not exist:

JSON
{
  "success": false,
  "error": {
    "code": "ENTITY_NOT_FOUND",
    "message": "store does not exist."
  }
}

Errors

HTTP Code Description
HTTP400 CodeINVALID_PARAMS Descriptionid is not a canonical positive integer: 12.5, 12abc, 1e2, 007 are rejected before Bitrix24 is called
HTTP401 CodeTOKEN_MISSING DescriptionThe API key has no configured tokens
HTTP403 CodeSCOPE_DENIED DescriptionThe API key does not have the catalog scope
HTTP404 CodeENTITY_NOT_FOUND DescriptionA warehouse with the specified id does not exist

The full list of common API errors — Errors.

Known specifics

A nonexistent warehouse is 404. Updating a warehouse by an unknown id returns 404 with the code ENTITY_NOT_FOUND. The message field still carries the Bitrix24 text store does not exist..

See also