|
1
|
post: |
|
2
|
operationId: PostTranslationsBatch |
|
3
|
summary: Manage Translations |
|
4
|
description: >- |
|
5
|
Manage translations in bulk by creating, updating, or deleting multiple |
|
6
|
translations in a single request. You can manage translations for various |
|
7
|
resources such as products, product variants, categories, and more. |
|
8
|
x-authenticated: true |
|
9
|
security: |
|
10
|
- api_token: [] |
|
11
|
- cookie_auth: [] |
|
12
|
- jwt_token: [] |
|
13
|
requestBody: |
|
14
|
content: |
|
15
|
application/json: |
|
16
|
schema: |
|
17
|
type: object |
|
18
|
description: The translations to be created, updated, or deleted in bulk. |
|
19
|
properties: |
|
20
|
create: |
|
21
|
type: array |
|
22
|
description: The translations to create. |
|
23
|
items: |
|
24
|
$ref: ../components/schemas/AdminCreateTranslation.yaml |
|
25
|
update: |
|
26
|
type: array |
|
27
|
description: The translations to update. |
|
28
|
items: |
|
29
|
$ref: ../components/schemas/AdminUpdateTranslation.yaml |
|
30
|
delete: |
|
31
|
type: array |
|
32
|
description: The translations to delete. |
|
33
|
items: |
|
34
|
type: string |
|
35
|
title: delete |
|
36
|
description: The ID of a translation to delete. |
|
37
|
x-codeSamples: |
|
38
|
- lang: JavaScript |
|
39
|
label: JS SDK |
|
40
|
source: |
|
41
|
$ref: ../code_samples/JavaScript/admin_translations_batch/post.js |
|
42
|
- lang: Shell |
|
43
|
label: cURL |
|
44
|
source: |
|
45
|
$ref: ../code_samples/Shell/admin_translations_batch/post.sh |
|
46
|
tags: |
|
47
|
- Translations |
|
48
|
responses: |
|
49
|
'200': |
|
50
|
description: OK |
|
51
|
content: |
|
52
|
application/json: |
|
53
|
schema: |
|
54
|
$ref: ../components/schemas/AdminTranslationsBatchResponse.yaml |
|
55
|
'400': |
|
56
|
$ref: ../components/responses/400_error.yaml |
|
57
|
'401': |
|
58
|
$ref: ../components/responses/unauthorized.yaml |
|
59
|
'404': |
|
60
|
$ref: ../components/responses/not_found_error.yaml |
|
61
|
'409': |
|
62
|
$ref: ../components/responses/invalid_state_error.yaml |
|
63
|
'422': |
|
64
|
$ref: ../components/responses/invalid_request_error.yaml |
|
65
|
'500': |
|
66
|
$ref: ../components/responses/500_error.yaml |
|
67
|
x-workflow: batchTranslationsWorkflow |
|
68
|
x-events: |
|
69
|
- name: translation.created |
|
70
|
payload: |- |
|
71
|
```ts |
|
72
|
{ |
|
73
|
id, // The ID of the translation |
|
74
|
} |
|
75
|
``` |
|
76
|
description: Emitted when translations are created. |
|
77
|
deprecated: false |
|
78
|
since: 2.12.3 |
|
79
|
- name: translation.updated |
|
80
|
payload: |- |
|
81
|
```ts |
|
82
|
{ |
|
83
|
id, // The ID of the translation |
|
84
|
} |
|
85
|
``` |
|
86
|
description: Emitted when translations are updated. |
|
87
|
deprecated: false |
|
88
|
since: 2.12.3 |
|
89
|
- name: translation.deleted |
|
90
|
payload: |- |
|
91
|
```ts |
|
92
|
{ |
|
93
|
id, // The ID of the translation |
|
94
|
} |
|
95
|
``` |
|
96
|
description: Emitted when translations are deleted. |
|
97
|
deprecated: false |
|
98
|
since: 2.12.3 |
|
99
|
x-since: 2.12.3 |
|
100
|
x-featureFlag: translation |