docs: update curl request to /admin/products (#9641)

Closes DX-1026
This commit is contained in:
Shahed Nasser
2024-10-17 16:21:31 +00:00
committed by GitHub
parent 4ca5510da9
commit 8fddabce04
5 changed files with 26 additions and 1 deletions
@@ -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