1 /**
2 * @oas [get] /admin/shipping-options/{id}
3 * operationId: GetShippingOptionsId
4 * summary: Get a Shipping Option
5 * description: Retrieve a shipping option by its ID. You can expand the shipping option's relations or select the fields that should be returned.
6 * x-authenticated: true
7 * parameters:
8 * - name: id
9 * in: path
10 * description: The shipping option's ID.
11 * required: true
12 * schema:
13 * type: string
14 * - name: fields
15 * in: query
16 * description: |-
17 * Comma-separated fields that should be included in the returned data.
18 * if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields.
19 * without prefix it will replace the entire default fields.
20 * required: false
21 * schema:
22 * type: string
23 * title: fields
24 * 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
25 * fields. without prefix it will replace the entire default fields.
26 * externalDocs:
27 * url: "#select-fields-and-relations"
28 * security:
29 * - api_token: []
30 * - cookie_auth: []
31 * - jwt_token: []
32 * x-codeSamples:
33 * - lang: JavaScript
34 * label: JS SDK
35 * source: |-
36 * import Medusa from "@medusajs/js-sdk"
37 *
38 * export const sdk = new Medusa({
39 * baseUrl: import.meta.env.VITE_BACKEND_URL || "/",
40 * debug: import.meta.env.DEV,
41 * auth: {
42 * type: "session",
43 * },
44 * })
45 *
46 * sdk.admin.shippingOption.retrieve("so_123")
47 * .then(({ shipping_option }) => {
48 * console.log(shipping_option)
49 * })
50 * - lang: Shell
51 * label: cURL
52 * source: |-
53 * curl '{backend_url}/admin/shipping-options/{id}' \
54 * -H 'Authorization: Bearer {jwt_token}'
55 * tags:
56 * - Shipping Options
57 * responses:
58 * "200":
59 * description: OK
60 * content:
61 * application/json:
62 * schema:
63 * $ref: "#/components/schemas/AdminShippingOptionResponse"
64 * "400":
65 * $ref: "#/components/responses/400_error"
66 * "401":
67 * $ref: "#/components/responses/unauthorized"
68 * "404":
69 * $ref: "#/components/responses/not_found_error"
70 * "409":
71 * $ref: "#/components/responses/invalid_state_error"
72 * "422":
73 * $ref: "#/components/responses/invalid_request_error"
74 * "500":
75 * $ref: "#/components/responses/500_error"
76 *
77 */
78