1 get:
2 operationId: GetInventoryItemsId
3 summary: Get a Inventory Item
4 description: >-
5 Retrieve a inventory item by its ID. You can expand the inventory item's
6 relations or select the fields that should be returned.
7 x-authenticated: true
8 parameters:
9 - name: id
10 in: path
11 description: The inventory item's ID.
12 required: true
13 schema:
14 type: string
15 - name: fields
16 in: query
17 description: >-
18 Comma-separated fields that should be included in the returned data. if
19 a field is prefixed with `+` it will be added to the default fields,
20 using `-` will remove it from the default fields. without prefix it will
21 replace the entire default fields.
22 required: false
23 schema:
24 type: string
25 title: fields
26 description: >-
27 Comma-separated fields that should be included in the returned data.
28 if a field is prefixed with `+` it will be added to the default
29 fields, using `-` will remove it from the default fields. without
30 prefix it will replace the entire default fields.
31 externalDocs:
32 url: '#select-fields-and-relations'
33 security:
34 - api_token: []
35 - cookie_auth: []
36 - jwt_token: []
37 x-codeSamples:
38 - lang: JavaScript
39 label: JS SDK
40 source:
41 $ref: ../code_samples/JavaScript/admin_inventory-items_{id}/get.js
42 - lang: Shell
43 label: cURL
44 source:
45 $ref: ../code_samples/Shell/admin_inventory-items_{id}/get.sh
46 tags:
47 - Inventory Items
48 responses:
49 '200':
50 description: OK
51 content:
52 application/json:
53 schema:
54 $ref: ../components/schemas/AdminInventoryItemResponse.yaml
55 '400':
56 $ref: ../components/responses/400_error.yaml
57 '401':
58 $ref: ../components/responses/unauthorized.yaml
59 '404':
60 $ref: ../components/responses/not_found_error.yaml
61 '409':
62 $ref: ../components/responses/invalid_state_error.yaml
63 '422':
64 $ref: ../components/responses/invalid_request_error.yaml
65 '500':
66 $ref: ../components/responses/500_error.yaml
67 post:
68 operationId: PostInventoryItemsId
69 summary: Update an Inventory Item
70 description: Update an inventory item's details.
71 x-authenticated: true
72 parameters:
73 - name: id
74 in: path
75 description: The inventory item's ID.
76 required: true
77 schema:
78 type: string
79 - name: fields
80 in: query
81 description: >-
82 Comma-separated fields that should be included in the returned data. if
83 a field is prefixed with `+` it will be added to the default fields,
84 using `-` will remove it from the default fields. without prefix it will
85 replace the entire default fields.
86 required: false
87 schema:
88 type: string
89 title: fields
90 description: >-
91 Comma-separated fields that should be included in the returned data.
92 if a field is prefixed with `+` it will be added to the default
93 fields, using `-` will remove it from the default fields. without
94 prefix it will replace the entire default fields.
95 externalDocs:
96 url: '#select-fields-and-relations'
97 security:
98 - api_token: []
99 - cookie_auth: []
100 - jwt_token: []
101 requestBody:
102 content:
103 application/json:
104 schema:
105 $ref: ../components/schemas/AdminUpdateInventoryItem.yaml
106 x-codeSamples:
107 - lang: JavaScript
108 label: JS SDK
109 source:
110 $ref: ../code_samples/JavaScript/admin_inventory-items_{id}/post.js
111 - lang: Shell
112 label: cURL
113 source:
114 $ref: ../code_samples/Shell/admin_inventory-items_{id}/post.sh
115 tags:
116 - Inventory Items
117 responses:
118 '200':
119 description: OK
120 content:
121 application/json:
122 schema:
123 $ref: ../components/schemas/AdminInventoryItemResponse.yaml
124 '400':
125 $ref: ../components/responses/400_error.yaml
126 '401':
127 $ref: ../components/responses/unauthorized.yaml
128 '404':
129 $ref: ../components/responses/not_found_error.yaml
130 '409':
131 $ref: ../components/responses/invalid_state_error.yaml
132 '422':
133 $ref: ../components/responses/invalid_request_error.yaml
134 '500':
135 $ref: ../components/responses/500_error.yaml
136 x-workflow: updateInventoryItemsWorkflow
137 x-events:
138 - name: inventory-item.updated
139 payload: |-
140 ```ts
141 {
142 id, // The ID of the inventory item
143 }
144 ```
145 description: Emitted when inventory items are updated.
146 deprecated: false
147 since: 2.18.0
148 delete:
149 operationId: DeleteInventoryItemsId
150 summary: Delete Inventory Item
151 description: Delete an inventory item.
152 x-authenticated: true
153 parameters:
154 - name: id
155 in: path
156 description: The inventory item's ID.
157 required: true
158 schema:
159 type: string
160 security:
161 - api_token: []
162 - cookie_auth: []
163 - jwt_token: []
164 x-codeSamples:
165 - lang: JavaScript
166 label: JS SDK
167 source:
168 $ref: ../code_samples/JavaScript/admin_inventory-items_{id}/delete.js
169 - lang: Shell
170 label: cURL
171 source:
172 $ref: ../code_samples/Shell/admin_inventory-items_{id}/delete.sh
173 tags:
174 - Inventory Items
175 responses:
176 '200':
177 description: OK
178 content:
179 application/json:
180 schema:
181 type: object
182 description: The deletion's details.
183 required:
184 - id
185 - object
186 - deleted
187 properties:
188 id:
189 type: string
190 title: id
191 description: The inventory item's ID.
192 object:
193 type: string
194 title: object
195 description: The name of the deleted object.
196 default: inventory_item
197 deleted:
198 type: boolean
199 title: deleted
200 description: Whether the inventory item was deleted.
201 '400':
202 $ref: ../components/responses/400_error.yaml
203 '401':
204 $ref: ../components/responses/unauthorized.yaml
205 '404':
206 $ref: ../components/responses/not_found_error.yaml
207 '409':
208 $ref: ../components/responses/invalid_state_error.yaml
209 '422':
210 $ref: ../components/responses/invalid_request_error.yaml
211 '500':
212 $ref: ../components/responses/500_error.yaml
213 x-workflow: deleteInventoryItemWorkflow
214 x-events:
215 - name: inventory-item.deleted
216 payload: |-
217 ```ts
218 {
219 id, // The ID of the inventory item
220 }
221 ```
222 description: Emitted when inventory items are deleted.
223 deprecated: false
224 since: 2.18.0