1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-12-07 23:03:08 +02:00
Files
OpenIntegrations/docs/en/md/CDEK/Orders-management/Create-refusal.mdx

81 lines
2.6 KiB
Plaintext
Raw Normal View History

2024-10-15 10:50:56 +03:00
---
2024-10-11 23:33:40 +03:00
sidebar_position: 7
2025-05-05 11:15:20 +03:00
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
2025-05-05 09:49:19 +03:00
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, CDEK]
2024-10-11 23:33:40 +03:00
---
2024-10-15 10:50:56 +03:00
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
2024-10-11 23:33:40 +03:00
# Create refusal
Creates an order refusal to return to the online store
`Function CreateRefusal(Val Token, Val UUID, Val TestAPI = False) Export`
2024-10-15 15:15:47 +03:00
| Parameter | CLI option | Type | Required | Description |
|-|-|-|-|-|
| Token | --token | String | ✔ | Auth token |
| UUID | --uuid | String | ✔ | Order UUID |
| TestAPI | --testapi | Boolean | ✖ | Flag to use test API for requests |
2024-10-11 23:33:40 +03:00
Returns: Map Of KeyAndValue - serialized JSON response from CDEK
<br/>
:::tip
2024-11-21 13:27:18 +03:00
Method at API documentation: [Registration of refusal](https://api-docs.cdek.ru/55327686.html)
2024-10-11 23:33:40 +03:00
:::
<br/>
2024-12-16 19:38:57 +03:00
2024-10-15 21:15:56 +03:00
```bsl title="1C:Enterprise/OneScript code example"
2025-05-21 08:49:49 +03:00
Token = "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6WyJsb2NhdGlvbjphbGwiLCJvcmRlcjphbGwiLCJwYXltZW50OmFsbCJdLCJleHAiOjE3NDc3NzYzMjQsImF1dGhvcml0aWVzIjpbInNoYXJkLWlkOnJ1LTAxIiwiY2xpZW50LWNpdHk60J3QvtCy0L7RgdC40LHQuNGA0YHQuiwg0J3QvtCy0L7RgdC40LHQuNGA0YHQutCw0Y8g0L7QsdC70LDRgdGC0YwiLCJjb250cmFjdDrQmNCcLdCg0KQt0JPQm9CTLTIyIiwiYWNjb3VudC1sYW5nOnJ1cyIsImFjY291bnQtdXVpZDplOTI1YmQwZi0wNWE2LTRjNTYtYjczNy00Yjk5YzE0ZjY2OWEiLCJhcGktdmVyc2lvbjoxLjEiLCJjbGllbnQtaWQtZWM1OmVkNzVlY2Y0LTMwZWQtNDE1My1hZmU5LWViODBiYjUxMmYyMiIsImNvbnRyYWN0LWlkOmRlNDJjYjcxLTZjOGMtNGNmNS04MjIyLWNmYjY2MDQ0ZThkZiIsImNsaWVudC1pZC1lYzQ6MTQzNDgyMzEiLCJzb2xpZC1hZGRyZ...";
UUID = "db1a3e7c-adbe-4052-81d7-9180ecb1dc11";
2024-10-11 23:33:40 +03:00
Result = OPI_CDEK.CreateRefusal(Token, UUID, True);
```
2024-10-15 09:53:37 +03:00
2024-10-11 23:33:40 +03:00
2024-10-20 22:36:03 +03:00
<Tabs>
<TabItem value="bash" label="Bash" default>
```bash
oint cdek CreateRefusal \
2024-10-22 08:59:24 +03:00
--token "***" \
2025-05-21 10:35:46 +03:00
--uuid "a9f88b45-cbdd-4b73-a1b4-c3bc77e35729" \
2024-10-22 08:59:24 +03:00
--testapi "***"
2024-10-20 22:36:03 +03:00
```
</TabItem>
<TabItem value="bat" label="CMD/Bat" default>
```batch
oint cdek CreateRefusal ^
2024-10-22 08:59:24 +03:00
--token "***" ^
2025-05-21 10:35:46 +03:00
--uuid "a9f88b45-cbdd-4b73-a1b4-c3bc77e35729" ^
2024-10-22 08:59:24 +03:00
--testapi "***"
2024-10-20 22:36:03 +03:00
```
</TabItem>
</Tabs>
2024-10-11 23:33:40 +03:00
```json title="Result"
2024-10-21 21:57:16 +03:00
{
"entity": {
"uuid": "a93fd1b1-55b3-4033-a52a-d2df7bb6b469"
},
"requests": [
{
"request_uuid": "03eabc69-d543-4094-9fe5-dbff7e89ceb7",
"type": "CREATE_REFUSAL",
"date_time": "2024-10-21T21:27:53+03:00",
"state": "ACCEPTED"
}
],
"related_entities": []
}
2024-10-11 23:33:40 +03:00
```