chore(docs): Generated API Reference (v2) (#8155)

Co-authored-by: kodiakhq <kodiakhq@users.noreply.github.com>
This commit is contained in:
github-actions[bot]
2024-07-17 08:34:42 +01:00
committed by GitHub
parent 238582ee67
commit 1d40b3cc98
324 changed files with 6606 additions and 2772 deletions

View File

@@ -0,0 +1 @@
curl '{backend_url}/store/products'

View File

@@ -0,0 +1 @@
curl '{backend_url}/store/products/{id}'

View File

@@ -0,0 +1,8 @@
type: object
description: SUMMARY
x-schemaName: AdminPostReturnsConfirmRequestReqSchema
properties:
no_notification:
type: boolean
title: no_notification
description: The return's no notification.

View File

@@ -9,6 +9,10 @@ properties:
type: string
title: order_id
description: The return's order id.
location_id:
type: string
title: location_id
description: The return's location id.
description:
type: string
title: description
@@ -17,6 +21,10 @@ properties:
type: string
title: internal_note
description: The return's internal note.
no_notification:
type: boolean
title: no_notification
description: The return's no notification.
metadata:
type: object
description: The return's metadata.

View File

@@ -0,0 +1,12 @@
type: object
description: SUMMARY
x-schemaName: AdminPostReturnsRequestItemsActionReqSchema
properties:
quantity:
type: number
title: quantity
description: The return's quantity.
internal_note:
type: string
title: internal_note
description: The return's internal note.

View File

@@ -0,0 +1,33 @@
type: object
description: SUMMARY
x-schemaName: AdminPostReturnsRequestItemsReqSchema
properties:
items:
type: array
description: The return's items.
items:
type: object
description: The item's items.
required:
- id
- quantity
properties:
id:
type: string
title: id
description: The item's ID.
quantity:
type: number
title: quantity
description: The item's quantity.
description:
type: string
title: description
description: The item's description.
internal_note:
type: string
title: internal_note
description: The item's internal note.
metadata:
type: object
description: The item's metadata.

View File

@@ -0,0 +1,15 @@
type: object
description: SUMMARY
x-schemaName: AdminPostReturnsShippingActionReqSchema
properties:
custom_price:
type: number
title: custom_price
description: The return's custom price.
internal_note:
type: string
title: internal_note
description: The return's internal note.
metadata:
type: object
description: The return's metadata.

View File

@@ -0,0 +1,25 @@
type: object
description: SUMMARY
x-schemaName: AdminPostReturnsShippingReqSchema
required:
- shipping_option_id
properties:
shipping_option_id:
type: string
title: shipping_option_id
description: The return's shipping option id.
custom_price:
type: number
title: custom_price
description: The return's custom price.
description:
type: string
title: description
description: The return's description.
internal_note:
type: string
title: internal_note
description: The return's internal note.
metadata:
type: object
description: The return's metadata.

View File

@@ -27,6 +27,9 @@ tags:
- name: Product Categories
x-associatedSchema:
$ref: '#/components/schemas/StoreProductCategory'
- name: Products
x-associatedSchema:
$ref: '#/components/schemas/StoreProduct'
- name: Regions
description: |
Regions are different countries or geographical regions that the commerce store serves customers in.
@@ -2988,6 +2991,451 @@ paths:
$ref: '#/components/responses/invalid_request_error'
'500':
$ref: '#/components/responses/500_error'
/store/products:
get:
operationId: GetProducts
summary: List Products
description: Retrieve a list of products. The products can be filtered by fields such as `id`. The products can also be sorted or paginated.
x-authenticated: false
parameters:
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- name: fields
in: query
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 fields. without prefix it will replace the entire default fields.
required: false
schema:
type: string
title: fields
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 fields. without prefix it will replace the entire default fields.
- name: offset
in: query
description: The number of items to skip when retrieving a list.
required: false
schema:
type: number
title: offset
description: The number of items to skip when retrieving a list.
- name: limit
in: query
description: Limit the number of items returned in the list.
required: false
schema:
type: number
title: limit
description: Limit the number of items returned in the list.
- name: order
in: query
description: The field to sort the data by. By default, the sort order is ascending. To change the order to descending, prefix the field name with `-`.
required: false
schema:
type: string
title: order
description: The field to sort the data by. By default, the sort order is ascending. To change the order to descending, prefix the field name with `-`.
- name: region_id
in: query
description: The product's region id.
required: false
schema:
type: string
title: region_id
description: The product's region id.
- name: $and
in: query
required: false
schema: {}
- name: $or
in: query
required: false
schema: {}
- name: variants
in: query
description: The product's variants.
required: false
schema:
type: object
description: The product's variants.
properties:
status:
type: array
description: The variant's status.
items:
type: string
enum:
- draft
- proposed
- published
- rejected
options:
type: object
description: The variant's options.
required:
- value
- option_id
properties:
value:
type: string
title: value
description: The option's value.
option_id:
type: string
title: option_id
description: The option's option id.
$and: {}
$or: {}
- name: q
in: query
description: The product's q.
required: false
schema:
type: string
title: q
description: The product's q.
- name: id
in: query
required: false
schema:
oneOf:
- type: string
title: id
description: The product's ID.
- type: array
description: The product's ID.
items:
type: string
title: id
description: The id's ID.
- name: title
in: query
description: The product's title.
required: true
schema:
type: string
title: title
description: The product's title.
- name: handle
in: query
description: The product's handle.
required: true
schema:
type: string
title: handle
description: The product's handle.
- name: is_giftcard
in: query
description: The product's is giftcard.
required: true
schema:
type: boolean
title: is_giftcard
description: The product's is giftcard.
- name: category_id
in: query
description: The product's category id.
required: true
schema:
type: array
description: The product's category id.
items:
type: string
title: category_id
description: The category id's details.
- name: sales_channel_id
in: query
description: The product's sales channel id.
required: true
schema:
type: array
description: The product's sales channel id.
items:
type: string
title: sales_channel_id
description: The sales channel id's details.
- name: collection_id
in: query
description: The product's collection id.
required: true
schema:
type: array
description: The product's collection id.
items:
type: string
title: collection_id
description: The collection id's details.
- name: tags
in: query
description: The product's tags.
required: false
schema:
type: array
description: The product's tags.
items:
type: string
title: tags
description: The tag's tags.
- name: type_id
in: query
description: The product's type id.
required: false
schema:
type: array
description: The product's type id.
items:
type: string
title: type_id
description: The type id's details.
- name: created_at
in: query
description: The product's created at.
required: false
schema:
type: object
description: The product's created at.
required:
- $eq
- $ne
- $in
- $nin
- $like
- $ilike
- $re
- $contains
- $gt
- $gte
- $lt
- $lte
properties:
$eq: {}
$ne: {}
$in: {}
$nin: {}
$like: {}
$ilike: {}
$re: {}
$contains: {}
$gt: {}
$gte: {}
$lt: {}
$lte: {}
- name: updated_at
in: query
description: The product's updated at.
required: false
schema:
type: object
description: The product's updated at.
required:
- $eq
- $ne
- $in
- $nin
- $like
- $ilike
- $re
- $contains
- $gt
- $gte
- $lt
- $lte
properties:
$eq: {}
$ne: {}
$in: {}
$nin: {}
$like: {}
$ilike: {}
$re: {}
$contains: {}
$gt: {}
$gte: {}
$lt: {}
$lte: {}
- name: deleted_at
in: query
description: The product's deleted at.
required: false
schema:
type: object
description: The product's deleted at.
required:
- $eq
- $ne
- $in
- $nin
- $like
- $ilike
- $re
- $contains
- $gt
- $gte
- $lt
- $lte
properties:
$eq: {}
$ne: {}
$in: {}
$nin: {}
$like: {}
$ilike: {}
$re: {}
$contains: {}
$gt: {}
$gte: {}
$lt: {}
$lte: {}
- name: country_code
in: query
description: The product's country code.
required: false
schema:
type: string
title: country_code
description: The product's country code.
- name: province
in: query
description: The product's province.
required: false
schema:
type: string
title: province
description: The product's province.
- name: cart_id
in: query
description: The product's cart id.
required: false
schema:
type: string
title: cart_id
description: The product's cart id.
x-codeSamples:
- lang: Shell
label: cURL
source: curl '{backend_url}/store/products'
tags:
- Products
responses:
'400':
$ref: '#/components/responses/400_error'
'401':
$ref: '#/components/responses/unauthorized'
'404':
$ref: '#/components/responses/not_found_error'
'409':
$ref: '#/components/responses/invalid_state_error'
'422':
$ref: '#/components/responses/invalid_request_error'
'500':
$ref: '#/components/responses/500_error'
/store/products/{id}:
get:
operationId: GetProductsId
summary: Get a Product
description: Retrieve a product by its ID. You can expand the product's relations or select the fields that should be returned.
x-authenticated: false
parameters:
- name: id
in: path
description: The product's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: Comma-separated relations that should be expanded in the returned data.
- name: fields
in: query
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 fields. without prefix it will replace the entire default fields.
required: false
schema:
type: string
title: fields
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 fields. without prefix it will replace the entire default fields.
- name: offset
in: query
description: The number of items to skip when retrieving a list.
required: false
schema:
type: number
title: offset
description: The number of items to skip when retrieving a list.
- name: limit
in: query
description: Limit the number of items returned in the list.
required: false
schema:
type: number
title: limit
description: Limit the number of items returned in the list.
- name: order
in: query
description: The field to sort the data by. By default, the sort order is ascending. To change the order to descending, prefix the field name with `-`.
required: false
schema:
type: string
title: order
description: The field to sort the data by. By default, the sort order is ascending. To change the order to descending, prefix the field name with `-`.
- name: region_id
in: query
description: The product's region id.
required: false
schema:
type: string
title: region_id
description: The product's region id.
- name: country_code
in: query
description: The product's country code.
required: false
schema:
type: string
title: country_code
description: The product's country code.
- name: province
in: query
description: The product's province.
required: false
schema:
type: string
title: province
description: The product's province.
- name: cart_id
in: query
description: The product's cart id.
required: false
schema:
type: string
title: cart_id
description: The product's cart id.
x-codeSamples:
- lang: Shell
label: cURL
source: curl '{backend_url}/store/products/{id}'
tags:
- Products
responses:
'400':
$ref: '#/components/responses/400_error'
'401':
$ref: '#/components/responses/unauthorized'
'404':
$ref: '#/components/responses/not_found_error'
'409':
$ref: '#/components/responses/invalid_state_error'
'422':
$ref: '#/components/responses/invalid_request_error'
'500':
$ref: '#/components/responses/500_error'
/store/regions:
get:
operationId: GetRegions
@@ -5161,6 +5609,15 @@ components:
type: string
title: internal_note
description: The return's internal note.
AdminPostReturnsConfirmRequestReqSchema:
type: object
description: SUMMARY
x-schemaName: AdminPostReturnsConfirmRequestReqSchema
properties:
no_notification:
type: boolean
title: no_notification
description: The return's no notification.
AdminPostReturnsReqSchema:
type: object
description: SUMMARY
@@ -5173,6 +5630,103 @@ components:
type: string
title: order_id
description: The return's order id.
location_id:
type: string
title: location_id
description: The return's location id.
description:
type: string
title: description
description: The return's description.
internal_note:
type: string
title: internal_note
description: The return's internal note.
no_notification:
type: boolean
title: no_notification
description: The return's no notification.
metadata:
type: object
description: The return's metadata.
AdminPostReturnsRequestItemsActionReqSchema:
type: object
description: SUMMARY
x-schemaName: AdminPostReturnsRequestItemsActionReqSchema
properties:
quantity:
type: number
title: quantity
description: The return's quantity.
internal_note:
type: string
title: internal_note
description: The return's internal note.
AdminPostReturnsRequestItemsReqSchema:
type: object
description: SUMMARY
x-schemaName: AdminPostReturnsRequestItemsReqSchema
properties:
items:
type: array
description: The return's items.
items:
type: object
description: The item's items.
required:
- id
- quantity
properties:
id:
type: string
title: id
description: The item's ID.
quantity:
type: number
title: quantity
description: The item's quantity.
description:
type: string
title: description
description: The item's description.
internal_note:
type: string
title: internal_note
description: The item's internal note.
metadata:
type: object
description: The item's metadata.
AdminPostReturnsShippingActionReqSchema:
type: object
description: SUMMARY
x-schemaName: AdminPostReturnsShippingActionReqSchema
properties:
custom_price:
type: number
title: custom_price
description: The return's custom price.
internal_note:
type: string
title: internal_note
description: The return's internal note.
metadata:
type: object
description: The return's metadata.
AdminPostReturnsShippingReqSchema:
type: object
description: SUMMARY
x-schemaName: AdminPostReturnsShippingReqSchema
required:
- shipping_option_id
properties:
shipping_option_id:
type: string
title: shipping_option_id
description: The return's shipping option id.
custom_price:
type: number
title: custom_price
description: The return's custom price.
description:
type: string
title: description

View File

@@ -31,6 +31,9 @@ tags:
- name: Product Categories
x-associatedSchema:
$ref: ./components/schemas/StoreProductCategory.yaml
- name: Products
x-associatedSchema:
$ref: ./components/schemas/StoreProduct.yaml
- name: Regions
description: >
Regions are different countries or geographical regions that the commerce
@@ -92,6 +95,10 @@ paths:
$ref: paths/store_product-categories.yaml
/store/product-categories/{id}:
$ref: paths/store_product-categories_{id}.yaml
/store/products:
$ref: paths/store_products.yaml
/store/products/{id}:
$ref: paths/store_products_{id}.yaml
/store/regions:
$ref: paths/store_regions.yaml
/store/regions/{id}:

View File

@@ -0,0 +1,358 @@
get:
operationId: GetProducts
summary: List Products
description: >-
Retrieve a list of products. The products can be filtered by fields such as
`id`. The products can also be sorted or paginated.
x-authenticated: false
parameters:
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: >-
Comma-separated relations that should be expanded in the returned
data.
- name: fields
in: query
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 fields. without prefix it will
replace the entire default fields.
required: false
schema:
type: string
title: fields
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 fields. without
prefix it will replace the entire default fields.
- name: offset
in: query
description: The number of items to skip when retrieving a list.
required: false
schema:
type: number
title: offset
description: The number of items to skip when retrieving a list.
- name: limit
in: query
description: Limit the number of items returned in the list.
required: false
schema:
type: number
title: limit
description: Limit the number of items returned in the list.
- name: order
in: query
description: >-
The field to sort the data by. By default, the sort order is ascending.
To change the order to descending, prefix the field name with `-`.
required: false
schema:
type: string
title: order
description: >-
The field to sort the data by. By default, the sort order is
ascending. To change the order to descending, prefix the field name
with `-`.
- name: region_id
in: query
description: The product's region id.
required: false
schema:
type: string
title: region_id
description: The product's region id.
- name: $and
in: query
required: false
schema: {}
- name: $or
in: query
required: false
schema: {}
- name: variants
in: query
description: The product's variants.
required: false
schema:
type: object
description: The product's variants.
properties:
status:
type: array
description: The variant's status.
items:
type: string
enum:
- draft
- proposed
- published
- rejected
options:
type: object
description: The variant's options.
required:
- value
- option_id
properties:
value:
type: string
title: value
description: The option's value.
option_id:
type: string
title: option_id
description: The option's option id.
$and: {}
$or: {}
- name: q
in: query
description: The product's q.
required: false
schema:
type: string
title: q
description: The product's q.
- name: id
in: query
required: false
schema:
oneOf:
- type: string
title: id
description: The product's ID.
- type: array
description: The product's ID.
items:
type: string
title: id
description: The id's ID.
- name: title
in: query
description: The product's title.
required: true
schema:
type: string
title: title
description: The product's title.
- name: handle
in: query
description: The product's handle.
required: true
schema:
type: string
title: handle
description: The product's handle.
- name: is_giftcard
in: query
description: The product's is giftcard.
required: true
schema:
type: boolean
title: is_giftcard
description: The product's is giftcard.
- name: category_id
in: query
description: The product's category id.
required: true
schema:
type: array
description: The product's category id.
items:
type: string
title: category_id
description: The category id's details.
- name: sales_channel_id
in: query
description: The product's sales channel id.
required: true
schema:
type: array
description: The product's sales channel id.
items:
type: string
title: sales_channel_id
description: The sales channel id's details.
- name: collection_id
in: query
description: The product's collection id.
required: true
schema:
type: array
description: The product's collection id.
items:
type: string
title: collection_id
description: The collection id's details.
- name: tags
in: query
description: The product's tags.
required: false
schema:
type: array
description: The product's tags.
items:
type: string
title: tags
description: The tag's tags.
- name: type_id
in: query
description: The product's type id.
required: false
schema:
type: array
description: The product's type id.
items:
type: string
title: type_id
description: The type id's details.
- name: created_at
in: query
description: The product's created at.
required: false
schema:
type: object
description: The product's created at.
required:
- $eq
- $ne
- $in
- $nin
- $like
- $ilike
- $re
- $contains
- $gt
- $gte
- $lt
- $lte
properties:
$eq: {}
$ne: {}
$in: {}
$nin: {}
$like: {}
$ilike: {}
$re: {}
$contains: {}
$gt: {}
$gte: {}
$lt: {}
$lte: {}
- name: updated_at
in: query
description: The product's updated at.
required: false
schema:
type: object
description: The product's updated at.
required:
- $eq
- $ne
- $in
- $nin
- $like
- $ilike
- $re
- $contains
- $gt
- $gte
- $lt
- $lte
properties:
$eq: {}
$ne: {}
$in: {}
$nin: {}
$like: {}
$ilike: {}
$re: {}
$contains: {}
$gt: {}
$gte: {}
$lt: {}
$lte: {}
- name: deleted_at
in: query
description: The product's deleted at.
required: false
schema:
type: object
description: The product's deleted at.
required:
- $eq
- $ne
- $in
- $nin
- $like
- $ilike
- $re
- $contains
- $gt
- $gte
- $lt
- $lte
properties:
$eq: {}
$ne: {}
$in: {}
$nin: {}
$like: {}
$ilike: {}
$re: {}
$contains: {}
$gt: {}
$gte: {}
$lt: {}
$lte: {}
- name: country_code
in: query
description: The product's country code.
required: false
schema:
type: string
title: country_code
description: The product's country code.
- name: province
in: query
description: The product's province.
required: false
schema:
type: string
title: province
description: The product's province.
- name: cart_id
in: query
description: The product's cart id.
required: false
schema:
type: string
title: cart_id
description: The product's cart id.
x-codeSamples:
- lang: Shell
label: cURL
source:
$ref: ../code_samples/Shell/store_products/get.sh
tags:
- Products
responses:
'400':
$ref: ../components/responses/400_error.yaml
'401':
$ref: ../components/responses/unauthorized.yaml
'404':
$ref: ../components/responses/not_found_error.yaml
'409':
$ref: ../components/responses/invalid_state_error.yaml
'422':
$ref: ../components/responses/invalid_request_error.yaml
'500':
$ref: ../components/responses/500_error.yaml

View File

@@ -0,0 +1,121 @@
get:
operationId: GetProductsId
summary: Get a Product
description: >-
Retrieve a product by its ID. You can expand the product's relations or
select the fields that should be returned.
x-authenticated: false
parameters:
- name: id
in: path
description: The product's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: >-
Comma-separated relations that should be expanded in the returned
data.
- name: fields
in: query
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 fields. without prefix it will
replace the entire default fields.
required: false
schema:
type: string
title: fields
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 fields. without
prefix it will replace the entire default fields.
- name: offset
in: query
description: The number of items to skip when retrieving a list.
required: false
schema:
type: number
title: offset
description: The number of items to skip when retrieving a list.
- name: limit
in: query
description: Limit the number of items returned in the list.
required: false
schema:
type: number
title: limit
description: Limit the number of items returned in the list.
- name: order
in: query
description: >-
The field to sort the data by. By default, the sort order is ascending.
To change the order to descending, prefix the field name with `-`.
required: false
schema:
type: string
title: order
description: >-
The field to sort the data by. By default, the sort order is
ascending. To change the order to descending, prefix the field name
with `-`.
- name: region_id
in: query
description: The product's region id.
required: false
schema:
type: string
title: region_id
description: The product's region id.
- name: country_code
in: query
description: The product's country code.
required: false
schema:
type: string
title: country_code
description: The product's country code.
- name: province
in: query
description: The product's province.
required: false
schema:
type: string
title: province
description: The product's province.
- name: cart_id
in: query
description: The product's cart id.
required: false
schema:
type: string
title: cart_id
description: The product's cart id.
x-codeSamples:
- lang: Shell
label: cURL
source:
$ref: ../code_samples/Shell/store_products_{id}/get.sh
tags:
- Products
responses:
'400':
$ref: ../components/responses/400_error.yaml
'401':
$ref: ../components/responses/unauthorized.yaml
'404':
$ref: ../components/responses/not_found_error.yaml
'409':
$ref: ../components/responses/invalid_state_error.yaml
'422':
$ref: ../components/responses/invalid_request_error.yaml
'500':
$ref: ../components/responses/500_error.yaml