1 get:
2 operationId: GetCurrencies
3 summary: List Currencies
4 description: >-
5 Retrieve a list of currencies. The currencies can be filtered by fields such
6 as `code`. The currencies can also be sorted or paginated.
7 x-authenticated: false
8 parameters:
9 - name: x-publishable-api-key
10 in: header
11 description: Publishable API Key created in the Medusa Admin.
12 required: true
13 schema:
14 type: string
15 externalDocs:
16 url: https://docs.medusajs.com/api/store#publishable-api-key
17 - name: x-medusa-locale
18 in: header
19 description: The locale in BCP 47 format to retrieve localized content.
20 required: false
21 schema:
22 type: string
23 example: en-US
24 externalDocs:
25 url: >-
26 https://docs.medusajs.com/resources/commerce-modules/translation/storefront
27 description: Learn more in the Serve Translations in Storefront guide.
28 - name: fields
29 in: query
30 description: >-
31 Comma-separated fields that should be included in the returned data. if
32 a field is prefixed with `+` it will be added to the default fields,
33 using `-` will remove it from the default fields. without prefix it will
34 replace the entire default fields.
35 required: false
36 schema:
37 type: string
38 title: fields
39 description: >-
40 Comma-separated fields that should be included in the returned data.
41 if a field is prefixed with `+` it will be added to the default
42 fields, using `-` will remove it from the default fields. without
43 prefix it will replace the entire default fields.
44 externalDocs:
45 url: '#select-fields-and-relations'
46 - name: offset
47 in: query
48 description: The number of items to skip when retrieving a list.
49 required: false
50 schema:
51 type: number
52 title: offset
53 description: The number of items to skip when retrieving a list.
54 externalDocs:
55 url: '#pagination'
56 - name: limit
57 in: query
58 description: Limit the number of items returned in the list.
59 required: false
60 schema:
61 type: number
62 title: limit
63 description: Limit the number of items returned in the list.
64 externalDocs:
65 url: '#pagination'
66 - name: order
67 in: query
68 description: >-
69 The field to sort the data by. By default, the sort order is ascending.
70 To change the order to descending, prefix the field name with `-`.
71 required: false
72 schema:
73 type: string
74 title: order
75 description: >-
76 The field to sort the data by. By default, the sort order is
77 ascending. To change the order to descending, prefix the field name
78 with `-`.
79 - name: q
80 in: query
81 description: Search term to filter the currency's searchable properties.
82 required: false
83 schema:
84 type: string
85 title: q
86 description: Search term to filter the currency's searchable properties.
87 - name: code
88 in: query
89 required: false
90 schema:
91 oneOf:
92 - type: string
93 title: code
94 description: Filter by a currency code.
95 - type: array
96 description: Filter by currency codes.
97 items:
98 type: string
99 title: code
100 description: A currency code.
101 - name: $and
102 in: query
103 description: >-
104 Join query parameters with an AND condition. Each object's content is
105 the same type as the expected query parameters.
106 required: false
107 schema:
108 type: array
109 description: >-
110 Join query parameters with an AND condition. Each object's content is
111 the same type as the expected query parameters.
112 items:
113 type: object
114 title: $and
115 - name: $or
116 in: query
117 description: >-
118 Join query parameters with an OR condition. Each object's content is the
119 same type as the expected query parameters.
120 required: false
121 schema:
122 type: array
123 description: >-
124 Join query parameters with an OR condition. Each object's content is
125 the same type as the expected query parameters.
126 items:
127 type: object
128 title: $or
129 - name: with_deleted
130 in: query
131 description: Whether to include deleted records in the result.
132 required: false
133 schema:
134 type: boolean
135 title: with_deleted
136 description: Whether to include deleted records in the result.
137 - name: locale
138 in: query
139 description: The locale in BCP 47 format to retrieve localized content.
140 required: false
141 schema:
142 type: string
143 example: en-US
144 externalDocs:
145 url: >-
146 https://docs.medusajs.com/resources/commerce-modules/translation/storefront
147 description: Learn more in the Serve Translations in Storefront guide.
148 x-codeSamples:
149 - lang: Shell
150 label: cURL
151 source:
152 $ref: ../code_samples/Shell/store_currencies/get.sh
153 tags:
154 - Currencies
155 responses:
156 '200':
157 description: OK
158 content:
159 application/json:
160 schema:
161 $ref: ../components/schemas/StoreCurrencyListResponse.yaml
162 '400':
163 $ref: ../components/responses/400_error.yaml
164 '401':
165 $ref: ../components/responses/unauthorized.yaml
166 '404':
167 $ref: ../components/responses/not_found_error.yaml
168 '409':
169 $ref: ../components/responses/invalid_state_error.yaml
170 '422':
171 $ref: ../components/responses/invalid_request_error.yaml
172 '500':
173 $ref: ../components/responses/500_error.yaml
174 x-allowed:
175 - code
176 - name
177 - symbol
178 - symbol_native
179 - decimal_digits
180 - rounding
181 - created_at
182 - updated_at
183 - deleted_at