@@ -102,6 +102,12 @@ curl -X POST 'http://localhost:9000/admin/products' \
|
|||||||
-H 'Authorization: Bearer {token}' \
|
-H 'Authorization: Bearer {token}' \
|
||||||
--data '{
|
--data '{
|
||||||
"title": "Product 1",
|
"title": "Product 1",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"title": "Default option",
|
||||||
|
"values": ["Default option value"]
|
||||||
|
}
|
||||||
|
],
|
||||||
"additional_data": {
|
"additional_data": {
|
||||||
"brand": "Acme"
|
"brand": "Acme"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -189,6 +189,12 @@ curl -X POST 'http://localhost:9000/admin/products' \
|
|||||||
-H 'Authorization: Bearer {token}' \
|
-H 'Authorization: Bearer {token}' \
|
||||||
--data '{
|
--data '{
|
||||||
"title": "Product 1",
|
"title": "Product 1",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"title": "Default option",
|
||||||
|
"values": ["Default option value"]
|
||||||
|
}
|
||||||
|
],
|
||||||
"additional_data": {
|
"additional_data": {
|
||||||
"brand_id": "01J7AX9ES4X113HKY6C681KDZ2J"
|
"brand_id": "01J7AX9ES4X113HKY6C681KDZ2J"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -313,6 +313,12 @@ curl -X POST 'localhost:9000/admin/products' \
|
|||||||
-H 'Authorization: Bearer {token}' \
|
-H 'Authorization: Bearer {token}' \
|
||||||
--data '{
|
--data '{
|
||||||
"title": "Shoes",
|
"title": "Shoes",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"title": "Default option",
|
||||||
|
"values": ["Default option value"]
|
||||||
|
}
|
||||||
|
],
|
||||||
"additional_data": {
|
"additional_data": {
|
||||||
"custom_name": "test"
|
"custom_name": "test"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,7 +50,13 @@
|
|||||||
* -H 'Authorization: Bearer {access_token}' \
|
* -H 'Authorization: Bearer {access_token}' \
|
||||||
* -H 'Content-Type: application/json' \
|
* -H 'Content-Type: application/json' \
|
||||||
* --data-raw '{
|
* --data-raw '{
|
||||||
* "title": "{value}"
|
* "title": "{value}",
|
||||||
|
* "options": [
|
||||||
|
* {
|
||||||
|
* "title": "Default option",
|
||||||
|
* "values": ["Default option value"]
|
||||||
|
* }
|
||||||
|
* ]
|
||||||
* }'
|
* }'
|
||||||
* tags:
|
* tags:
|
||||||
* - Products
|
* - Products
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
* x-schemaName: AdminCreateProduct
|
* x-schemaName: AdminCreateProduct
|
||||||
* required:
|
* required:
|
||||||
* - title
|
* - title
|
||||||
|
* - options
|
||||||
* properties:
|
* properties:
|
||||||
* title:
|
* title:
|
||||||
* type: string
|
* type: string
|
||||||
|
|||||||
Reference in New Issue
Block a user