|
1
|
post: |
|
2
|
operationId: PostClaimsIdCancel |
|
3
|
summary: Cancel a Claim |
|
4
|
description: Cancel a claim and its associated return. |
|
5
|
x-authenticated: true |
|
6
|
parameters: |
|
7
|
- name: id |
|
8
|
in: path |
|
9
|
description: The claim's ID. |
|
10
|
required: true |
|
11
|
schema: |
|
12
|
type: string |
|
13
|
security: |
|
14
|
- api_token: [] |
|
15
|
- cookie_auth: [] |
|
16
|
- jwt_token: [] |
|
17
|
requestBody: |
|
18
|
content: |
|
19
|
application/json: |
|
20
|
schema: |
|
21
|
$ref: ../components/schemas/AdminPostCancelClaimReqSchema.yaml |
|
22
|
x-codeSamples: |
|
23
|
- lang: JavaScript |
|
24
|
label: JS SDK |
|
25
|
source: |
|
26
|
$ref: ../code_samples/JavaScript/admin_claims_{id}_cancel/post.js |
|
27
|
- lang: Shell |
|
28
|
label: cURL |
|
29
|
source: |
|
30
|
$ref: ../code_samples/Shell/admin_claims_{id}_cancel/post.sh |
|
31
|
tags: |
|
32
|
- Claims |
|
33
|
responses: |
|
34
|
'200': |
|
35
|
description: OK |
|
36
|
content: |
|
37
|
application/json: |
|
38
|
schema: |
|
39
|
$ref: ../components/schemas/AdminClaimResponse.yaml |
|
40
|
'400': |
|
41
|
$ref: ../components/responses/400_error.yaml |
|
42
|
'401': |
|
43
|
$ref: ../components/responses/unauthorized.yaml |
|
44
|
'404': |
|
45
|
$ref: ../components/responses/not_found_error.yaml |
|
46
|
'409': |
|
47
|
$ref: ../components/responses/invalid_state_error.yaml |
|
48
|
'422': |
|
49
|
$ref: ../components/responses/invalid_request_error.yaml |
|
50
|
'500': |
|
51
|
$ref: ../components/responses/500_error.yaml |
|
52
|
x-workflow: cancelOrderClaimWorkflow |
|
53
|
x-events: |
|
54
|
- name: reservation-item.deleted |
|
55
|
payload: |- |
|
56
|
```ts |
|
57
|
{ |
|
58
|
id, // The ID of the reservation |
|
59
|
order_id, // (optional) The ID of the order, if the reservation was deleted by an order flow |
|
60
|
} |
|
61
|
``` |
|
62
|
description: Emitted when reservations are deleted. |
|
63
|
deprecated: false |
|
64
|
since: 2.18.0 |