1 get:
2 operationId: GetStockLocations
3 summary: List Stock Locations
4 description: >-
5 Retrieve a list of stock locations. The stock locations can be filtered by
6 fields such as `id`. The stock locations can also be sorted or paginated.
7 x-authenticated: true
8 parameters:
9 - name: fields
10 in: query
11 description: >-
12 Comma-separated fields that should be included in the returned data. if
13 a field is prefixed with `+` it will be added to the default fields,
14 using `-` will remove it from the default fields. without prefix it will
15 replace the entire default fields.
16 required: false
17 schema:
18 type: string
19 title: fields
20 description: >-
21 Comma-separated fields that should be included in the returned data.
22 if a field is prefixed with `+` it will be added to the default
23 fields, using `-` will remove it from the default fields. without
24 prefix it will replace the entire default fields.
25 externalDocs:
26 url: '#select-fields-and-relations'
27 - name: offset
28 in: query
29 description: The number of items to skip when retrieving a list.
30 required: false
31 schema:
32 type: number
33 title: offset
34 description: The number of items to skip when retrieving a list.
35 externalDocs:
36 url: '#pagination'
37 - name: limit
38 in: query
39 description: Limit the number of items returned in the list.
40 required: false
41 schema:
42 type: number
43 title: limit
44 description: Limit the number of items returned in the list.
45 externalDocs:
46 url: '#pagination'
47 - name: order
48 in: query
49 description: >-
50 The field to sort the data by. By default, the sort order is ascending.
51 To change the order to descending, prefix the field name with `-`.
52 required: false
53 schema:
54 type: string
55 title: order
56 description: >-
57 The field to sort the data by. By default, the sort order is
58 ascending. To change the order to descending, prefix the field name
59 with `-`.
60 - name: q
61 in: query
62 description: Search term to filter the stock location's searchable properties.
63 required: false
64 schema:
65 type: string
66 title: q
67 description: Search term to filter the stock location's searchable properties.
68 - name: id
69 in: query
70 required: false
71 schema:
72 oneOf:
73 - type: string
74 title: id
75 description: Filter by a stock location ID.
76 - type: array
77 description: Filter by stock location IDs.
78 items:
79 type: string
80 title: id
81 description: A stock location ID.
82 - name: name
83 in: query
84 required: false
85 schema:
86 oneOf:
87 - type: string
88 title: name
89 description: Filter by a stock location name.
90 - type: array
91 description: Filter by stock location names.
92 items:
93 type: string
94 title: name
95 description: A stock location name.
96 - name: address_id
97 in: query
98 required: false
99 schema:
100 oneOf:
101 - type: string
102 title: address_id
103 description: Filter by an address ID to retrieve its associated locations.
104 - type: array
105 description: Filter by address IDs to retrieve their associated locations.
106 items:
107 type: string
108 title: address_id
109 description: An address ID.
110 - name: sales_channel_id
111 in: query
112 required: false
113 schema:
114 oneOf:
115 - type: string
116 title: sales_channel_id
117 description: Filter by a sales channel ID to retrieve its associated locations.
118 - type: array
119 description: >-
120 Filter by sales channel IDs to retrieve their associated
121 locations.
122 items:
123 type: string
124 title: sales_channel_id
125 description: A sales channel ID
126 - name: created_at
127 in: query
128 description: Filter by a stock location's creation date.
129 required: false
130 schema:
131 type: object
132 description: Filter by a stock location's creation date.
133 properties:
134 $and:
135 type: array
136 description: >-
137 Join query parameters with an AND condition. Each object's content
138 is the same type as the expected query parameters.
139 items:
140 type: object
141 title: $and
142 $or:
143 type: array
144 description: >-
145 Join query parameters with an OR condition. Each object's content
146 is the same type as the expected query parameters.
147 items:
148 type: object
149 title: $or
150 $eq:
151 oneOf:
152 - type: string
153 title: $eq
154 description: Filter by an exact match.
155 - type: array
156 description: Filter by an exact match.
157 items:
158 type: string
159 title: $eq
160 description: Filter by an exact match.
161 $ne:
162 type: string
163 title: $ne
164 description: Filter by values not equal to this parameter.
165 $in:
166 type: array
167 description: Filter by values in this array.
168 items:
169 type: string
170 title: $in
171 description: Filter by values in this array.
172 $nin:
173 type: array
174 description: Filter by values not in this array.
175 items:
176 type: string
177 title: $nin
178 description: Filter by values not in this array.
179 $not:
180 oneOf:
181 - type: string
182 title: $not
183 description: >-
184 Filter by values not matching the conditions in this
185 parameter.
186 - type: object
187 description: >-
188 Filter by values not matching the conditions in this
189 parameter.
190 - type: array
191 description: >-
192 Filter by values not matching the conditions in this
193 parameter.
194 items:
195 type: string
196 title: $not
197 description: >-
198 Filter by values not matching the conditions in this
199 parameter.
200 $gt:
201 type: string
202 title: $gt
203 description: >-
204 Filter by values greater than this parameter. Useful for numbers
205 and dates only.
206 $gte:
207 type: string
208 title: $gte
209 description: >-
210 Filter by values greater than or equal to this parameter. Useful
211 for numbers and dates only.
212 $lt:
213 type: string
214 title: $lt
215 description: >-
216 Filter by values less than this parameter. Useful for numbers and
217 dates only.
218 $lte:
219 type: string
220 title: $lte
221 description: >-
222 Filter by values less than or equal to this parameter. Useful for
223 numbers and dates only.
224 $like:
225 type: string
226 title: $like
227 description: Apply a `like` filter. Useful for strings only.
228 $re:
229 type: string
230 title: $re
231 description: Apply a regex filter. Useful for strings only.
232 $ilike:
233 type: string
234 title: $ilike
235 description: Apply a case-insensitive `like` filter. Useful for strings only.
236 $fulltext:
237 type: string
238 title: $fulltext
239 description: Filter to apply on full-text properties.
240 $overlap:
241 type: array
242 description: Filter arrays that have overlapping values with this parameter.
243 items:
244 type: string
245 title: $overlap
246 description: Filter arrays that have overlapping values with this parameter.
247 $contains:
248 type: array
249 description: Filter arrays that contain some of the values of this parameter.
250 items:
251 type: string
252 title: $contains
253 description: Filter arrays that contain some of the values of this parameter.
254 $contained:
255 type: array
256 description: Filter arrays that contain all values of this parameter.
257 items:
258 type: string
259 title: $contained
260 description: Filter arrays that contain all values of this parameter.
261 $exists:
262 type: boolean
263 title: $exists
264 description: Filter by whether a value for this parameter exists (not `null`).
265 title: created_at
266 - name: updated_at
267 in: query
268 description: Filter by a stock location's update date.
269 required: false
270 schema:
271 type: object
272 description: Filter by a stock location's update date.
273 properties:
274 $and:
275 type: array
276 description: >-
277 Join query parameters with an AND condition. Each object's content
278 is the same type as the expected query parameters.
279 items:
280 type: object
281 title: $and
282 $or:
283 type: array
284 description: >-
285 Join query parameters with an OR condition. Each object's content
286 is the same type as the expected query parameters.
287 items:
288 type: object
289 title: $or
290 $eq:
291 oneOf:
292 - type: string
293 title: $eq
294 description: Filter by an exact match.
295 - type: array
296 description: Filter by an exact match.
297 items:
298 type: string
299 title: $eq
300 description: Filter by an exact match.
301 $ne:
302 type: string
303 title: $ne
304 description: Filter by values not equal to this parameter.
305 $in:
306 type: array
307 description: Filter by values in this array.
308 items:
309 type: string
310 title: $in
311 description: Filter by values in this array.
312 $nin:
313 type: array
314 description: Filter by values not in this array.
315 items:
316 type: string
317 title: $nin
318 description: Filter by values not in this array.
319 $not:
320 oneOf:
321 - type: string
322 title: $not
323 description: >-
324 Filter by values not matching the conditions in this
325 parameter.
326 - type: object
327 description: >-
328 Filter by values not matching the conditions in this
329 parameter.
330 - type: array
331 description: >-
332 Filter by values not matching the conditions in this
333 parameter.
334 items:
335 type: string
336 title: $not
337 description: >-
338 Filter by values not matching the conditions in this
339 parameter.
340 $gt:
341 type: string
342 title: $gt
343 description: >-
344 Filter by values greater than this parameter. Useful for numbers
345 and dates only.
346 $gte:
347 type: string
348 title: $gte
349 description: >-
350 Filter by values greater than or equal to this parameter. Useful
351 for numbers and dates only.
352 $lt:
353 type: string
354 title: $lt
355 description: >-
356 Filter by values less than this parameter. Useful for numbers and
357 dates only.
358 $lte:
359 type: string
360 title: $lte
361 description: >-
362 Filter by values less than or equal to this parameter. Useful for
363 numbers and dates only.
364 $like:
365 type: string
366 title: $like
367 description: Apply a `like` filter. Useful for strings only.
368 $re:
369 type: string
370 title: $re
371 description: Apply a regex filter. Useful for strings only.
372 $ilike:
373 type: string
374 title: $ilike
375 description: Apply a case-insensitive `like` filter. Useful for strings only.
376 $fulltext:
377 type: string
378 title: $fulltext
379 description: Filter to apply on full-text properties.
380 $overlap:
381 type: array
382 description: Filter arrays that have overlapping values with this parameter.
383 items:
384 type: string
385 title: $overlap
386 description: Filter arrays that have overlapping values with this parameter.
387 $contains:
388 type: array
389 description: Filter arrays that contain some of the values of this parameter.
390 items:
391 type: string
392 title: $contains
393 description: Filter arrays that contain some of the values of this parameter.
394 $contained:
395 type: array
396 description: Filter arrays that contain all values of this parameter.
397 items:
398 type: string
399 title: $contained
400 description: Filter arrays that contain all values of this parameter.
401 $exists:
402 type: boolean
403 title: $exists
404 description: Filter by whether a value for this parameter exists (not `null`).
405 title: updated_at
406 - name: deleted_at
407 in: query
408 description: Filter by a stock location's deletion date.
409 required: false
410 schema:
411 type: object
412 description: Filter by a stock location's deletion date.
413 properties:
414 $and:
415 type: array
416 description: >-
417 Join query parameters with an AND condition. Each object's content
418 is the same type as the expected query parameters.
419 items:
420 type: object
421 title: $and
422 $or:
423 type: array
424 description: >-
425 Join query parameters with an OR condition. Each object's content
426 is the same type as the expected query parameters.
427 items:
428 type: object
429 title: $or
430 $eq:
431 oneOf:
432 - type: string
433 title: $eq
434 description: Filter by an exact match.
435 - type: array
436 description: Filter by an exact match.
437 items:
438 type: string
439 title: $eq
440 description: Filter by an exact match.
441 $ne:
442 type: string
443 title: $ne
444 description: Filter by values not equal to this parameter.
445 $in:
446 type: array
447 description: Filter by values in this array.
448 items:
449 type: string
450 title: $in
451 description: Filter by values in this array.
452 $nin:
453 type: array
454 description: Filter by values not in this array.
455 items:
456 type: string
457 title: $nin
458 description: Filter by values not in this array.
459 $not:
460 oneOf:
461 - type: string
462 title: $not
463 description: >-
464 Filter by values not matching the conditions in this
465 parameter.
466 - type: object
467 description: >-
468 Filter by values not matching the conditions in this
469 parameter.
470 - type: array
471 description: >-
472 Filter by values not matching the conditions in this
473 parameter.
474 items:
475 type: string
476 title: $not
477 description: >-
478 Filter by values not matching the conditions in this
479 parameter.
480 $gt:
481 type: string
482 title: $gt
483 description: >-
484 Filter by values greater than this parameter. Useful for numbers
485 and dates only.
486 $gte:
487 type: string
488 title: $gte
489 description: >-
490 Filter by values greater than or equal to this parameter. Useful
491 for numbers and dates only.
492 $lt:
493 type: string
494 title: $lt
495 description: >-
496 Filter by values less than this parameter. Useful for numbers and
497 dates only.
498 $lte:
499 type: string
500 title: $lte
501 description: >-
502 Filter by values less than or equal to this parameter. Useful for
503 numbers and dates only.
504 $like:
505 type: string
506 title: $like
507 description: Apply a `like` filter. Useful for strings only.
508 $re:
509 type: string
510 title: $re
511 description: Apply a regex filter. Useful for strings only.
512 $ilike:
513 type: string
514 title: $ilike
515 description: Apply a case-insensitive `like` filter. Useful for strings only.
516 $fulltext:
517 type: string
518 title: $fulltext
519 description: Filter to apply on full-text properties.
520 $overlap:
521 type: array
522 description: Filter arrays that have overlapping values with this parameter.
523 items:
524 type: string
525 title: $overlap
526 description: Filter arrays that have overlapping values with this parameter.
527 $contains:
528 type: array
529 description: Filter arrays that contain some of the values of this parameter.
530 items:
531 type: string
532 title: $contains
533 description: Filter arrays that contain some of the values of this parameter.
534 $contained:
535 type: array
536 description: Filter arrays that contain all values of this parameter.
537 items:
538 type: string
539 title: $contained
540 description: Filter arrays that contain all values of this parameter.
541 $exists:
542 type: boolean
543 title: $exists
544 description: Filter by whether a value for this parameter exists (not `null`).
545 title: deleted_at
546 - name: $and
547 in: query
548 required: false
549 schema:
550 type: array
551 description: >-
552 Join query parameters with an AND condition. Each object's content is
553 the same type as the expected query parameters.
554 items:
555 type: object
556 title: $and
557 - name: $or
558 in: query
559 required: false
560 schema:
561 type: array
562 description: >-
563 Join query parameters with an OR condition. Each object's content is
564 the same type as the expected query parameters.
565 items:
566 type: object
567 title: $or
568 - name: with_deleted
569 in: query
570 description: Whether to include deleted records in the result.
571 required: false
572 schema:
573 type: boolean
574 title: with_deleted
575 description: Whether to include deleted records in the result.
576 security:
577 - api_token: []
578 - cookie_auth: []
579 - jwt_token: []
580 x-codeSamples:
581 - lang: JavaScript
582 label: JS SDK
583 source:
584 $ref: ../code_samples/JavaScript/admin_stock-locations/get.js
585 - lang: Shell
586 label: cURL
587 source:
588 $ref: ../code_samples/Shell/admin_stock-locations/get.sh
589 tags:
590 - Stock Locations
591 responses:
592 '200':
593 description: OK
594 content:
595 application/json:
596 schema:
597 $ref: ../components/schemas/AdminStockLocationListResponse.yaml
598 '400':
599 $ref: ../components/responses/400_error.yaml
600 '401':
601 $ref: ../components/responses/unauthorized.yaml
602 '404':
603 $ref: ../components/responses/not_found_error.yaml
604 '409':
605 $ref: ../components/responses/invalid_state_error.yaml
606 '422':
607 $ref: ../components/responses/invalid_request_error.yaml
608 '500':
609 $ref: ../components/responses/500_error.yaml
610 post:
611 operationId: PostStockLocations
612 summary: Create Stock Location
613 description: Create a stock location.
614 x-authenticated: true
615 parameters:
616 - name: fields
617 in: query
618 description: >-
619 Comma-separated fields that should be included in the returned data. if
620 a field is prefixed with `+` it will be added to the default fields,
621 using `-` will remove it from the default fields. without prefix it will
622 replace the entire default fields.
623 required: false
624 schema:
625 type: string
626 title: fields
627 description: >-
628 Comma-separated fields that should be included in the returned data.
629 if a field is prefixed with `+` it will be added to the default
630 fields, using `-` will remove it from the default fields. without
631 prefix it will replace the entire default fields.
632 externalDocs:
633 url: '#select-fields-and-relations'
634 security:
635 - api_token: []
636 - cookie_auth: []
637 - jwt_token: []
638 requestBody:
639 content:
640 application/json:
641 schema:
642 $ref: ../components/schemas/AdminCreateStockLocation.yaml
643 x-codeSamples:
644 - lang: JavaScript
645 label: JS SDK
646 source:
647 $ref: ../code_samples/JavaScript/admin_stock-locations/post.js
648 - lang: Shell
649 label: cURL
650 source:
651 $ref: ../code_samples/Shell/admin_stock-locations/post.sh
652 tags:
653 - Stock Locations
654 responses:
655 '200':
656 description: OK
657 content:
658 application/json:
659 schema:
660 $ref: ../components/schemas/AdminStockLocationResponse.yaml
661 '400':
662 $ref: ../components/responses/400_error.yaml
663 '401':
664 $ref: ../components/responses/unauthorized.yaml
665 '404':
666 $ref: ../components/responses/not_found_error.yaml
667 '409':
668 $ref: ../components/responses/invalid_state_error.yaml
669 '422':
670 $ref: ../components/responses/invalid_request_error.yaml
671 '500':
672 $ref: ../components/responses/500_error.yaml
673 x-workflow: createStockLocationsWorkflow
674 x-events: []