|
1
|
get: |
|
2
|
operationId: GetPricePreferences |
|
3
|
summary: List Price Preferences |
|
4
|
description: >- |
|
5
|
Retrieve a list of price preferences. The price preferences can be filtered |
|
6
|
by fields such as `id`. The price preferences can also be sorted or |
|
7
|
paginated. |
|
8
|
x-authenticated: true |
|
9
|
parameters: |
|
10
|
- name: fields |
|
11
|
in: query |
|
12
|
description: >- |
|
13
|
Comma-separated fields that should be included in the returned data. if |
|
14
|
a field is prefixed with `+` it will be added to the default fields, |
|
15
|
using `-` will remove it from the default fields. without prefix it will |
|
16
|
replace the entire default fields. |
|
17
|
required: false |
|
18
|
schema: |
|
19
|
type: string |
|
20
|
title: fields |
|
21
|
description: >- |
|
22
|
Comma-separated fields that should be included in the returned data. |
|
23
|
if a field is prefixed with `+` it will be added to the default |
|
24
|
fields, using `-` will remove it from the default fields. without |
|
25
|
prefix it will replace the entire default fields. |
|
26
|
externalDocs: |
|
27
|
url: '#select-fields-and-relations' |
|
28
|
- name: offset |
|
29
|
in: query |
|
30
|
description: The number of items to skip when retrieving a list. |
|
31
|
required: false |
|
32
|
schema: |
|
33
|
type: number |
|
34
|
title: offset |
|
35
|
description: The number of items to skip when retrieving a list. |
|
36
|
externalDocs: |
|
37
|
url: '#pagination' |
|
38
|
- name: limit |
|
39
|
in: query |
|
40
|
description: Limit the number of items returned in the list. |
|
41
|
required: false |
|
42
|
schema: |
|
43
|
type: number |
|
44
|
title: limit |
|
45
|
description: Limit the number of items returned in the list. |
|
46
|
externalDocs: |
|
47
|
url: '#pagination' |
|
48
|
- name: order |
|
49
|
in: query |
|
50
|
description: >- |
|
51
|
The field to sort the data by. By default, the sort order is ascending. |
|
52
|
To change the order to descending, prefix the field name with `-`. |
|
53
|
required: false |
|
54
|
schema: |
|
55
|
type: string |
|
56
|
title: order |
|
57
|
description: >- |
|
58
|
The field to sort the data by. By default, the sort order is |
|
59
|
ascending. To change the order to descending, prefix the field name |
|
60
|
with `-`. |
|
61
|
- name: id |
|
62
|
in: query |
|
63
|
required: false |
|
64
|
schema: |
|
65
|
oneOf: |
|
66
|
- type: string |
|
67
|
title: id |
|
68
|
description: Filter by a price preference ID. |
|
69
|
- type: array |
|
70
|
description: Filter by price preference IDs. |
|
71
|
items: |
|
72
|
type: string |
|
73
|
title: id |
|
74
|
description: A price preference ID. |
|
75
|
- name: attribute |
|
76
|
in: query |
|
77
|
required: false |
|
78
|
schema: |
|
79
|
oneOf: |
|
80
|
- type: string |
|
81
|
title: attribute |
|
82
|
description: Filter by a price preference's attribute. |
|
83
|
- type: array |
|
84
|
description: Filter by price preference attributes. |
|
85
|
items: |
|
86
|
type: string |
|
87
|
title: attribute |
|
88
|
description: A price preference's attribute. |
|
89
|
- name: value |
|
90
|
in: query |
|
91
|
required: false |
|
92
|
schema: |
|
93
|
oneOf: |
|
94
|
- type: string |
|
95
|
title: value |
|
96
|
description: Filter by a price preference's value. |
|
97
|
- type: array |
|
98
|
description: Filter by price preference values. |
|
99
|
items: |
|
100
|
type: string |
|
101
|
title: value |
|
102
|
description: A price preference's value. |
|
103
|
- name: q |
|
104
|
in: query |
|
105
|
description: Search term to apply on the price preference's searchable properties. |
|
106
|
required: false |
|
107
|
schema: |
|
108
|
type: string |
|
109
|
title: q |
|
110
|
description: Search term to apply on the price preference's searchable properties. |
|
111
|
- name: $and |
|
112
|
in: query |
|
113
|
description: >- |
|
114
|
Join query parameters with an AND condition. Each object's content is |
|
115
|
the same type as the expected query parameters. |
|
116
|
required: false |
|
117
|
schema: |
|
118
|
type: array |
|
119
|
description: >- |
|
120
|
Join query parameters with an AND condition. Each object's content is |
|
121
|
the same type as the expected query parameters. |
|
122
|
items: |
|
123
|
type: object |
|
124
|
title: $and |
|
125
|
- name: $or |
|
126
|
in: query |
|
127
|
description: >- |
|
128
|
Join query parameters with an OR condition. Each object's content is the |
|
129
|
same type as the expected query parameters. |
|
130
|
required: false |
|
131
|
schema: |
|
132
|
type: array |
|
133
|
description: >- |
|
134
|
Join query parameters with an OR condition. Each object's content is |
|
135
|
the same type as the expected query parameters. |
|
136
|
items: |
|
137
|
type: object |
|
138
|
title: $or |
|
139
|
- name: with_deleted |
|
140
|
in: query |
|
141
|
description: Whether to include deleted records in the result. |
|
142
|
required: false |
|
143
|
schema: |
|
144
|
type: boolean |
|
145
|
title: with_deleted |
|
146
|
description: Whether to include deleted records in the result. |
|
147
|
security: |
|
148
|
- api_token: [] |
|
149
|
- cookie_auth: [] |
|
150
|
- jwt_token: [] |
|
151
|
x-codeSamples: |
|
152
|
- lang: JavaScript |
|
153
|
label: JS SDK |
|
154
|
source: |
|
155
|
$ref: ../code_samples/JavaScript/admin_price-preferences/get.js |
|
156
|
- lang: Shell |
|
157
|
label: cURL |
|
158
|
source: |
|
159
|
$ref: ../code_samples/Shell/admin_price-preferences/get.sh |
|
160
|
tags: |
|
161
|
- Price Preferences |
|
162
|
responses: |
|
163
|
'200': |
|
164
|
description: OK |
|
165
|
content: |
|
166
|
application/json: |
|
167
|
schema: |
|
168
|
$ref: ../components/schemas/AdminPricePreferenceListResponse.yaml |
|
169
|
'400': |
|
170
|
$ref: ../components/responses/400_error.yaml |
|
171
|
'401': |
|
172
|
$ref: ../components/responses/unauthorized.yaml |
|
173
|
'404': |
|
174
|
$ref: ../components/responses/not_found_error.yaml |
|
175
|
'409': |
|
176
|
$ref: ../components/responses/invalid_state_error.yaml |
|
177
|
'422': |
|
178
|
$ref: ../components/responses/invalid_request_error.yaml |
|
179
|
'500': |
|
180
|
$ref: ../components/responses/500_error.yaml |
|
181
|
post: |
|
182
|
operationId: PostPricePreferences |
|
183
|
summary: Create Price Preference |
|
184
|
description: Create a price preference. |
|
185
|
x-authenticated: true |
|
186
|
parameters: |
|
187
|
- name: fields |
|
188
|
in: query |
|
189
|
description: >- |
|
190
|
Comma-separated fields that should be included in the returned data. if |
|
191
|
a field is prefixed with `+` it will be added to the default fields, |
|
192
|
using `-` will remove it from the default fields. without prefix it will |
|
193
|
replace the entire default fields. |
|
194
|
required: false |
|
195
|
schema: |
|
196
|
type: string |
|
197
|
title: fields |
|
198
|
description: >- |
|
199
|
Comma-separated fields that should be included in the returned data. |
|
200
|
if a field is prefixed with `+` it will be added to the default |
|
201
|
fields, using `-` will remove it from the default fields. without |
|
202
|
prefix it will replace the entire default fields. |
|
203
|
externalDocs: |
|
204
|
url: '#select-fields-and-relations' |
|
205
|
security: |
|
206
|
- api_token: [] |
|
207
|
- cookie_auth: [] |
|
208
|
- jwt_token: [] |
|
209
|
requestBody: |
|
210
|
content: |
|
211
|
application/json: |
|
212
|
schema: |
|
213
|
$ref: ../components/schemas/AdminCreatePricePreference.yaml |
|
214
|
x-codeSamples: |
|
215
|
- lang: JavaScript |
|
216
|
label: JS SDK |
|
217
|
source: |
|
218
|
$ref: ../code_samples/JavaScript/admin_price-preferences/post.js |
|
219
|
- lang: Shell |
|
220
|
label: cURL |
|
221
|
source: |
|
222
|
$ref: ../code_samples/Shell/admin_price-preferences/post.sh |
|
223
|
tags: |
|
224
|
- Price Preferences |
|
225
|
responses: |
|
226
|
'200': |
|
227
|
description: OK |
|
228
|
content: |
|
229
|
application/json: |
|
230
|
schema: |
|
231
|
$ref: ../components/schemas/AdminPricePreferenceResponse.yaml |
|
232
|
'400': |
|
233
|
$ref: ../components/responses/400_error.yaml |
|
234
|
'401': |
|
235
|
$ref: ../components/responses/unauthorized.yaml |
|
236
|
'404': |
|
237
|
$ref: ../components/responses/not_found_error.yaml |
|
238
|
'409': |
|
239
|
$ref: ../components/responses/invalid_state_error.yaml |
|
240
|
'422': |
|
241
|
$ref: ../components/responses/invalid_request_error.yaml |
|
242
|
'500': |
|
243
|
$ref: ../components/responses/500_error.yaml |
|
244
|
x-workflow: createPricePreferencesWorkflow |
|
245
|
x-events: [] |