1 /**
2 * @oas [get] /admin/shipping-profiles
3 * operationId: GetShippingProfiles
4 * summary: List Shipping Profiles
5 * description: Retrieve a list of shipping profiles. The shipping profiles can be filtered by fields such as `id`. The shipping profiles can also be sorted or paginated.
6 * x-authenticated: true
7 * parameters:
8 * - name: fields
9 * in: query
10 * description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
11 * fields. without prefix it will replace the entire default fields.
12 * required: false
13 * schema:
14 * type: string
15 * title: fields
16 * description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
17 * fields. without prefix it will replace the entire default fields.
18 * externalDocs:
19 * url: "#select-fields-and-relations"
20 * - name: offset
21 * in: query
22 * description: The number of items to skip when retrieving a list.
23 * required: false
24 * schema:
25 * type: number
26 * title: offset
27 * description: The number of items to skip when retrieving a list.
28 * externalDocs:
29 * url: "#pagination"
30 * - name: limit
31 * in: query
32 * description: Limit the number of items returned in the list.
33 * required: false
34 * schema:
35 * type: number
36 * title: limit
37 * description: Limit the number of items returned in the list.
38 * externalDocs:
39 * url: "#pagination"
40 * - name: order
41 * in: query
42 * description: The field to sort the data by. By default, the sort order is ascending. To change the order to descending, prefix the field name with `-`.
43 * required: false
44 * schema:
45 * type: string
46 * title: order
47 * description: The field to sort the data by. By default, the sort order is ascending. To change the order to descending, prefix the field name with `-`.
48 * - name: id
49 * in: query
50 * required: false
51 * schema:
52 * oneOf:
53 * - type: string
54 * title: id
55 * description: Filter by a shipping profile's ID.
56 * - type: array
57 * description: Filter by shipping profile IDs.
58 * items:
59 * type: string
60 * title: id
61 * description: A shipping profile ID.
62 * - name: q
63 * in: query
64 * description: Search term to filter the shipping profile's searchable properties.
65 * required: false
66 * schema:
67 * type: string
68 * title: q
69 * description: Search term to filter the shipping profile's searchable properties.
70 * - name: type
71 * in: query
72 * description: Filter by a shipping profile's type.
73 * required: false
74 * schema:
75 * type: string
76 * title: type
77 * description: Filter by a shipping profile's type.
78 * - name: name
79 * in: query
80 * description: Filter by a shipping profile's name.
81 * required: false
82 * schema:
83 * type: string
84 * title: name
85 * description: Filter by a shipping profile's name.
86 * - name: created_at
87 * in: query
88 * description: Filter by a shipping profile's creation date.
89 * required: false
90 * schema:
91 * type: object
92 * description: Filter by a shipping profile's creation date.
93 * properties:
94 * $and:
95 * type: array
96 * description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
97 * items:
98 * type: object
99 * title: $and
100 * $or:
101 * type: array
102 * description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
103 * items:
104 * type: object
105 * title: $or
106 * $eq:
107 * oneOf:
108 * - type: string
109 * title: $eq
110 * description: Filter by an exact match.
111 * - type: array
112 * description: Filter by an exact match.
113 * items:
114 * type: string
115 * title: $eq
116 * description: Filter by an exact match.
117 * $ne:
118 * type: string
119 * title: $ne
120 * description: Filter by values not equal to this parameter.
121 * $in:
122 * type: array
123 * description: Filter by values in this array.
124 * items:
125 * type: string
126 * title: $in
127 * description: Filter by values in this array.
128 * $nin:
129 * type: array
130 * description: Filter by values not in this array.
131 * items:
132 * type: string
133 * title: $nin
134 * description: Filter by values not in this array.
135 * $not:
136 * oneOf:
137 * - type: string
138 * title: $not
139 * description: Filter by values not matching the conditions in this parameter.
140 * - type: object
141 * description: Filter by values not matching the conditions in this parameter.
142 * - type: array
143 * description: Filter by values not matching the conditions in this parameter.
144 * items:
145 * type: string
146 * title: $not
147 * description: Filter by values not matching the conditions in this parameter.
148 * $gt:
149 * type: string
150 * title: $gt
151 * description: Filter by values greater than this parameter. Useful for numbers and dates only.
152 * $gte:
153 * type: string
154 * title: $gte
155 * description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
156 * $lt:
157 * type: string
158 * title: $lt
159 * description: Filter by values less than this parameter. Useful for numbers and dates only.
160 * $lte:
161 * type: string
162 * title: $lte
163 * description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
164 * $like:
165 * type: string
166 * title: $like
167 * description: Apply a `like` filter. Useful for strings only.
168 * $re:
169 * type: string
170 * title: $re
171 * description: Apply a regex filter. Useful for strings only.
172 * $ilike:
173 * type: string
174 * title: $ilike
175 * description: Apply a case-insensitive `like` filter. Useful for strings only.
176 * $fulltext:
177 * type: string
178 * title: $fulltext
179 * description: Filter to apply on full-text properties.
180 * $overlap:
181 * type: array
182 * description: Filter arrays that have overlapping values with this parameter.
183 * items:
184 * type: string
185 * title: $overlap
186 * description: Filter arrays that have overlapping values with this parameter.
187 * $contains:
188 * type: array
189 * description: Filter arrays that contain some of the values of this parameter.
190 * items:
191 * type: string
192 * title: $contains
193 * description: Filter arrays that contain some of the values of this parameter.
194 * $contained:
195 * type: array
196 * description: Filter arrays that contain all values of this parameter.
197 * items:
198 * type: string
199 * title: $contained
200 * description: Filter arrays that contain all values of this parameter.
201 * $exists:
202 * type: boolean
203 * title: $exists
204 * description: Filter by whether a value for this parameter exists (not `null`).
205 * title: created_at
206 * - name: updated_at
207 * in: query
208 * description: Filter by a shipping profile's update date.
209 * required: false
210 * schema:
211 * type: object
212 * description: Filter by a shipping profile's update date.
213 * properties:
214 * $and:
215 * type: array
216 * description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
217 * items:
218 * type: object
219 * title: $and
220 * $or:
221 * type: array
222 * description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
223 * items:
224 * type: object
225 * title: $or
226 * $eq:
227 * oneOf:
228 * - type: string
229 * title: $eq
230 * description: Filter by an exact match.
231 * - type: array
232 * description: Filter by an exact match.
233 * items:
234 * type: string
235 * title: $eq
236 * description: Filter by an exact match.
237 * $ne:
238 * type: string
239 * title: $ne
240 * description: Filter by values not equal to this parameter.
241 * $in:
242 * type: array
243 * description: Filter by values in this array.
244 * items:
245 * type: string
246 * title: $in
247 * description: Filter by values in this array.
248 * $nin:
249 * type: array
250 * description: Filter by values not in this array.
251 * items:
252 * type: string
253 * title: $nin
254 * description: Filter by values not in this array.
255 * $not:
256 * oneOf:
257 * - type: string
258 * title: $not
259 * description: Filter by values not matching the conditions in this parameter.
260 * - type: object
261 * description: Filter by values not matching the conditions in this parameter.
262 * - type: array
263 * description: Filter by values not matching the conditions in this parameter.
264 * items:
265 * type: string
266 * title: $not
267 * description: Filter by values not matching the conditions in this parameter.
268 * $gt:
269 * type: string
270 * title: $gt
271 * description: Filter by values greater than this parameter. Useful for numbers and dates only.
272 * $gte:
273 * type: string
274 * title: $gte
275 * description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
276 * $lt:
277 * type: string
278 * title: $lt
279 * description: Filter by values less than this parameter. Useful for numbers and dates only.
280 * $lte:
281 * type: string
282 * title: $lte
283 * description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
284 * $like:
285 * type: string
286 * title: $like
287 * description: Apply a `like` filter. Useful for strings only.
288 * $re:
289 * type: string
290 * title: $re
291 * description: Apply a regex filter. Useful for strings only.
292 * $ilike:
293 * type: string
294 * title: $ilike
295 * description: Apply a case-insensitive `like` filter. Useful for strings only.
296 * $fulltext:
297 * type: string
298 * title: $fulltext
299 * description: Filter to apply on full-text properties.
300 * $overlap:
301 * type: array
302 * description: Filter arrays that have overlapping values with this parameter.
303 * items:
304 * type: string
305 * title: $overlap
306 * description: Filter arrays that have overlapping values with this parameter.
307 * $contains:
308 * type: array
309 * description: Filter arrays that contain some of the values of this parameter.
310 * items:
311 * type: string
312 * title: $contains
313 * description: Filter arrays that contain some of the values of this parameter.
314 * $contained:
315 * type: array
316 * description: Filter arrays that contain all values of this parameter.
317 * items:
318 * type: string
319 * title: $contained
320 * description: Filter arrays that contain all values of this parameter.
321 * $exists:
322 * type: boolean
323 * title: $exists
324 * description: Filter by whether a value for this parameter exists (not `null`).
325 * title: updated_at
326 * - name: deleted_at
327 * in: query
328 * description: Filter by a shipping profile's deletion date.
329 * required: false
330 * schema:
331 * type: object
332 * description: Filter by a shipping profile's deletion date.
333 * properties:
334 * $and:
335 * type: array
336 * description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
337 * items:
338 * type: object
339 * title: $and
340 * $or:
341 * type: array
342 * description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
343 * items:
344 * type: object
345 * title: $or
346 * $eq:
347 * oneOf:
348 * - type: string
349 * title: $eq
350 * description: Filter by an exact match.
351 * - type: array
352 * description: Filter by an exact match.
353 * items:
354 * type: string
355 * title: $eq
356 * description: Filter by an exact match.
357 * $ne:
358 * type: string
359 * title: $ne
360 * description: Filter by values not equal to this parameter.
361 * $in:
362 * type: array
363 * description: Filter by values in this array.
364 * items:
365 * type: string
366 * title: $in
367 * description: Filter by values in this array.
368 * $nin:
369 * type: array
370 * description: Filter by values not in this array.
371 * items:
372 * type: string
373 * title: $nin
374 * description: Filter by values not in this array.
375 * $not:
376 * oneOf:
377 * - type: string
378 * title: $not
379 * description: Filter by values not matching the conditions in this parameter.
380 * - type: object
381 * description: Filter by values not matching the conditions in this parameter.
382 * - type: array
383 * description: Filter by values not matching the conditions in this parameter.
384 * items:
385 * type: string
386 * title: $not
387 * description: Filter by values not matching the conditions in this parameter.
388 * $gt:
389 * type: string
390 * title: $gt
391 * description: Filter by values greater than this parameter. Useful for numbers and dates only.
392 * $gte:
393 * type: string
394 * title: $gte
395 * description: Filter by values greater than or equal to this parameter. Useful for numbers and dates only.
396 * $lt:
397 * type: string
398 * title: $lt
399 * description: Filter by values less than this parameter. Useful for numbers and dates only.
400 * $lte:
401 * type: string
402 * title: $lte
403 * description: Filter by values less than or equal to this parameter. Useful for numbers and dates only.
404 * $like:
405 * type: string
406 * title: $like
407 * description: Apply a `like` filter. Useful for strings only.
408 * $re:
409 * type: string
410 * title: $re
411 * description: Apply a regex filter. Useful for strings only.
412 * $ilike:
413 * type: string
414 * title: $ilike
415 * description: Apply a case-insensitive `like` filter. Useful for strings only.
416 * $fulltext:
417 * type: string
418 * title: $fulltext
419 * description: Filter to apply on full-text properties.
420 * $overlap:
421 * type: array
422 * description: Filter arrays that have overlapping values with this parameter.
423 * items:
424 * type: string
425 * title: $overlap
426 * description: Filter arrays that have overlapping values with this parameter.
427 * $contains:
428 * type: array
429 * description: Filter arrays that contain some of the values of this parameter.
430 * items:
431 * type: string
432 * title: $contains
433 * description: Filter arrays that contain some of the values of this parameter.
434 * $contained:
435 * type: array
436 * description: Filter arrays that contain all values of this parameter.
437 * items:
438 * type: string
439 * title: $contained
440 * description: Filter arrays that contain all values of this parameter.
441 * $exists:
442 * type: boolean
443 * title: $exists
444 * description: Filter by whether a value for this parameter exists (not `null`).
445 * title: deleted_at
446 * - name: $and
447 * in: query
448 * required: false
449 * schema:
450 * type: array
451 * description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
452 * items:
453 * type: object
454 * title: $and
455 * - name: $or
456 * in: query
457 * required: false
458 * schema:
459 * type: array
460 * description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
461 * items:
462 * type: object
463 * title: $or
464 * - name: with_deleted
465 * in: query
466 * description: Whether to include deleted records in the result.
467 * required: false
468 * schema:
469 * type: boolean
470 * title: with_deleted
471 * description: Whether to include deleted records in the result.
472 * security:
473 * - api_token: []
474 * - cookie_auth: []
475 * - jwt_token: []
476 * x-codeSamples:
477 * - lang: JavaScript
478 * label: JS SDK
479 * source: |-
480 * import Medusa from "@medusajs/js-sdk"
481 *
482 * export const sdk = new Medusa({
483 * baseUrl: import.meta.env.VITE_BACKEND_URL || "/",
484 * debug: import.meta.env.DEV,
485 * auth: {
486 * type: "session",
487 * },
488 * })
489 *
490 * sdk.admin.shippingProfile.list()
491 * .then(({ shipping_profiles, count, limit, offset }) => {
492 * console.log(shipping_profiles)
493 * })
494 * - lang: Shell
495 * label: cURL
496 * source: |-
497 * curl '{backend_url}/admin/shipping-profiles' \
498 * -H 'Authorization: Bearer {jwt_token}'
499 * tags:
500 * - Shipping Profiles
501 * responses:
502 * "200":
503 * description: OK
504 * content:
505 * application/json:
506 * schema:
507 * allOf:
508 * - type: object
509 * description: The paginated list of shipping profiles.
510 * required:
511 * - limit
512 * - offset
513 * - count
514 * properties:
515 * limit:
516 * type: number
517 * title: limit
518 * description: The maximum number of items returned.
519 * offset:
520 * type: number
521 * title: offset
522 * description: The number of items skipped before retrieving the returned items.
523 * count:
524 * type: number
525 * title: count
526 * description: The total number of items.
527 * - type: object
528 * description: The paginated list of shipping profiles.
529 * required:
530 * - shipping_profiles
531 * properties:
532 * shipping_profiles:
533 * type: array
534 * description: The list of shipping profiles.
535 * items:
536 * $ref: "#/components/schemas/AdminShippingProfile"
537 * "400":
538 * $ref: "#/components/responses/400_error"
539 * "401":
540 * $ref: "#/components/responses/unauthorized"
541 * "404":
542 * $ref: "#/components/responses/not_found_error"
543 * "409":
544 * $ref: "#/components/responses/invalid_state_error"
545 * "422":
546 * $ref: "#/components/responses/invalid_request_error"
547 * "500":
548 * $ref: "#/components/responses/500_error"
549 *
550 */
551