1 /**
2 * @oas [post] /admin/gift-cards/{id}
3 * operationId: PostGiftCardsId
4 * summary: Update a Gift Card
5 * description: Update a gift card's details.
6 * x-authenticated: true
7 * x-ignoreCleanup: true
8 * parameters:
9 * - name: id
10 * in: path
11 * description: The gift card's ID.
12 * required: true
13 * schema:
14 * type: string
15 * security:
16 * - api_token: []
17 * - cookie_auth: []
18 * - jwt_token: []
19 * requestBody:
20 * content:
21 * application/json:
22 * schema:
23 * $ref: "#/components/schemas/AdminUpdateGiftCardParams"
24 * x-codeSamples:
25 * - lang: Shell
26 * label: cURL
27 * source: |-
28 * curl -X POST '{backend_url}/admin/gift-cards/{id}' \
29 * -H 'Authorization: Bearer {jwt_token}'
30 * tags:
31 * - Gift Cards
32 * responses:
33 * "200":
34 * description: OK
35 * content:
36 * application/json:
37 * schema:
38 * $ref: "#/components/schemas/AdminGiftCardResponse"
39 * "400":
40 * $ref: "#/components/responses/400_error"
41 * "401":
42 * $ref: "#/components/responses/unauthorized"
43 * "404":
44 * $ref: "#/components/responses/not_found_error"
45 * "409":
46 * $ref: "#/components/responses/invalid_state_error"
47 * "422":
48 * $ref: "#/components/responses/invalid_request_error"
49 * "500":
50 * $ref: "#/components/responses/500_error"
51 * x-badges:
52 * - text: Plugin
53 * description: |
54 * This API route is only available through the [Loyalty Plugin](https://docs.medusajs.com/resources/commerce-modules/loyalty).
55 *
56 */
57