|
1
|
get: |
|
2
|
operationId: GetGiftCardsId |
|
3
|
summary: Get a Gift Card |
|
4
|
description: >- |
|
5
|
Retrieve a gift card by its ID. You can expand the gift card's relations or |
|
6
|
select the fields that should be returned. |
|
7
|
x-authenticated: 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
|
x-codeSamples: |
|
20
|
- lang: Shell |
|
21
|
label: cURL |
|
22
|
source: |
|
23
|
$ref: ../code_samples/Shell/admin_gift-cards_{id}/get.sh |
|
24
|
tags: |
|
25
|
- Gift Cards |
|
26
|
responses: |
|
27
|
'200': |
|
28
|
description: OK |
|
29
|
content: |
|
30
|
application/json: |
|
31
|
schema: |
|
32
|
$ref: ../components/schemas/AdminGiftCardResponse.yaml |
|
33
|
'400': |
|
34
|
$ref: ../components/responses/400_error.yaml |
|
35
|
'401': |
|
36
|
$ref: ../components/responses/unauthorized.yaml |
|
37
|
'404': |
|
38
|
$ref: ../components/responses/not_found_error.yaml |
|
39
|
'409': |
|
40
|
$ref: ../components/responses/invalid_state_error.yaml |
|
41
|
'422': |
|
42
|
$ref: ../components/responses/invalid_request_error.yaml |
|
43
|
'500': |
|
44
|
$ref: ../components/responses/500_error.yaml |
|
45
|
x-badges: |
|
46
|
- text: Loyalty Plugin |
|
47
|
description: > |
|
48
|
This API route is only available through the [Loyalty |
|
49
|
Plugin](https://docs.medusajs.com/resources/commerce-modules/loyalty). |
|
50
|
post: |
|
51
|
operationId: PostGiftCardsId |
|
52
|
summary: Update a Gift Card |
|
53
|
description: Update a gift card's details. |
|
54
|
x-authenticated: true |
|
55
|
x-ignoreCleanup: true |
|
56
|
parameters: |
|
57
|
- name: id |
|
58
|
in: path |
|
59
|
description: The gift card's ID. |
|
60
|
required: true |
|
61
|
schema: |
|
62
|
type: string |
|
63
|
security: |
|
64
|
- api_token: [] |
|
65
|
- cookie_auth: [] |
|
66
|
- jwt_token: [] |
|
67
|
requestBody: |
|
68
|
content: |
|
69
|
application/json: |
|
70
|
schema: |
|
71
|
$ref: ../components/schemas/AdminUpdateGiftCardParams.yaml |
|
72
|
x-codeSamples: |
|
73
|
- lang: Shell |
|
74
|
label: cURL |
|
75
|
source: |
|
76
|
$ref: ../code_samples/Shell/admin_gift-cards_{id}/post.sh |
|
77
|
tags: |
|
78
|
- Gift Cards |
|
79
|
responses: |
|
80
|
'200': |
|
81
|
description: OK |
|
82
|
content: |
|
83
|
application/json: |
|
84
|
schema: |
|
85
|
$ref: ../components/schemas/AdminGiftCardResponse.yaml |
|
86
|
'400': |
|
87
|
$ref: ../components/responses/400_error.yaml |
|
88
|
'401': |
|
89
|
$ref: ../components/responses/unauthorized.yaml |
|
90
|
'404': |
|
91
|
$ref: ../components/responses/not_found_error.yaml |
|
92
|
'409': |
|
93
|
$ref: ../components/responses/invalid_state_error.yaml |
|
94
|
'422': |
|
95
|
$ref: ../components/responses/invalid_request_error.yaml |
|
96
|
'500': |
|
97
|
$ref: ../components/responses/500_error.yaml |
|
98
|
x-badges: |
|
99
|
- text: Plugin |
|
100
|
description: > |
|
101
|
This API route is only available through the [Loyalty |
|
102
|
Plugin](https://docs.medusajs.com/resources/commerce-modules/loyalty). |