Calculate Delivery Costs CALCULATE_URL
If you are developing integrations for Bitrix24 using AI tools (Codex, Claude Code, Cursor), connect to the MCP server so that the assistant can utilize the official REST documentation.
The request is sent to the address specified in CALCULATE_URL when creating a delivery handler using the method sale.delivery.handler.add.
Request Parameters
|
Name |
Description |
|
SHIPMENT |
Information about the shipment (detailed description provided below) |
SHIPMENT
|
Name |
Description |
|
Identifier of the shipment. If the calculation is based on an unsaved shipment, the parameter value will be You can obtain shipment identifiers using the sale.shipment.list method |
|
|
DELIVERY_SERVICE |
Information about the selected delivery service, its profile, and settings (detailed description provided below) |
|
PRICE |
Total cost of goods for the client in the shipment |
|
CURRENCY |
Currency code of the cost |
|
WEIGHT |
Total weight of goods in the shipment (in grams) |
|
PROPERTY_VALUES |
Array containing the property values of the shipment (detailed description provided below) |
|
ITEMS |
Array containing all the goods included in the shipment (detailed description provided below) |
|
EXTRA_SERVICE_VALUES |
Array containing a list of necessary additional services selected for delivery (detailed description provided below) |
|
RESPONSIBLE_CONTACT |
Information about the contact person responsible for delivery from Bitrix24 (detailed description provided below) |
|
RECIPIENT_CONTACT |
Information about the recipient's contact person (detailed description provided below) |
DELIVERY_SERVICE
|
Name |
Description |
|
Identifier of the delivery service |
|
|
CONFIG |
Values of the delivery service settings (detailed description provided below) |
|
PARENT |
Information about the parent delivery service (detailed description provided below) |
PARENT
|
Name |
Description |
|
Identifier of the parent delivery service |
|
|
CONFIG |
Values of the parent delivery service settings (detailed description provided below) |
CONFIG
|
Name |
Description |
|
CODE |
Symbolic code of the setting |
|
VALUE |
Value of the setting |
PROPERTY_VALUES
|
Name |
Description |
|
Identifier of the shipment property. You can obtain the identifier of shipment properties using the sale.shipmentproperty.list method |
|
|
TYPE |
Type of the property. Possible values:
|
|
Value of the property. For the |
VALUE
|
Name |
Description |
|
LATITUDE |
Geographic latitude |
|
LONGITUDE |
Geographic longitude |
|
FIELDS |
Detailed information about the delivery address (detailed description provided below) |
FIELDS
|
Name |
Description |
|
POSTAL_CODE |
Postal code |
|
COUNTRY |
Country |
|
ADM_LEVEL_1 |
First-level administrative division unit (e.g., state or region) |
|
ADM_LEVEL_2 |
Second-level administrative division unit (e.g., district) |
|
LOCALITY |
Locality |
|
STREET |
Street |
|
BUILDING |
Building, house number |
|
ADDRESS_LINE_1 |
Address (street, building, house number) |
ITEMS
|
Name |
Description |
|
NAME |
Name of the product |
|
PRICE |
Price of a single item of the product |
|
CURRENCY |
Currency code of the price |
|
WEIGHT |
Weight of a single item of the product |
|
QUANTITY |
Quantity of product units |
|
DIMENSIONS |
Dimensions of the cargo (detailed description provided below) |
DIMENSIONS
|
Name |
Description |
|
LENGTH |
Length of the product (mm) |
|
WIDTH |
Width of the product (mm) |
|
HEIGHT |
Height of the product (mm) |
EXTRA_SERVICE_VALUES
|
Name |
Description |
|
Identifier of the service. You can obtain the identifiers of delivery service extra services using the sale.delivery.extra.service.get method |
|
|
CODE |
Symbolic code of the additional service |
|
VALUE |
Value. Depending on the type (sale_delivery_extra_service.TYPE) of the additional service, the value is formed differently:
|
RESPONSIBLE_CONTACT
|
Name |
Description |
|
NAME |
Full name of the contact |
|
PHONES |
Array containing information about the contact's phone numbers (detailed description provided below) |
RECIPIENT_CONTACT
|
Name |
Description |
|
NAME |
Full name of the contact |
|
PHONES |
Array containing information about the contact's phone numbers (detailed description provided below) |
PHONES
|
Name |
Description |
|
TYPE |
Type of phone. Possible values:
|
|
VALUE |
Phone number |
Example Request
{
"SHIPMENT":{
"ID":4060,
"DELIVERY_SERVICE":{
"ID":225,
"CONFIG":[
{
"CODE":"PROFILE_TYPE",
"VALUE":"CARGO"
}
],
"PARENT":{
"ID":223,
"CONFIG":[
{
"CODE":"SETTING_1",
"VALUE":"String Example Value"
}
]
}
},
"PRICE":179998,
"CURRENCY":"USD",
"WEIGHT":600,
"PROPERTY_VALUES":[
{
"ID":100,
"TYPE":"ADDRESS",
"VALUE":{
"LATITUDE":55.726421,
"LONGITUDE":37.61187,
"FIELDS":{
"COUNTRY":"USA",
"ADM_LEVEL_1":"Los Angeles",
"ADM_LEVEL_2":"Los Angeles",
"ADM_LEVEL_3":"South",
"LOCALITY":"Los Angeles",
"SUB_LOCALITY_LEVEL_1":"Central",
"STREET":"Flowers Street",
"BUILDING":"9",
"ADDRESS_LINE_1":"Flowers Street, 9"
}
}
},
{
"ID":101,
"TYPE":"ADDRESS",
"VALUE":{
"LATITUDE":55.724779,
"LONGITUDE":37.614294,
"FIELDS":{
"POSTAL_CODE":"115162",
"COUNTRY":"USA",
"ADM_LEVEL_1":"Los Angeles",
"ADM_LEVEL_2":"South",
"LOCALITY":"Los Angeles",
"STREET":"Flowers Street",
"BUILDING":"13 b10",
"ADDRESS_LINE_1":"Flowers Street, 13 b10"
}
}
}
],
"ITEMS":[
{
"NAME":"iPhone 14",
"PRICE":89999,
"WEIGHT":300,
"CURRENCY":"USD",
"QUANTITY":2,
"DIMENSIONS":{
"WIDTH":400,
"HEIGHT":80,
"LENGTH":500
}
}
],
"EXTRA_SERVICES_VALUES":[
{
"ID":138,
"CODE":"cargo_type",
"VALUE":"small_package"
},
{
"ID":137,
"CODE":"door_delivery",
"VALUE":"Y"
},
{
"ID":139,
"CODE":"some_quantity_service",
"VALUE":3
}
],
"RESPONSIBLE_CONTACT":{
"NAME":"Ronald Perez",
"PHONES":[
{
"TYPE":"MOBILE",
"VALUE":"+19097996161"
}
]
},
"RECIPIENT_CONTACT":{
"NAME":"James Johnson",
"PHONES":[
{
"TYPE":"WORK",
"VALUE":"+19097996161"
}
]
}
}
}
Response Parameters
Required parameters are marked with *
|
Name |
Description |
|
SUCCESS* |
Indicator of the success of the delivery cost calculation. Possible values:
|
|
PRICE |
Calculated delivery cost in the currency of the delivery service |
|
REASON |
Reason for the error. Provided in case of an unsuccessful cost calculation attempt (detailed description provided below) |
REASON
|
Name |
Description |
|
TEXT* |
Description of the error |
Example Response with Successful Cost Calculation
{
"SUCCESS": "Y",
"PRICE": 79.99
}
Example Response with Error in Cost Calculation
{
"SUCCESS": "N",
"REASON": {
"TEXT": "Delivery is not available for the specified address"
}
}
Continue Learning
- Webhooks for Delivery Operations
- Create Delivery Request CREATE_DELIVERY_REQUEST_URL
- Cancel Delivery Order CANCEL_DELIVERY_REQUEST_URL