Raw
1 get:
2 operationId: GetLocalesCode
3 summary: Get a Locale
4 x-sidebar-summary: Get Locale
5 description: >-
6 Retrieve a locale by its code. You can expand the locale's relations or
7 select the fields that should be returned.
8 x-authenticated: true
9 parameters:
10 - name: code
11 in: path
12 description: >-
13 The locale's code in [BCP 47
14 format](https://gist.github.com/typpo/b2b828a35e683b9bf8db91b5404f1bd1).
15 example: fr-FR
16 required: true
17 schema:
18 type: string
19 - name: fields
20 in: query
21 description: >-
22 Comma-separated fields that should be included in the returned data. If
23 a field is prefixed with `+` it will be added to the default fields,
24 using `-` will remove it from the default fields. Without prefix it will
25 replace the entire default fields.
26 required: false
27 schema:
28 type: string
29 title: fields
30 description: >-
31 Comma-separated fields that should be included in the returned data.
32 If a field is prefixed with `+` it will be added to the default
33 fields, using `-` will remove it from the default fields. Without
34 prefix it will replace the entire default fields.
35 externalDocs:
36 url: '#select-fields-and-relations'
37 security:
38 - api_token: []
39 - cookie_auth: []
40 - jwt_token: []
41 x-codeSamples:
42 - lang: JavaScript
43 label: JS SDK
44 source:
45 $ref: ../code_samples/JavaScript/admin_locales_{code}/get.js
46 - lang: Shell
47 label: cURL
48 source:
49 $ref: ../code_samples/Shell/admin_locales_{code}/get.sh
50 tags:
51 - Locales
52 responses:
53 '200':
54 description: OK
55 content:
56 application/json:
57 schema:
58 $ref: ../components/schemas/AdminLocaleResponse.yaml
59 '400':
60 $ref: ../components/responses/400_error.yaml
61 '401':
62 $ref: ../components/responses/unauthorized.yaml
63 '404':
64 $ref: ../components/responses/not_found_error.yaml
65 '409':
66 $ref: ../components/responses/invalid_state_error.yaml
67 '422':
68 $ref: ../components/responses/invalid_request_error.yaml
69 '500':
70 $ref: ../components/responses/500_error.yaml
71 x-since: 2.12.3
72 x-featureFlag: translation