|
1
|
post: |
|
2
|
operationId: PostExchangesIdRequest |
|
3
|
summary: Confirm an Exchange |
|
4
|
description: Confirm an exchange request, applying its changes on the associated order. |
|
5
|
x-authenticated: true |
|
6
|
parameters: |
|
7
|
- name: id |
|
8
|
in: path |
|
9
|
description: The exchange's ID. |
|
10
|
required: true |
|
11
|
schema: |
|
12
|
type: string |
|
13
|
- name: fields |
|
14
|
in: query |
|
15
|
description: >- |
|
16
|
Comma-separated fields that should be included in the returned data. if |
|
17
|
a field is prefixed with `+` it will be added to the default fields, |
|
18
|
using `-` will remove it from the default fields. without prefix it will |
|
19
|
replace the entire default fields. |
|
20
|
required: false |
|
21
|
schema: |
|
22
|
type: string |
|
23
|
title: fields |
|
24
|
description: >- |
|
25
|
Comma-separated fields that should be included in the returned data. |
|
26
|
if a field is prefixed with `+` it will be added to the default |
|
27
|
fields, using `-` will remove it from the default fields. without |
|
28
|
prefix it will replace the entire default fields. |
|
29
|
externalDocs: |
|
30
|
url: '#select-fields-and-relations' |
|
31
|
security: |
|
32
|
- api_token: [] |
|
33
|
- cookie_auth: [] |
|
34
|
- jwt_token: [] |
|
35
|
x-codeSamples: |
|
36
|
- lang: JavaScript |
|
37
|
label: JS SDK |
|
38
|
source: |
|
39
|
$ref: ../code_samples/JavaScript/admin_exchanges_{id}_request/post.js |
|
40
|
- lang: Shell |
|
41
|
label: cURL |
|
42
|
source: |
|
43
|
$ref: ../code_samples/Shell/admin_exchanges_{id}_request/post.sh |
|
44
|
tags: |
|
45
|
- Exchanges |
|
46
|
responses: |
|
47
|
'200': |
|
48
|
description: OK |
|
49
|
content: |
|
50
|
application/json: |
|
51
|
schema: |
|
52
|
$ref: ../components/schemas/AdminExchangeRequestResponse.yaml |
|
53
|
'400': |
|
54
|
$ref: ../components/responses/400_error.yaml |
|
55
|
'401': |
|
56
|
$ref: ../components/responses/unauthorized.yaml |
|
57
|
'404': |
|
58
|
$ref: ../components/responses/not_found_error.yaml |
|
59
|
'409': |
|
60
|
$ref: ../components/responses/invalid_state_error.yaml |
|
61
|
'422': |
|
62
|
$ref: ../components/responses/invalid_request_error.yaml |
|
63
|
'500': |
|
64
|
$ref: ../components/responses/500_error.yaml |
|
65
|
x-workflow: confirmExchangeRequestWorkflow |
|
66
|
x-events: |
|
67
|
- name: order.exchange_created |
|
68
|
payload: |- |
|
69
|
```ts |
|
70
|
{ |
|
71
|
order_id, // The ID of the order |
|
72
|
exchange_id, // The ID of the exchange |
|
73
|
} |
|
74
|
``` |
|
75
|
description: Emitted when an exchange is created for an order. |
|
76
|
deprecated: false |
|
77
|
- name: reservation-item.created |
|
78
|
payload: |- |
|
79
|
```ts |
|
80
|
{ |
|
81
|
id, // The ID of the reservation |
|
82
|
order_id, // (optional) The ID of the order, if the reservation was created by an order flow |
|
83
|
} |
|
84
|
``` |
|
85
|
description: Emitted when reservations are created. |
|
86
|
deprecated: false |
|
87
|
since: 2.18.0 |
|
88
|
delete: |
|
89
|
operationId: DeleteExchangesIdRequest |
|
90
|
summary: Cancel Exchange Request |
|
91
|
description: Cancel a requested exchange. |
|
92
|
x-authenticated: true |
|
93
|
parameters: |
|
94
|
- name: id |
|
95
|
in: path |
|
96
|
description: The exchange's ID. |
|
97
|
required: true |
|
98
|
schema: |
|
99
|
type: string |
|
100
|
security: |
|
101
|
- api_token: [] |
|
102
|
- cookie_auth: [] |
|
103
|
- jwt_token: [] |
|
104
|
x-codeSamples: |
|
105
|
- lang: JavaScript |
|
106
|
label: JS SDK |
|
107
|
source: |
|
108
|
$ref: ../code_samples/JavaScript/admin_exchanges_{id}_request/delete.js |
|
109
|
- lang: Shell |
|
110
|
label: cURL |
|
111
|
source: |
|
112
|
$ref: ../code_samples/Shell/admin_exchanges_{id}_request/delete.sh |
|
113
|
tags: |
|
114
|
- Exchanges |
|
115
|
responses: |
|
116
|
'200': |
|
117
|
description: OK |
|
118
|
content: |
|
119
|
application/json: |
|
120
|
schema: |
|
121
|
$ref: ../components/schemas/AdminExchangeDeleteResponse.yaml |
|
122
|
'400': |
|
123
|
$ref: ../components/responses/400_error.yaml |
|
124
|
'401': |
|
125
|
$ref: ../components/responses/unauthorized.yaml |
|
126
|
'404': |
|
127
|
$ref: ../components/responses/not_found_error.yaml |
|
128
|
'409': |
|
129
|
$ref: ../components/responses/invalid_state_error.yaml |
|
130
|
'422': |
|
131
|
$ref: ../components/responses/invalid_request_error.yaml |
|
132
|
'500': |
|
133
|
$ref: ../components/responses/500_error.yaml |
|
134
|
x-workflow: cancelBeginOrderExchangeWorkflow |
|
135
|
x-events: [] |