docs: redesigned code blocks (#2745)
* docs: redesigned code blocks to include titles * docs: added a title where necessary
This commit is contained in:
@@ -95,10 +95,10 @@ fetch(`<YOUR_SERVER>/admin/uploads`, {
|
||||
<TabItem value="curl" label="cURL">
|
||||
|
||||
```bash
|
||||
curl --location --request POST '<YOUR_SERVER>/admin/uploads' \
|
||||
--header 'Authorization: Bearer {api_token}' \
|
||||
--header 'Content-Type: text/csv' \
|
||||
--form 'files=@"<FILE_PATH_1>"'
|
||||
curl -L -X POST '<YOUR_SERVER>/admin/uploads' \
|
||||
-H 'Authorization: Bearer {api_token}' \
|
||||
-H 'Content-Type: text/csv' \
|
||||
-F 'files=@"<FILE_PATH_1>"'
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
@@ -158,9 +158,9 @@ fetch(`<YOUR_SERVER>/admin/batch-jobs`, {
|
||||
<TabItem value="curl" label="cURL">
|
||||
|
||||
```bash
|
||||
curl --location --request POST '<YOUR_SERVER>/admin/batch-jobs' \
|
||||
--header 'Authorization: Bearer {api_token}' \
|
||||
--header 'Content-Type: application/json' \
|
||||
curl -L -X POST '<YOUR_SERVER>/admin/batch-jobs' \
|
||||
-H 'Authorization: Bearer {api_token}' \
|
||||
-H 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
"type": "price-list-import",
|
||||
"context": {
|
||||
@@ -225,8 +225,8 @@ fetch(`<YOUR_SERVER>/admin/batch-jobs/${batchJobId}`, {
|
||||
<TabItem value="curl" label="cURL">
|
||||
|
||||
```bash
|
||||
curl --location --request GET '<YOUR_SERVER>/admin/batch-jobs/<BATCH_JOB_ID>' \
|
||||
--header 'Authorization: Bearer {api_token}'
|
||||
curl -L -X GET '<YOUR_SERVER>/admin/batch-jobs/<BATCH_JOB_ID>' \
|
||||
-H 'Authorization: Bearer {api_token}'
|
||||
# <BATCH_JOB_ID> is the ID of the batch job
|
||||
```
|
||||
|
||||
@@ -239,7 +239,7 @@ If the batch job has been pre-processed, the status of the batch job will be `pr
|
||||
|
||||
Here’s an example of the `result` property:
|
||||
|
||||
```json noHeader
|
||||
```json noReport
|
||||
"result": {
|
||||
"count": 5, // Total number of prices to be added
|
||||
"stat_descriptors": [ //details about the prices to be added
|
||||
@@ -287,8 +287,8 @@ fetch(`<YOUR_SERVER>/admin/batch-jobs/${batchJobId}/confirm`, {
|
||||
<TabItem value="curl" label="cURL">
|
||||
|
||||
```bash
|
||||
curl --location --request POST '<YOUR_SERVER>/admin/batch-jobs/<BATCH_JOB_ID>/confirm' \
|
||||
--header 'Authorization: Bearer {api_token}'
|
||||
curl -L -X POST '<YOUR_SERVER>/admin/batch-jobs/<BATCH_JOB_ID>/confirm' \
|
||||
-H 'Authorization: Bearer {api_token}'
|
||||
# <BATCH_JOB_ID> is the ID of the batch job
|
||||
```
|
||||
|
||||
|
||||
@@ -89,10 +89,10 @@ fetch(`<YOUR_SERVER>/admin/uploads`, {
|
||||
<TabItem value="curl" label="cURL">
|
||||
|
||||
```bash
|
||||
curl --location --request POST '<YOUR_SERVER>/admin/uploads' \
|
||||
--header 'Authorization: Bearer <API_TOKEN>' \
|
||||
--header 'Content-Type: text/csv' \
|
||||
--form 'files=@"<FILE_PATH_1>"'
|
||||
curl -L -X POST '<YOUR_SERVER>/admin/uploads' \
|
||||
-H 'Authorization: Bearer <API_TOKEN>' \
|
||||
-H 'Content-Type: text/csv' \
|
||||
-F 'files=@"<FILE_PATH_1>"'
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
@@ -150,9 +150,9 @@ fetch(`<YOUR_SERVER>/admin/batch-jobs`, {
|
||||
<TabItem value="curl" label="cURL">
|
||||
|
||||
```bash
|
||||
curl --location --request POST '<YOUR_SERVER>/admin/batch-jobs' \
|
||||
--header 'Authorization: Bearer <API_TOKEN>' \
|
||||
--header 'Content-Type: application/json' \
|
||||
curl -L -X POST '<YOUR_SERVER>/admin/batch-jobs' \
|
||||
-H 'Authorization: Bearer <API_TOKEN>' \
|
||||
-H 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
"type": "product-import",
|
||||
"context": {
|
||||
@@ -213,8 +213,8 @@ fetch(`<YOUR_SERVER>/admin/batch-jobs/${batchJobId}`, {
|
||||
<TabItem value="curl" label="cURL">
|
||||
|
||||
```bash
|
||||
curl --location --request GET '<YOUR_SERVER>/admin/batch-jobs/<BATCH_JOB_ID>' \
|
||||
--header 'Authorization: Bearer <API_TOKEN>'
|
||||
curl -L -X GET '<YOUR_SERVER>/admin/batch-jobs/<BATCH_JOB_ID>' \
|
||||
-H 'Authorization: Bearer <API_TOKEN>'
|
||||
# <BATCH_JOB_ID> is the ID of the batch job
|
||||
```
|
||||
|
||||
@@ -227,7 +227,7 @@ If the batch job has been pre-processed, the status of the batch job will be `pr
|
||||
|
||||
Here’s an example of the `result` property:
|
||||
|
||||
```json noHeader
|
||||
```json noReport
|
||||
"result": {
|
||||
"count": 5, // Total number of products to be created or updated
|
||||
"stat_descriptors": [ //details about the products to be created/updated
|
||||
@@ -275,8 +275,8 @@ fetch(`<YOUR_SERVER>/admin/batch-jobs/${batchJobId}/confirm`, {
|
||||
<TabItem value="curl" label="cURL">
|
||||
|
||||
```bash
|
||||
curl --location --request POST '<YOUR_SERVER>/admin/batch-jobs/<BATCH_JOB_ID>/confirm' \
|
||||
--header 'Authorization: Bearer <API_TOKEN>'
|
||||
curl -L -X POST '<YOUR_SERVER>/admin/batch-jobs/<BATCH_JOB_ID>/confirm' \
|
||||
-H 'Authorization: Bearer <API_TOKEN>'
|
||||
# <BATCH_JOB_ID> is the ID of the batch job
|
||||
```
|
||||
|
||||
|
||||
@@ -105,9 +105,9 @@ fetch(`<YOUR_SERVER>/admin/discounts`, {
|
||||
<TabItem value="curl" label="cURL">
|
||||
|
||||
```bash
|
||||
curl --location --request POST '<YOUR_SERVER>/admin/discounts' \
|
||||
--header 'Authorization: Bearer <API_TOKEN>' \
|
||||
--header 'Content-Type: application/json' \
|
||||
curl -L -X POST '<YOUR_SERVER>/admin/discounts' \
|
||||
-H 'Authorization: Bearer <API_TOKEN>' \
|
||||
-H 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
"code": "<CODE>",
|
||||
"rule": {
|
||||
@@ -179,9 +179,9 @@ fetch(`<YOUR_SERVER>/admin/discounts/${discountId}`, {
|
||||
<TabItem value="curl" label="cURL">
|
||||
|
||||
```bash
|
||||
curl --location --request POST '<YOUR_SERVER>/admin/discounts/<DISCOUNT_ID>' \
|
||||
--header 'Authorization: Bearer <API_TOKEN>' \
|
||||
--header 'Content-Type: application/json' \
|
||||
curl -L -X POST '<YOUR_SERVER>/admin/discounts/<DISCOUNT_ID>' \
|
||||
-H 'Authorization: Bearer <API_TOKEN>' \
|
||||
-H 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
"description": "New description",
|
||||
"is_disabled": true
|
||||
@@ -253,9 +253,9 @@ fetch(`<YOUR_SERVER>/admin/discounts/${discountId}/conditions`, {
|
||||
<TabItem value="curl" label="cURL">
|
||||
|
||||
```bash
|
||||
curl --location --request POST '<YOUR_SERVER>/admin/discounts/<DISCOUNT_ID>/conditions' \
|
||||
--header 'Authorization: Bearer <API_TOKEN>' \
|
||||
--header 'Content-Type: application/json' \
|
||||
curl -L -X POST '<YOUR_SERVER>/admin/discounts/<DISCOUNT_ID>/conditions' \
|
||||
-H 'Authorization: Bearer <API_TOKEN>' \
|
||||
-H 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
"operator": "in",
|
||||
"products": [
|
||||
@@ -317,8 +317,8 @@ fetch(`<YOUR_SERVER>/admin/discounts/${discountId}/conditions/${conditionId}&exp
|
||||
<TabItem value="curl" label="cURL">
|
||||
|
||||
```bash
|
||||
curl --location --request GET '<YOUR_SERVER>/admin/discounts/<DISCOUNT_ID>/conditions/<CONDITION_ID>&expand=products' \
|
||||
--header 'Authorization: Bearer <API_TOKEN>'
|
||||
curl -L -X GET '<YOUR_SERVER>/admin/discounts/<DISCOUNT_ID>/conditions/<CONDITION_ID>&expand=products' \
|
||||
-H 'Authorization: Bearer <API_TOKEN>'
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
@@ -378,9 +378,9 @@ fetch(`<YOUR_SERVER>/admin/discounts/${discountId}/conditions/${conditionId}`, {
|
||||
<TabItem value="curl" label="cURL">
|
||||
|
||||
```bash
|
||||
curl --location --request POST '<YOUR_SERVER>/admin/discounts/<DISCOUNT_ID>/conditions/<CONDITION_ID>' \
|
||||
--header 'Authorization: Bearer <API_TOKEN>' \
|
||||
--header 'Content-Type: application/json' \
|
||||
curl -L -X POST '<YOUR_SERVER>/admin/discounts/<DISCOUNT_ID>/conditions/<CONDITION_ID>' \
|
||||
-H 'Authorization: Bearer <API_TOKEN>' \
|
||||
-H 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
"products": [
|
||||
"<PRODUCT_ID_1>",
|
||||
@@ -430,8 +430,8 @@ fetch(`<YOUR_SERVER>/admin/discounts/${discountId}/conditions/${conditionId}`, {
|
||||
<TabItem value="curl" label="cURL">
|
||||
|
||||
```bash
|
||||
curl --location --request DELETE '<YOUR_SERVER>/admin/discounts/<DISCOUNT_ID>/conditions/<CONDITION_ID>' \
|
||||
--header 'Authorization: Bearer <API_TOKEN>'
|
||||
curl -L -X DELETE '<YOUR_SERVER>/admin/discounts/<DISCOUNT_ID>/conditions/<CONDITION_ID>' \
|
||||
-H 'Authorization: Bearer <API_TOKEN>'
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
@@ -473,8 +473,8 @@ fetch(`<YOUR_SERVER>/admin/discounts/${discountId}`, {
|
||||
<TabItem value="curl" label="cURL">
|
||||
|
||||
```bash
|
||||
curl --location --request DELETE '<YOUR_SERVER>/admin/discounts/<DISCOUNT_ID>' \
|
||||
--header 'Authorization: Bearer <API_TOKEN>'
|
||||
curl -L -X DELETE '<YOUR_SERVER>/admin/discounts/<DISCOUNT_ID>' \
|
||||
-H 'Authorization: Bearer <API_TOKEN>'
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
|
||||
@@ -75,9 +75,9 @@ fetch(`<SERVER_URL>/admin/customer-groups`, {
|
||||
<TabItem value="curl" label="cURL">
|
||||
|
||||
```bash
|
||||
curl --location --request POST '<SERVER_URL>/admin/customer-groups' \
|
||||
--header 'Authorization: Bearer <API_TOKEN>' \
|
||||
--header 'Content-Type: application/json' \
|
||||
curl -L -X POST '<SERVER_URL>/admin/customer-groups' \
|
||||
-H 'Authorization: Bearer <API_TOKEN>' \
|
||||
-H 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
"name": "VIP"
|
||||
}'
|
||||
@@ -121,8 +121,8 @@ fetch(`<SERVER_URL>/admin/customer-groups`, {
|
||||
<TabItem value="curl" label="cURL">
|
||||
|
||||
```bash
|
||||
curl --location --request GET '<SERVER_URL>/admin/customer-groups' \
|
||||
--header 'Authorization: Bearer <API_TOKEN>'
|
||||
curl -L -X GET '<SERVER_URL>/admin/customer-groups' \
|
||||
-H 'Authorization: Bearer <API_TOKEN>'
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
@@ -165,8 +165,8 @@ fetch(`<SERVER_URL>/admin/customer-groups/${customerGroupId}`, {
|
||||
<TabItem value="curl" label="cURL">
|
||||
|
||||
```bash
|
||||
curl --location --request GET '<SERVER_URL>/admin/customer-groups/<CUSTOMER_GROUP_ID>' \
|
||||
--header 'Authorization: Bearer <API_TOKEN>'
|
||||
curl -L -X GET '<SERVER_URL>/admin/customer-groups/<CUSTOMER_GROUP_ID>' \
|
||||
-H 'Authorization: Bearer <API_TOKEN>'
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
@@ -220,9 +220,9 @@ fetch(`<SERVER_URL>/admin/customer-groups/${customerGroupId}`, {
|
||||
<TabItem value="curl" label="cURL">
|
||||
|
||||
```bash
|
||||
curl --location --request POST '<SERVER_URL>/admin/customer-groups/<CUSTOMER_GROUP_ID>' \
|
||||
--header 'Authorization: Bearer <API_TOKEN>' \
|
||||
--header 'Content-Type: application/json' \
|
||||
curl -L -X POST '<SERVER_URL>/admin/customer-groups/<CUSTOMER_GROUP_ID>' \
|
||||
-H 'Authorization: Bearer <API_TOKEN>' \
|
||||
-H 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
"metadata": {
|
||||
"is_seller": true
|
||||
@@ -269,8 +269,8 @@ fetch(`<SERVER_URL>/admin/customer-groups/${customerGroupId}`, {
|
||||
<TabItem value="curl" label="cURL">
|
||||
|
||||
```bash
|
||||
curl --location --request DELETE '<SERVER_URL>/admin/customer-groups/<CUSTOMER_GROUP_ID>' \
|
||||
--header 'Authorization: Bearer <API_TOKEN>'
|
||||
curl -L -X DELETE '<SERVER_URL>/admin/customer-groups/<CUSTOMER_GROUP_ID>' \
|
||||
-H 'Authorization: Bearer <API_TOKEN>'
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
@@ -330,9 +330,9 @@ fetch(`<SERVER_URL>/admin/customer-groups/${customerGroupId}/customers/batch`, {
|
||||
<TabItem value="curl" label="cURL">
|
||||
|
||||
```bash
|
||||
curl --location --request POST '<SERVER_URL>/admin/customer-groups/<CUSTOMER_GROUP_ID>/customers/batch' \
|
||||
--header 'Authorization: Bearer <API_TOKEN>' \
|
||||
--header 'Content-Type: application/json' \
|
||||
curl -L -X POST '<SERVER_URL>/admin/customer-groups/<CUSTOMER_GROUP_ID>/customers/batch' \
|
||||
-H 'Authorization: Bearer <API_TOKEN>' \
|
||||
-H 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
"customer_ids": [
|
||||
{
|
||||
@@ -378,8 +378,8 @@ fetch(`<SERVER_URL>/admin/customer-groups/${customerGroupId}/customers`, {
|
||||
<TabItem value="curl" label="cURL">
|
||||
|
||||
```bash
|
||||
curl --location --request GET '<SERVER_URL>/admin/customer-groups/<CUSTOMER_GROUP_ID>/customers' \
|
||||
--header 'Authorization: Bearer <API_TOKEN>'
|
||||
curl -L -X GET '<SERVER_URL>/admin/customer-groups/<CUSTOMER_GROUP_ID>/customers' \
|
||||
-H 'Authorization: Bearer <API_TOKEN>'
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
@@ -441,9 +441,9 @@ fetch(`<SERVER_URL>/admin/customer-groups/${customerGroupId}/customers/batch`, {
|
||||
<TabItem value="curl" label="cURL">
|
||||
|
||||
```bash
|
||||
curl --location --request DELETE '<SERVER_URL>/admin/customer-groups/<CUSTOMER_GROUP_ID>/customers/batch' \
|
||||
--header 'Authorization: Bearer <API_TOKEN>' \
|
||||
--header 'Content-Type: application/json' \
|
||||
curl -L -X DELETE '<SERVER_URL>/admin/customer-groups/<CUSTOMER_GROUP_ID>/customers/batch' \
|
||||
-H 'Authorization: Bearer <API_TOKEN>' \
|
||||
-H 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
"customer_ids": [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user