---
sidebar_position: 5
description: Register delivery appointment and other functions to work with CDEK in the Open Integration Package, a free open-source integration library for 1C:Enterprise 8, OneScript and CLI
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, CDEK]
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# Register delivery appointment
 Fixes the delivery date, time and address agreed with the customer



`Function RegisterDeliveryAppointment(Val Token, Val Appointment, Val TestAPI = False) Export`

  | Parameter | CLI option | Type | Required | Description |
  |-|-|-|-|-|
  | Token | --token | String | &#x2714; | Auth token |
  | Appointment | --appt | Structure Of KeyAndValue | &#x2714; | Appointment description. See GetAppointmentDescription |
  | TestAPI | --testapi | Boolean | &#x2716; | Flag to use test API for requests |

  
  Returns:  Map Of KeyAndValue - serialized JSON response from CDEK

:::tip
Method at API documentation: [Registration of delivery appointment](https://api-docs.cdek.ru/36989576.html)
:::
<br/>


```bsl title="1C:Enterprise/OneScript code example"
    Token     = "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9. ...";
    OrderUUID = "50fbb719-69d4-4ded-93ca-ff7d005c9fae";

    Day          = 60 * 60 * 24;
    CurrentDate  = BegOfDay(OPI_Tools.GetCurrentDate());
    DeliveryDate = CurrentDate + Day * 14;

    While DayOfWeek(DeliveryDate) > 5 Do
        DeliveryDate = DeliveryDate + Day;
    EndDo;

    Appointment = New Structure;

    Appointment.Insert("cdek_number", "1106207236");
    Appointment.Insert("order_uuid" , OrderUUID);
    Appointment.Insert("date"       , Format(DeliveryDate, "DF=yyyy-MM-dd"));
    Appointment.Insert("time_from"  , "10:00");
    Appointment.Insert("time_to"    , "17:00");
    Appointment.Insert("comment"    , "Group office");

    DeliveryLocation = New Structure;
    DeliveryLocation.Insert("code"        , "270");
    DeliveryLocation.Insert("fias_guid"   , "0c5b2444-70a0-4932-980c-b4dc0d3f02b5");
    DeliveryLocation.Insert("postal_code" , "109004");
    DeliveryLocation.Insert("longitude"   , 37.6204);
    DeliveryLocation.Insert("latitude"    , 55.754);
    DeliveryLocation.Insert("country_code", "RU");
    DeliveryLocation.Insert("region"      , "Novosibirsk");
    DeliveryLocation.Insert("sub_region"  , "Novosibirsk");
    DeliveryLocation.Insert("city"        , "Novosibirsk");
    DeliveryLocation.Insert("kladr_code"  , "7700000000000");
    DeliveryLocation.Insert("address"     , "st. Bluchera, 33");

    Appointment.Insert("to_location", DeliveryLocation);

    Result = OPI_CDEK.RegisterDeliveryAppointment(Token, Appointment, True);
```
 

 <Tabs>
  
    <TabItem value="bash" label="Bash" default>
        ```bash
            # JSON data can also be passed as a path to a .json file
            
            oint cdek RegisterDeliveryAppointment \
             --token "***" \
             --appt "{'cdek_number':'1106207236','order_uuid':'0387cdd8-1d6f-4906-ab7d-713f1f1b7544','date':'2025-11-13','time_from':'10:00','time_to':'17:00','comment':'Group office','to_location':{'code':'270','fias_guid':'0c5b2444-70a0-4932-980c-b4dc0d3f02b5','postal_code':'109004','longitude':'37.6204','latitude':'55.754','country_code':'RU','region':'Novosibirsk','sub_region':'Novosibirsk','city':'Novosibirsk','kladr_code':'7700000000000','address':'st. Bluchera, 33'}}" \
             --testapi "***"
        ```
    </TabItem>
  
    <TabItem value="bat" label="CMD/Bat" default>
        ```batch
            :: JSON data can also be passed as a path to a .json file
            
            oint cdek RegisterDeliveryAppointment ^
             --token "***" ^
             --appt "{'cdek_number':'1106207236','order_uuid':'0387cdd8-1d6f-4906-ab7d-713f1f1b7544','date':'2025-11-13','time_from':'10:00','time_to':'17:00','comment':'Group office','to_location':{'code':'270','fias_guid':'0c5b2444-70a0-4932-980c-b4dc0d3f02b5','postal_code':'109004','longitude':'37.6204','latitude':'55.754','country_code':'RU','region':'Novosibirsk','sub_region':'Novosibirsk','city':'Novosibirsk','kladr_code':'7700000000000','address':'st. Bluchera, 33'}}" ^
             --testapi "***"
        ```
    </TabItem>
</Tabs>


```json title="Result"
{
 "entity": {
  "uuid": "2bb6253b-d0ce-45cd-8281-f42bc5c03553"
 },
 "requests": [
  {
   "request_uuid": "34e4bca2-59ed-4b54-9e50-786ae28b3242",
   "type": "CREATE",
   "date_time": "2025-10-31T12:03:57+00:00",
   "state": "ACCEPTED"
  }
 ],
 "related_entities": []
}
```
