|
1
|
get: |
|
2
|
operationId: GetTranslations |
|
3
|
summary: List Translations |
|
4
|
description: >- |
|
5
|
Retrieve a list of translations. The translations can be filtered by fields |
|
6
|
such as `reference_id` (For example, the ID of a product). The translations |
|
7
|
can also be sorted or paginated. |
|
8
|
x-authenticated: true |
|
9
|
parameters: |
|
10
|
- name: q |
|
11
|
in: query |
|
12
|
description: Search query to filter translations by their fields. |
|
13
|
required: false |
|
14
|
schema: |
|
15
|
type: string |
|
16
|
title: q |
|
17
|
description: Search query to filter translations by their fields. |
|
18
|
- name: reference_id |
|
19
|
in: query |
|
20
|
required: false |
|
21
|
schema: |
|
22
|
oneOf: |
|
23
|
- type: string |
|
24
|
title: reference_id |
|
25
|
description: >- |
|
26
|
Filter translations by a reference ID. For example, the ID of a |
|
27
|
product. |
|
28
|
example: prod_123 |
|
29
|
- type: array |
|
30
|
description: >- |
|
31
|
Filter translations by multiple reference IDs. For example, the |
|
32
|
IDs of products. |
|
33
|
items: |
|
34
|
type: string |
|
35
|
title: reference_id |
|
36
|
description: The reference ID's details. For example, the ID of a product. |
|
37
|
example: prod_123 |
|
38
|
- name: reference |
|
39
|
in: query |
|
40
|
description: >- |
|
41
|
Filter translations by the resource they belong to. For example, |
|
42
|
`product` or `product_variant`. |
|
43
|
required: false |
|
44
|
schema: |
|
45
|
type: string |
|
46
|
title: reference |
|
47
|
description: >- |
|
48
|
Filter translations by the resource they belong to. For example, |
|
49
|
`product` or `product_variant`. |
|
50
|
- name: locale_code |
|
51
|
in: query |
|
52
|
required: false |
|
53
|
schema: |
|
54
|
oneOf: |
|
55
|
- type: string |
|
56
|
title: locale_code |
|
57
|
description: Filter translations by a locale code in BCP 47 format. |
|
58
|
example: fr-FR |
|
59
|
- type: array |
|
60
|
description: Filter translations by multiple locale codes in BCP 47 format. |
|
61
|
items: |
|
62
|
type: string |
|
63
|
title: locale_code |
|
64
|
description: A locale code in BCP 47 format. |
|
65
|
example: fr-FR |
|
66
|
- name: limit |
|
67
|
in: query |
|
68
|
description: Limit the number of items returned in the list. |
|
69
|
required: false |
|
70
|
schema: |
|
71
|
type: number |
|
72
|
title: limit |
|
73
|
description: Limit the number of items returned in the list. |
|
74
|
externalDocs: |
|
75
|
url: '#pagination' |
|
76
|
- name: offset |
|
77
|
in: query |
|
78
|
description: The number of items to skip when retrieving a list. |
|
79
|
required: false |
|
80
|
schema: |
|
81
|
type: number |
|
82
|
title: offset |
|
83
|
description: The number of items to skip when retrieving a list. |
|
84
|
externalDocs: |
|
85
|
url: '#pagination' |
|
86
|
- name: order |
|
87
|
in: query |
|
88
|
description: >- |
|
89
|
The field to sort the data by. By default, the sort order is ascending. |
|
90
|
To change the order to descending, prefix the field name with `-`. |
|
91
|
required: false |
|
92
|
schema: |
|
93
|
type: string |
|
94
|
title: order |
|
95
|
description: >- |
|
96
|
The field to sort the data by. By default, the sort order is |
|
97
|
ascending. To change the order to descending, prefix the field name |
|
98
|
with `-`. |
|
99
|
externalDocs: |
|
100
|
url: '#pagination' |
|
101
|
- name: with_deleted |
|
102
|
in: query |
|
103
|
description: The translation's with deleted. |
|
104
|
required: false |
|
105
|
schema: |
|
106
|
type: boolean |
|
107
|
title: with_deleted |
|
108
|
description: The translation's with deleted. |
|
109
|
- name: fields |
|
110
|
in: query |
|
111
|
description: >- |
|
112
|
Comma-separated fields that should be included in the returned data. If |
|
113
|
a field is prefixed with `+` it will be added to the default fields, |
|
114
|
using `-` will remove it from the default fields. Without prefix it will |
|
115
|
replace the entire default fields. |
|
116
|
required: false |
|
117
|
schema: |
|
118
|
type: string |
|
119
|
title: fields |
|
120
|
description: >- |
|
121
|
Comma-separated fields that should be included in the returned data. |
|
122
|
If a field is prefixed with `+` it will be added to the default |
|
123
|
fields, using `-` will remove it from the default fields. Without |
|
124
|
prefix it will replace the entire default fields. |
|
125
|
externalDocs: |
|
126
|
url: '#select-fields-and-relations' |
|
127
|
- name: $and |
|
128
|
in: query |
|
129
|
description: >- |
|
130
|
Join query parameters with an AND condition. Each object's content is |
|
131
|
the same type as the expected query parameters. |
|
132
|
required: false |
|
133
|
schema: |
|
134
|
type: array |
|
135
|
description: >- |
|
136
|
Join query parameters with an AND condition. Each object's content is |
|
137
|
the same type as the expected query parameters. |
|
138
|
items: |
|
139
|
type: object |
|
140
|
title: $and |
|
141
|
- name: $or |
|
142
|
in: query |
|
143
|
description: >- |
|
144
|
Join query parameters with an OR condition. Each object's content is the |
|
145
|
same type as the expected query parameters. |
|
146
|
required: false |
|
147
|
schema: |
|
148
|
type: array |
|
149
|
description: >- |
|
150
|
Join query parameters with an OR condition. Each object's content is |
|
151
|
the same type as the expected query parameters. |
|
152
|
items: |
|
153
|
type: object |
|
154
|
title: $or |
|
155
|
security: |
|
156
|
- api_token: [] |
|
157
|
- cookie_auth: [] |
|
158
|
- jwt_token: [] |
|
159
|
x-codeSamples: |
|
160
|
- lang: JavaScript |
|
161
|
label: JS SDK |
|
162
|
source: |
|
163
|
$ref: ../code_samples/JavaScript/admin_translations/get.js |
|
164
|
- lang: Shell |
|
165
|
label: cURL |
|
166
|
source: |
|
167
|
$ref: ../code_samples/Shell/admin_translations/get.sh |
|
168
|
tags: |
|
169
|
- Translations |
|
170
|
responses: |
|
171
|
'200': |
|
172
|
description: OK |
|
173
|
content: |
|
174
|
application/json: |
|
175
|
schema: |
|
176
|
allOf: |
|
177
|
- type: object |
|
178
|
description: The list of translations with pagination. |
|
179
|
required: |
|
180
|
- limit |
|
181
|
- offset |
|
182
|
- count |
|
183
|
properties: |
|
184
|
limit: |
|
185
|
type: number |
|
186
|
title: limit |
|
187
|
description: The maximum number of translations returned. |
|
188
|
offset: |
|
189
|
type: number |
|
190
|
title: offset |
|
191
|
description: >- |
|
192
|
The number of translations skipped before retrieving the |
|
193
|
returned translations. |
|
194
|
count: |
|
195
|
type: number |
|
196
|
title: count |
|
197
|
description: The total number of translations matching the query. |
|
198
|
estimate_count: |
|
199
|
type: number |
|
200
|
title: estimate_count |
|
201
|
description: >- |
|
202
|
The estimated count retrieved from the PostgreSQL query |
|
203
|
planner, which may be inaccurate. |
|
204
|
x-featureFlag: index_engine |
|
205
|
- type: object |
|
206
|
description: SUMMARY |
|
207
|
required: |
|
208
|
- translations |
|
209
|
properties: |
|
210
|
translations: |
|
211
|
type: array |
|
212
|
description: The list of translations. |
|
213
|
items: |
|
214
|
$ref: ../components/schemas/AdminTranslation.yaml |
|
215
|
'400': |
|
216
|
$ref: ../components/responses/400_error.yaml |
|
217
|
'401': |
|
218
|
$ref: ../components/responses/unauthorized.yaml |
|
219
|
'404': |
|
220
|
$ref: ../components/responses/not_found_error.yaml |
|
221
|
'409': |
|
222
|
$ref: ../components/responses/invalid_state_error.yaml |
|
223
|
'422': |
|
224
|
$ref: ../components/responses/invalid_request_error.yaml |
|
225
|
'500': |
|
226
|
$ref: ../components/responses/500_error.yaml |
|
227
|
x-since: 2.12.3 |
|
228
|
x-featureFlag: translation |