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

POST /v1/delivery-services

POST /v1/delivery-services

Bitrix24: sale.delivery.add. Scope: delivery.

Creates a record on a handler from handlers. The handler must already exist.

Parameters

Field Type Required
name string yes
currency string yes
description string no
sort integer no
active string no
logo [filename, base64] no
restCode string yes
config object / array no

logo carries a base64 file up to 2 MiB. name must not be empty; PATCH body must not be empty. Fields outside the table are refused rather than dropped. config is a native list of Bitrix24 entries with CODE and VALUE. Key casing is preserved.

restCode is a code from handlers; currency is a currency code such as USD.

Examples

cURL personal key

Terminal
curl -X POST "https://vibecode.bitrix24.com/v1/delivery-services" -H "X-Api-Key: $VIBE_API_KEY" -H 'Content-Type: application/json' -d '{"name": "VIBE-PROBE example", "restCode": "example_handler", "currency": "USD", "active": "N"}'

cURL OAuth

Terminal
curl -X POST "https://vibecode.bitrix24.com/v1/delivery-services" -H "X-Api-Key: $VIBE_API_KEY" -H "Authorization: Bearer $APP_SESSION" -H 'Content-Type: application/json' -d '{"name": "VIBE-PROBE example", "restCode": "example_handler", "currency": "USD", "active": "N"}'

JavaScript personal key

javascript
const response = await fetch("https://vibecode.bitrix24.com/v1/delivery-services", {
  method: "POST",
  headers: {"X-Api-Key": "YOUR_API_KEY", "Content-Type": "application/json"},
  body: JSON.stringify({"name": "VIBE-PROBE example", "restCode": "example_handler", "currency": "USD", "active": "N"}),
});
console.log(await response.json());

JavaScript OAuth

javascript
const response = await fetch("https://vibecode.bitrix24.com/v1/delivery-services", {
  method: "POST",
  headers: {"X-Api-Key": "YOUR_API_KEY", "Authorization": "Bearer YOUR_APP_SESSION", "Content-Type": "application/json"},
  body: JSON.stringify({"name": "VIBE-PROBE example", "restCode": "example_handler", "currency": "USD", "active": "N"}),
});
console.log(await response.json());

Response fields

success is true. data is a record or an array of fields; DELETE returns true. Delivery creation returns parent and profiles. List meta.total equals data length. This example illustrates the shape; record IDs depend on the account.

JSON
{
  "success": true,
  "data": {
    "parent": {
      "id": 10,
      "name": "VIBE-PROBE example",
      "active": "N"
    },
    "profiles": []
  }
}

Errors

HTTP Code Condition
400 INVALID_PARAMS Invalid ID, query or body shape
400 MISSING_REQUIRED_FIELDS Missing required write fields
400 READONLY_FIELD Unsupported write field
400 UNKNOWN_FILTER_FIELD Unknown filter field
400 UNKNOWN_SELECT_FIELD Unknown select field
400 UNKNOWN_SORT_FIELD Unknown sort field
401 TOKEN_MISSING Missing Bitrix24 credentials
403 SCOPE_DENIED Missing delivery scope
403 WRITE_BLOCKED_READONLY_KEY Writing with a readonly key
403 BITRIX_ACCESS_DENIED Bitrix24 refuses access or service ownership
404 ENTITY_NOT_FOUND Missing service
413 PAYLOAD_TOO_LARGE Logo or body size exceeds limit
422 BITRIX_ERROR Bitrix24 business refusal; original text is preserved
502 BITRIX_RESPONSE_INVALID Malformed platform success response

422 for an unknown handler (error shape example):

JSON
{
  "success": false,
  "error": {
    "code": "BITRIX_ERROR",
    "message": "Handler not found"
  }
}

Errors

See also