---
sidebar_position: 7
description: Create refusal 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';

# Create refusal
 Creates an order refusal to return to the online store



`Function CreateRefusal(Val Token, Val UUID, Val TestAPI = False) Export`

  | Parameter | CLI option | Type | Required | Description |
  |-|-|-|-|-|
  | Token | --token | String | &#x2714; | Auth token |
  | UUID | --uuid | String | &#x2714; | Order UUID |
  | 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 refusal](https://api-docs.cdek.ru/55327686.html)
:::
<br/>


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

    Result = OPI_CDEK.CreateRefusal(Token, UUID, True);
```
 

 <Tabs>
  
    <TabItem value="bash" label="Bash" default>
        ```bash
            oint cdek CreateRefusal \
             --token "***" \
             --uuid "30b65bfe-a4ac-46b8-96db-c692076c609b" \
             --testapi "***"
        ```
    </TabItem>
  
    <TabItem value="bat" label="CMD/Bat" default>
        ```batch
            oint cdek CreateRefusal ^
             --token "***" ^
             --uuid "30b65bfe-a4ac-46b8-96db-c692076c609b" ^
             --testapi "***"
        ```
    </TabItem>
</Tabs>


```json title="Result"
{
 "entity": {
  "uuid": "3c80df8f-efd1-48ce-bd28-56bcd628eb82"
 },
 "requests": [
  {
   "request_uuid": "344766d8-be37-4335-9a43-d86a7ef26ae8",
   "type": "CREATE_REFUSAL",
   "date_time": "2025-10-31T12:03:25+00:00",
   "state": "ACCEPTED"
  }
 ],
 "related_entities": []
}
```
